Make Reflection*::getDocComment() return an empty string instead of false
| From: | Gina P. Banyard | Date: | Wed, 25 Jun 2025 10:37:37 +0000 |
| Subject: | Make Reflection*::getDocComment() return an empty string instead of false | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-127747@lists.php.net to get a copy of this message | ||
Hello internals,
While working on the deprecation to/from bool type juggling in functions RFC and seeing the impact
within Symfony, we found a common slightly annoying case.
The getDocComment method of various Reflection classes was always used as a string, and we thought
changing the behaviour in PHP made more sense.
I submitted a PR [1] but was asked to gather feedback on the mailing list.
Please let me know what you think.
Best regards,
Gina P. Banyard
[1] https://github.com/php/php-src/pull/18928