-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: refactor to templated trait+interface #7988
Conversation
I agree this is something really needed, I already approached it at some point. If this helps PHPStan and IDE to understand available configuration options, adds autosuggestion support and makes weird workarounds just to satisfy SA obsolete, then it's great, BUT only if we have fixer/script for regenerating But I have a doubt - why trait was introduced? Do you want to take configuration part from In general, this is rather achievable without the trait part:
But yeah, it does look weird when you need to define |
indeed, that was my inspiration. [and I do not believe we need custom extension]
I like the idea. will see what i can craft
likely sth generic only. better than nothing 🤷🏻
making AbstractFixer a template class was complaining to me for non-configurable fixer to not specify template type, and making non-configurable fixer to declare |
e84e9e8
to
6d326f2
Compare
96d56cc
to
fcc1f9b
Compare
* | ||
* @phpstan-type _AutogeneratedInputConfiguration array{ | ||
* comment_type?: 'PHPDoc'|'comment', | ||
* header: string, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the only mandatory config key in whole project
4fd6d85
to
2a5d59e
Compare
6bea54f
to
145306b
Compare
d14aa8e
to
7dcc498
Compare
57d1002
to
1079491
Compare
ef12532
to
9f25f2b
Compare
This breaks certain custom-rules packages that work fine with 3.59.2. Like https://github.com/PedroTroller/PhpCSFixer-Custom-Fixers. Is that a bug in the custom-rules package, or is this code more BC breaking than expected? |
first commit is selling idea
(later commits are mess to apply the idea - very draft, half regexped)
I want to be able to benefit from phpstan analysis for configuration. now it's simply
array<string, mixed>
.externalised: