[php-src] PR #21771: Fix enum case conflict in trait binding
| From: | prateekbhujel | Date: | Thu, 16 Apr 2026 11:17:11 +0000 |
| Subject: | [php-src] PR #21771: Fix enum case conflict in trait binding | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-35739@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/21771
Author: prateekbhujel
Fixes #21760.
Trait constant binding currently assumes that an existing entry in the constants table is a normal
class constant. If the existing entry is an enum case with the same name, that path crashes instead
of rejecting the conflict cleanly.
Reject that conflict up front during trait constant binding and cover it with a regression test.