-
-
Notifications
You must be signed in to change notification settings - Fork 27
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
Remove and update extensions to reflect new stub file #182
Conversation
Not sure about the test removal tbh, is it possible to add them to the stubs package or would they just be removed for now? The latter feels like a risky loss Update: if tests should be moved over there, which is understandable - maybe by requiring phpstan there too with the extension if needed? |
Yeah loss of the tests is very unfortunate. Without the return type extension classes, I'm not sure how you'd test the behaviour. |
What wonder do we have here?? :) |
What about dev-requiring phpstan + extension in the stubs repo and making composer aware of the fact that it should use the local stubs checkout instead of the latest release. And then we essentially "just" move the tests over. In theory at least. I can give it a try |
I have no clue how to manage this dependency problem. For me it takes a couple of months to research. Let's leave tests here until a robust plan comes up. |
I find it weird to test something that another repository does. |
The 1st obstacle: How to send a PR that fixes something in the PHPStan extension and in core stubs generation? |
I did something in php-stubs/wordpress-stubs#76, it didn't work as I initially planned, but it should be even a bit simpler |
Thanks to @herndlm's test setup all tests have been moved to php-stubs/wordpress-stubs. |
@szepeviktor I removed all but one function from the |
Please remove that private function too. |
The next logical step would be to exclude all these |
Do you mean |
Touching anything is WP core is a no-go.
|
🎈 Fun fact: there are 462 |
What are |
Co-authored-by: Viktor Szépe <[email protected]>
❓ Will WordPress 7.0 need no viktorstan to be statically analyzed? |
Status update Extensions to check
Extensions to keep
Extensions to discuss
GetListTableDynamicFunctionReturnTypeExtensionHere's what WP says about RedirectCanonicalDynamicFunctionReturnTypeExtensionThis extension fixes |
Thank you @swissspidy |
@IanDelMar Should I cherry-pick #183 #184 and #185 into 2.x branch? |
This reverts commit 0191253.
* Remove deprecated `instanceof` * Remove space Co-authored-by: Viktor Szépe <[email protected]> * Return early * Fix handling of fields unions * Add tests --------- Co-authored-by: Viktor Szépe <[email protected]>
* Fix CS * Fix PHP 7.2 compat.
@IanDelMar I think this PR is complete. Do we still need |
I agree with it.
Don't think so. |
This reverts commit d15b7e1.
Removes the following extensions/rules, which are now fully covered by the new (yet unreleased) stub file:
Also removes the tests as they should be part of php-stubs/wordpress-stubs itself.
Updates and merges the following extension, which are partly (though almost fully) covered by the new (yet unreleased) stub file:
Also removes the tests not related to the return type extension as they should be part of php-stubs/wordpress-stubs itself.
Part of #181
For testing purposes I recommend to
in composer.json