-
Notifications
You must be signed in to change notification settings - Fork 680
❗Allow plugins to modify Config::$fileExtensions early #6789
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
Conversation
c1eb612
to
0dfb003
Compare
1a4aac6
to
bddf808
Compare
Okay, CI-wise
|
failure is indeed unrelated. If this is a breaking change, I'm afraid this will have to wait for Psalm 5 |
Thanks for picking this up so fast!
In case somebody called the functionality of As a non-breaking (but also non-functional) fall-back I could think of keeping empty stub methods still in |
Yeah, this might be better if you want to ship this soon. Please add a deprecated tag so we know to remove it on Psalm 5 |
Hi @ohader, just a friendly notice: Psalm 5 will be coming soonish. If you want to have a chance of getting this merged before Psalm 6, deprecation should be commited on 4.x branch, this already targets master so it should be okay. |
@orklah thanks for the notification. Can you please give me a hint how deprecations are handled (error trigger, documentation, etc) in Psalm? Thx in advance! |
flag any removed method/property/class as @deprecated with a description. If it's not a full removal, just add some phpdoc to explain the change. In any case, UPGRADE.md need to be updated on master branch to explain each BC break |
|
Not sure what the idea behind |
@orklah Concerning release of Psalm v5: Is there a schedule/date yet? I might have some smaller changes/fixes and would focus on them during the weekend... |
@ohader we were thinking about releasing an alpha in the next few days but it doesn't mean feature freeze yet. We still have a few weeks before release date, however we don't have a precise schedule |
Can you rebase and ping me? I'll merge this |
ProjectAnalyzer consumed Config::$fileExtensions early in its constructor - without having processed plugins' modifications, registering their custom scanners or analyzer implementations. This change * adds new specific interface \Psalm\Plugin\FileExtensionsInterface to be used by plugin implementations * extracts file extension handling from \Psalm\PluginRegistrationSocket and interface \Psalm\Plugin\RegistrationInterface to a new dedicated \Psalm\PluginFileExtensionsSocket and new interface \Psalm\Plugin\FileExtensionsInterface !!! this is a breaking change in PluginRegistrationSocket !!! * adds runtime in-memory cache for Config::$plugins * calls new method Config::processPluginFileExtensions(), providing modifications to file extension only early in ProjectAnalyzer * adjusts documentation
@orklah Rebased. My brain was busy with totally unrelated tasks during weekdays, sorry for the delay. |
Thanks! |
ProjectAnalyzer
consumedConfig::$fileExtensions
early in itsconstructor - without having processed plugins' modifications,
registering their custom scanners or analyzer implementations.
This change
\Psalm\Plugin\FileExtensionsInterface
to be used by plugin implementations
\Psalm\PluginRegistrationSocket
and interface
\Psalm\Plugin\RegistrationInterface
to a new dedicated\Psalm\PluginFileExtensionsSocket
and new interface\Psalm\Plugin\FileExtensionsInterface
!!! this is a breaking change in
PluginRegistrationSocket
!!!Config::$plugins
Config::processPluginFileExtensions()
, providingmodifications to file extension only early in
ProjectAnalyzer
Adjusted test scenario https://github.com/ohader/psalm-6788/tree/adjusted
Fixes: #6788
Deprecation in
4.x
branch, see #7455