-
-
Notifications
You must be signed in to change notification settings - Fork 946
Closed
Labels
Milestone
Description
Current version of PHPStan: 0.11.1
I'm receiving the following notice multiple times during operation. It looks like the reflection is casting a numeric string to an integer then failing to test against string array keys.
PHP Notice: Undefined index: 2819260324446 in /repo/vendor/phpstan/phpstan/src/Reflection/ClassConstantReflection.php on line 43
Code snippet that reproduces the problem
https://phpstan.org/r/53d70e4d-dce3-4d55-bad5-6a5d707f77b1
The analyzer is working as intended, but due to the notices being thrown is breaking CI. The use case is that a 3rd party API is switching from integers to strings for their IDs.
I believe this issue is related. If so, and this is unsolvable, is there any way to disable this type of check all together?
Expected output
Analysis is correct, PHP Notice for an Undefined index is being thrown though.
Reactions are currently unavailable