You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ @@
PHP 8.2 – 8.3 (1 error)
==========
-5: Constant HelloWorld::ARR1 with value array{k1: 'int'} overriding constant Foo::ARR1 with different value non-empty-array<int|string, 'int'> should have the same value.+5: Constant HelloWorld::ARR1 with value array{k1: 'int'} overriding constant Foo::ARR1 with different value non-empty-array<'int'> should have the same value.
PHP 7.2 – 8.1 (2 errors)
==========
-5: Constant HelloWorld::ARR1 with value array{k1: 'int'} overriding constant Foo::ARR1 with different value non-empty-array<int|string, 'int'> should have the same value.+5: Constant HelloWorld::ARR1 with value array{k1: 'int'} overriding constant Foo::ARR1 with different value non-empty-array<'int'> should have the same value.
5: Constant is declared inside a trait but is only supported on PHP 8.2 and later.
Full report
PHP 8.2 – 8.3 (1 error)
Line
Error
5
Constant HelloWorld::ARR1 with value array{k1: 'int'} overriding constant Foo::ARR1 with different value non-empty-array<'int'> should have the same value.
PHP 7.2 – 8.1 (2 errors)
Line
Error
5
Constant HelloWorld::ARR1 with value array{k1: 'int'} overriding constant Foo::ARR1 with different value non-empty-array<'int'> should have the same value.
5
Constant is declared inside a trait but is only supported on PHP 8.2 and later.
Activity
phpstan-bot commentedon Nov 30, 2024
@liquid207 After the latest push in 2.0.x, PHPStan now reports different result with your code snippet:
Full report
PHP 8.2 – 8.3 (1 error)
Constant HelloWorld::ARR1 with value array{k1: 'int'} overriding constant Foo::ARR1 with different value non-empty-array<'int'> should have the same value.PHP 7.2 – 8.1 (2 errors)
Constant HelloWorld::ARR1 with value array{k1: 'int'} overriding constant Foo::ARR1 with different value non-empty-array<'int'> should have the same value.Constant is declared inside a trait but is only supported on PHP 8.2 and later.phpstan-bot commentedon Mar 1, 2026
Closed via merging phpstan/phpstan-src#5115
github-actions commentedon Apr 2, 2026
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.