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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RFC] embrace PSR, option, pipe, phar #186
Conversation
Hello, thanks for the PR. I think it would be much wiser to decouple the changes into separate RFCs and PRs because this huge chunk of changes that changes the essence and core of the tool so much is unlikely to be accepted. I see a few useful bits here and there in this PR, but surrounded with a lot of irrelevant changes that break backwards compatibility and change formatting. This will likely result in you wanting to maintain your own fork, but I'd advise against that. You will cut yourself off from being able to benefit from changes in PHPStan; and PHPStan is going to be smarter and faster thanks to those changes. If I were you, I'd rather go with the way of composition, not modification. If you don't like how PHPStan is configured, create a middle layer tool that will translate CLI options into a neon file that PHPStan accepts. That's the correct way of doing things without breaking backwards compatibility. Some projects already have custom ways to configure PHPStan, see edgedesign/phpqa. And now, for the specific changes you made:
Not everyone wants to cache things in a global system tmp dir. I plan to make this configurable so everyone can set tmp dir of they own choice.
This is useful. If you create a separate PR with just this change, I can merge it. But make sure it's on the current master, there were some changes related to custom error formatters, see #185.
I don't agree with this change as I already pointed out few days ago in #181. As part of this change, you gutted out the current coding standard which does a lot of useful things, see the release notes. These rules are much more useful for code safety and consistency than just some formatting guidelines.
Huge BC break. I also don't like how the configuration looks.
Huge no-go. There are developers out there that don't use Composer autoloader and need these options in order for the tool to work.
This I can get behind. If you created a separate PR on master, we can discuss about merging it. I don't agree with moving all the configuration options into CLI (making the analyse command too long, hard to read and limiting to what data structures can I use), so I will skip those.
I don't agree with that. Implementing an interface and tagging a service means two different things. Interface - "this object can be passed to places where this interface is requested". Tag - "I want this service to get injected to this specific place". Tags can also be used to be configured to get some specific services excluded and not be used if the user doesn't want them to.
I worry this might slow down the analysis. Also: it's no longer required on PHP 7.1.
Path normalizing is required for a nicer output and for excluding to work. Excluding files is required if the analyzed codebase contains some files with serious errors on purpose. So these changes are fine by me and actually add value:
If you create separate PRs with correct formatting so that the build passes, I'm happy to accept them. Thanks. |
@ondrejmirtes Making this PR is not for merging but discussing. If you are confident in your coding style, system design, why not make this PR open, and let other people join the discussion? Feel free to close this PR, because you are the owner, leader probably. |
Hello, every body. This is a huge patch. Making this PR is just a request for
comment(RFC). If this PR were acceped, I would make contribution to phpstan;
otherwise, I would maintain my own fork.
Thanks all the developer's awesome work. phpstan is awesome 馃憤.
embrace psr
But why?
embrace php-di/php-di
But why?
embrace option
But why?
embrace cli
But why?
embrace phar
But why?