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
Fix PHP 7.4 regression, changed behavior of get_declared_classes()
Since PHP 7.4 get_declared_classes() does not guarantee any order. That
implies that parent classes aren't the first any more, rendering the
array_reverse() technique futile for the loop & break code that follows.
So, additionally, let's try to reduce the list of candidates by removing all
the classes known to be "parents". That way, at the end, only the "main"
class just included with remain.
Upstream PR:
squizlabs/PHP_CodeSniffer#3130
Source:
https://raw.githubusercontent.com/php/php-src/PHP-7.4/UPGRADING
Text:
Previously get_declared_classes() always returned parent classes before
child classes. This is no longer the case. No particular order is guaranteed
for the get_declared_classes() return value.
0 commit comments