You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Ruleset fully_qualified_strict_types is creating invalid code #17
IMHO you should keep fully_qualified_strict_types, but at the same time add no_superfluous_phpdoc_tags - there's no point in keeping these @params because all the information is already in the native signature. This method should look like:
IMHO you should keep fully_qualified_strict_types, but at the same time add no_superfluous_phpdoc_tags - there's no point in keeping these @params because all the information is already in the native signature.
We most probably have tags in places which are not superfluous and those would get messed-up by the rule as well. Also seeing several bug reports and open pull request against the same rule has made me scared to add it for now.
We most probably have tags in places which are not superfluous and those would get messed-up by the rule as well. Also seeing several bug reports and open pull request against the same rule has made me scared to add it for now.
Only actually superfluous tags are removed (where type in phpDoc is exactly the same as in native signature + there's no additional description), so maybe just try how it works in practice 🙂.
In terms of fully_qualified_strict_types: this rule was massively developed lately, I've added feature for importing symbols found during analysis, we added several new places where FQCN can be found and shortened, there were many other improvements like relative imports. It's natural there were issues reported, but you can clearly see these were resolved - almost all remaining issues are feature requests, there is only one bug related to edge case, but even this issue has 2 opened PRs (with alternative implementation). There's no need to be scared, just look at how many test cases we have for it 🙂.
Activity
come-nc commentedon Feb 1, 2024
We should remove
fully_qualified_strict_typesrule and report the bug upstream I thinknickvergessen commentedon Feb 1, 2024
yeah let's do that and do a "quick" 1.2.1
come-nc commentedon Feb 1, 2024
For the record, there are several issues and PRs opened regarding this rule, I think PHP-CS-Fixer/PHP-CS-Fixer#7719 would fix the issue you had.
But for now let’s just remove the rule to be able to update our coding-standard. We may try it again in some time.
fix: Remove `fully_qualified_strict_types` again
nickvergessen commentedon Feb 1, 2024
Let keep this open as reminder?
[-]1.2 ruleset is creating invalid code[/-][+]Ruleset `fully_qualified_strict_types` is creating invalid code[/+]Wirone commentedon Feb 2, 2024
IMHO you should keep
fully_qualified_strict_types, but at the same time addno_superfluous_phpdoc_tags- there's no point in keeping these@params because all the information is already in the native signature. This method should look like:Then you don't need to wait for PHP-CS-Fixer/PHP-CS-Fixer#7719 and have less code in the repo 😉.
come-nc commentedon Feb 5, 2024
We most probably have tags in places which are not superfluous and those would get messed-up by the rule as well. Also seeing several bug reports and open pull request against the same rule has made me scared to add it for now.
Wirone commentedon Feb 5, 2024
Only actually superfluous tags are removed (where type in phpDoc is exactly the same as in native signature + there's no additional description), so maybe just try how it works in practice 🙂.
In terms of
fully_qualified_strict_types: this rule was massively developed lately, I've added feature for importing symbols found during analysis, we added several new places where FQCN can be found and shortened, there were many other improvements like relative imports. It's natural there were issues reported, but you can clearly see these were resolved - almost all remaining issues are feature requests, there is only one bug related to edge case, but even this issue has 2 opened PRs (with alternative implementation). There's no need to be scared, just look at how many test cases we have for it 🙂.