Implement FilterVarDynamicReturnTypeExtension#1900
Conversation
b2f367b to
95607be
Compare
composer.json
Outdated
| ], | ||
| "require": { | ||
| "php": "~7.1", | ||
| "ext-filter": "*", |
There was a problem hiding this comment.
I think this should be in require-dev, as it is not required for analysis.
There was a problem hiding this comment.
Nope, it's required. The constants are used in the type extension rule in the src directory. Remember that this doesn't mean your application will require it in production.
There was a problem hiding this comment.
as it is not required for analysis
To elaborate on this, it is required since I use the FILTER_ constants directly. I could probably do an AST string comparison.
There was a problem hiding this comment.
And what if I don't use filter_var function in my application? Then phpstan will not use this extension. Is it required then?
There was a problem hiding this comment.
Yes. Remember that ext-filter is enabled by default. We also don't check if you have pcre enabled, although you could technically disable it. Most major libraries depend on it. The only reason I added it is because the build fails without it (composer-require-checker).
There was a problem hiding this comment.
I got rid of the dependency.
fc4226a to
0f01583
Compare
|
@ondrejmirtes Does this have to wait for 0.12? This could break builds because |
0f01583 to
1332300
Compare
|
Looks great, thank you! These kinds of changes don't have to wait for major version. |
No description provided.