Bug #81630 [NEW]: PHP 8.1: ReflectionClass->getTraitAliases() crashes with Internal error

From: Date: Wed, 17 Nov 2021 12:55:14 +0000
Subject: Bug #81630 [NEW]: PHP 8.1: ReflectionClass->getTraitAliases() crashes with Internal error
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-237808@lists.php.net to get a copy of this message
From: ondrej at mirtes dot cz Operating system: N/A PHP version: 8.1.0RC6 Package: Reflection related Bug Type: Bug Bug description:PHP 8.1: ReflectionClass->getTraitAliases() crashes with Internal error Description: ------------ Unfortunately I don't have a simple reproducing script here, but I know there's a bug in ReflectionClass when asking for trait aliases. A code that executes the same methods crashes when I run it in context of PHPStan: https://3v4l.org/oSI4m The error message is: Uncaught Error: Internal error: Failed to retrieve the reflection object in phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Reflection/Php/PhpClassReflectionExtension.php:576 #0 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Reflection/Php/PhpClassReflectionExtension.php(576): ReflectionClass->getTraitAliases() #1 Maybe it's related to some internal state of ReflectionClass or maybe the way how it was obtained, but calling ReflectionClass->getTraitAliases() always results in a crash on PHP 8.1. It works on PHP 8.0. Hopefully this gives you enough information to track it down. Thanks. -- Edit bug report at https://bugs.php.net/bug.php?id=81630&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=81630&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=81630&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=81630&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=81630&r=needscript Try newer version: https://bugs.php.net/fix.php?id=81630&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=81630&r=support Expected behavior: https://bugs.php.net/fix.php?id=81630&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=81630&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=81630&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=81630&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=81630&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=81630&r=dst IIS Stability: https://bugs.php.net/fix.php?id=81630&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=81630&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=81630&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=81630&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=81630&r=mysqlcfg

« previous php.bugs (#237808) next »