Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[ErrorHandler] Add helper script to patch type declarations#42988
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
6364d3c to1a799e1Comparecarsonbot commentedSep 12, 2021
Hey! I think@fancyweb has recently worked with this code. Maybe they can help review this? Cheers! Carsonbot |
nicolas-grekas left a comment
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.
Thanks a lot for this PR, I had something similar on my list!
src/Symfony/Component/ErrorHandler/Resources/bin/patch-type-declarations OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/ErrorHandler/Resources/bin/patch-type-declarations.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/ErrorHandler/Resources/bin/patch-type-declarations.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/ErrorHandler/Resources/bin/patch-type-declarations.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
0f8b7c1 to8311f21Comparewouterj commentedSep 13, 2021
PR updated, including the proposed changes. Also added some help information, and added a basic deprecation handling (I don't want to depend on PhpUnitBridge - but it's still good to show type deprecations imho). |
src/Symfony/Component/ErrorHandler/Resources/bin/patch-type-declarations OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/ErrorHandler/Resources/bin/patch-type-declarations OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
8311f21 to4467659Compare4467659 to9e6da7eCompare
derrabus left a comment
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.
Thank you!
As a follow-up, I think it would be great if we could eat our own dogfood here and leverage that script of yours in our CI.
derrabus commentedSep 13, 2021
Thank you Wouter. |
…ugClassLoader (wouterj)This PR was merged into the 5.4 branch.Discussion----------[5.4] Document the patch type functionality of the DebugClassLoaderThis is a critical bit of functionality that we have to explain before the stabilization phase, in order to document for open source maintainers how to make their packages compatible with Symfony 6. When 6.0 is released, it is also an important feature to smooth upgrading for application users. This is why the main text focuses on application, and I added a special sidebar for OSS maintainers.I wasn't sure about the location for this functionality, but I think it makes most sense in the "upgrade major" article (although it used to be a very generic document).`@nicolas`-grekas and `@derrabus` as far as I know, you two have been most involved in this process. Please, if you have time, validate that feature is described correctly and that the "Recommended approach for OSS maintainers" is actually the recommended one :D---Refsymfony/symfony#42988Commits-------fbf0adf Document DebugClassLoader type patch functionality
Uh oh!
There was an error while loading.Please reload this page.
While trying out the patch functionality in my bundle (and simultaneously writing docs for it), I found that I would pretty much recommend to copy-paste the
.github/patch-types.phpscript. So I made it a bit more generic and added it as an official script to the ErrorHandler component.Usage:
For reference: I did not remove the
.github/patch-type.phpscript. I don't think it's worth replacing all the exclusion rules in that script with a single regex.@nicolas-grekas please let me know if you think this makes sense (or if I'm interpreting the new functionality completely wrong).