Skip to content
This repository was archived by the owner on Dec 3, 2023. It is now read-only.

Conversation

ruudk
Copy link
Contributor

@ruudk ruudk commented Feb 17, 2021

This can be used in Rector to prevent issues with prefixing.

See rectorphp/rector#5596 and rectorphp/rector#5597

@ruudk
Copy link
Contributor Author

ruudk commented Feb 17, 2021

  - '#Content of method "shouldSkipArg\(\)" is duplicated with method "shouldSkipArg\(\)" in "Symplify\\PHPStanRules\\Rules\\RequireStringArgumentInConstructorRule" class\. Use unique content or abstract service instead#'

Hmm, I don't really think this is worth it to be honest.

@TomasVotruba
Copy link
Member

TomasVotruba commented Feb 18, 2021

Hmm, I don't really think this is worth it to be honest.

PHPStan is hard at first use, but very addictive in time :)

How would you refactor it?

@TomasVotruba
Copy link
Member

Could you update the PR title to include the package?

The code itself looks very good 👍

@ruudk ruudk changed the title Add RequireStringArgumentInConstructorRule [PHPStanRules] Add RequireStringArgumentInConstructorRule Feb 18, 2021
@ruudk
Copy link
Contributor Author

ruudk commented Feb 18, 2021

Hmm, I don't really think this is worth it to be honest.

PHPStan is hard at first use, but very addictive in time :)

How would you refactor it?

I don't agree that moving this single function to a new service that we use in both this rule and RequireStringArgumentInMethodCallRule will make it better or easier to understand.

@TomasVotruba
Copy link
Member

@ruudk I see. If you're able to put that in code, feel free to update the PHPStan rule

This can be used in Rector to prevent issues with prefixing.

See rectorphp/rector#5596 and rectorphp/rector#5597
@ruudk ruudk force-pushed the RequireStringArgumentInConstructorRule branch from e69481b to 052cfde Compare February 18, 2021 13:43
@ruudk ruudk force-pushed the RequireStringArgumentInConstructorRule branch from 052cfde to b0675d2 Compare February 18, 2021 13:48
@ruudk
Copy link
Contributor Author

ruudk commented Feb 18, 2021

@TomasVotruba It's ready.

@ruudk
Copy link
Contributor Author

ruudk commented Feb 18, 2021

Applied feedback, ✅ green

@ruudk
Copy link
Contributor Author

ruudk commented Feb 18, 2021

This one is also ready for review ☺️

After this I will create a PR to enable it for Rector.

It probably needs to wait before Symplify is tagged again?

@TomasVotruba
Copy link
Member

It seems 2 comments are not displaying: #2968 (comment)

image

@ruudk
Copy link
Contributor Author

ruudk commented Feb 19, 2021

Should I also update the docs or is this done automatically?

@samsonasik
Copy link
Collaborator

@ruudk doc auto re-generated weekly https://github.com/symplify/symplify/blob/893fee82ec571ae840f235ebac1ebcbff3e340ba/.github/workflows/weekly_pull_requests.yaml

@ruudk
Copy link
Contributor Author

ruudk commented Feb 19, 2021

@TomasVotruba Ready ✅

@TomasVotruba
Copy link
Member

Thank you 👍

@TomasVotruba TomasVotruba merged commit 016d2cb into deprecated-packages:master Feb 19, 2021
@ruudk ruudk deleted the RequireStringArgumentInConstructorRule branch February 19, 2021 09:36
addshore added a commit to addshore/rector that referenced this pull request Feb 22, 2021
@deprecated-packages deprecated-packages locked as resolved and limited conversation to collaborators Feb 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants