[php-src] Issue #7912: ReflectionProperty::getDocComment not respect Enum Cases PHPDoc.

From: Date: Sat, 08 Jan 2022 15:12:01 +0000
Subject: [php-src] Issue #7912: ReflectionProperty::getDocComment not respect Enum Cases PHPDoc.
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-238877@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/7912 Comment Author: iluuu1994 Your enum roughly gets rewritten to this: ```php enum TestEnum { /** Description about Case. */ public const ABC = new TestEnum('ABC', 'abc'); public const XYZ = new TestEnum('XYZ', 'xyz'); /** @var string */ public const QWERTY = 'qwerty'; private function __construct( public readonly string $name, public readonly string $value, ) {} } ``` As you can see, the comment is stored on the constants, not on the name or value properties. That couldn't work because we have n cases but only 1 name/value property, so which of the n comments should be added?

« previous php.bugs (#238877) next »