[php-src] PR #15956: ReflectionClass: show enums differently from classes, test output

From: Date: Thu, 19 Sep 2024 08:51:47 +0000
Subject: [php-src] PR #15956: ReflectionClass: show enums differently from classes, test output
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-28671@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/15956 Author: DanielEScherzer While internally enums are mostly the same as classes, their output in ReflectionClass::__toString() should show the enum as the developer wrote it, rather than as the engine stored it. Accordingly - Say that the enum is an enum, not a final class - Include the backing type, if any, in the declaration line - Remove the UnitEnum and BackedEnum interfaces from the list of interfaces implemented - List enum cases separately from constants, and show the underlying values, if any Also add tests for the output - the tests are added in the first commit, so that the changes in the second commit can be more easily confirmed. GH-15766

« previous php.git-pulls (#28671) next »