Skip to content
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

Fix AssertWpErrorTypeSpecifying extensions #127

Conversation

herndlm
Copy link
Contributor

@herndlm herndlm commented Nov 10, 2022

Viktor you were right, this was autoloader related. PHPStan needs to be able to cleanly autoload this class in order to fire the extensions. This is my first hacky approach to fix that autoloading with some kind of stub class copied into the tests folder.

The rest are just tiny fixes for the extensions themselves.

Refs: #124 CC @swissspidy

@szepeviktor
Copy link
Owner

All green 🟢 What to do now??

@szepeviktor
Copy link
Owner

Only 1 thing (2 occurrences)

- $yes = $yes;
+ $yes = $_GET['yes'];

Would it be possible?

@herndlm
Copy link
Contributor Author

herndlm commented Nov 10, 2022

Should be possible. The type is specified via phpdoc and overwritten anyways. I'm just not in front of the computer anymore, so feel free to adapt if you want

@herndlm
Copy link
Contributor Author

herndlm commented Nov 10, 2022

Also the diff I produced on one test file is not needed and could be reverted. Sorry, I was in a hurry and missed that..
The class Foo thing..

@szepeviktor szepeviktor merged commit 4800e7c into szepeviktor:master Nov 10, 2022
@szepeviktor
Copy link
Owner

Thank you Martin!

@herndlm herndlm deleted the fix-assert-wp-error-type-specifying-extensions branch November 11, 2022 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants