define: case_insensitive is ignored, case-insensitive constants are no longer supported#589
Conversation
tests/PHPStan/Rules/Functions/CallToFunctionParametersRuleTest.php
Outdated
Show resolved
Hide resolved
efd31ce to
0471f87
Compare
4c26321 to
41e48b4
Compare
|
I've made a new rule which checks if argument 3 is provided on PHP 8. |
|
@ondrejmirtes thanks for the feedback! I'll pick this up next week during my allotted phpstan dev time |
case_insensitive is ignored, case-insensitive constants are no longer supported
0e8e597 to
2085a64
Compare
src/Php/PhpVersion.php
Outdated
There was a problem hiding this comment.
@ondrejmirtes this handles PHP 8 not supporting it at all. What about handling the fact it was deprecated in 7.3
Per https://www.php.net/manual/en/function.define.php,
Defining case-insensitive constants is deprecated as of PHP 7.3.0.
Should we add another method that checks the PHP version ID if they're deprecated so we can report that error in our rule? Or just not supported and that's it.
There was a problem hiding this comment.
Reporting something on 7.3 and below 8.0 is somewhat a different scenario that's a better fit for https://github.com/phpstan/phpstan-deprecation-rules.
2085a64 to
99cacf6
Compare
99cacf6 to
4dbefe4
Compare
|
Thank you! |
case_insensitive is ignored, case-insensitive constants are no longer supported
phpstan/phpstan#5368