[PHP-DEV] Make Reflection*::getDocComment() return an empty string instead of false

2025-06-25 Thread Gina P. Banyard
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

Re: [PHP-DEV] Make Reflection*::getDocComment() return an empty string instead of false

2025-06-25 Thread Christian Schneider
Am 25.06.2025 um 12:37 schrieb Gina P. Banyard : > 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 > stri

Re: [PHP-DEV] Make Reflection*::getDocComment() return an empty string instead of false

2025-06-25 Thread Larry Garfield
On Wed, Jun 25, 2025, at 5:37 AM, Gina P. Banyard wrote: > 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

Re: [PHP-DEV] Make Reflection*::getDocComment() return an empty string instead of false

2025-06-25 Thread Alexandru Pătrănescu
On Wed, Jun 25, 2025 at 4:22 PM Kamil Tekiela wrote: > What exactly is the context in which symfony uses it? > Was wondering just that, and I can only imagine it's a function call that receives the parameter as a string and it would getDocComment() result is passed directly, sometimes being fal

Re: [PHP-DEV] Make Reflection*::getDocComment() return an empty string instead of false

2025-06-25 Thread Kamil Tekiela
What exactly is the context in which symfony uses it?

Re: [PHP-DEV] Make Reflection*::getDocComment() return an empty string instead of false

2025-06-25 Thread Andreas Hennings
On Wed, 25 Jun 2025 at 13:56, Christian Schneider wrote: > > Am 25.06.2025 um 12:37 schrieb Gina P. Banyard : > > 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 getDocCom

Re: [PHP-DEV] Make Reflection*::getDocComment() return an empty string instead of false

2025-06-25 Thread Rowan Tommins [IMSoP]
On 25 June 2025 13:21:22 BST, Andreas Hennings wrote: >On Wed, 25 Jun 2025 at 13:56, Christian Schneider >wrote: >> >> I noticed that the "empty string for absence of value" was also used in >> DOMElement::getAttribute() but you can argue that the existence of >> DOMElement::hasAttribute()

Re: [PHP-DEV] Make Reflection*::getDocComment() return an empty string instead of false

2025-06-25 Thread David CARLIER
Hi, It makes more sense to me too to change this behavior. I would rather go with null though ; but that is just personal preference ; empty string is already better than false ... Did you assess how widely it is used before the users come back "angry" ? Cheers. On Wed, 25 Jun 2025 at 11:39, Gin

Re: [PHP-DEV] Make Reflection*::getDocComment() return an empty string instead of false

2025-06-25 Thread Rowan Tommins [IMSoP]
On 25 June 2025 11:37:37 BST, "Gina P. Banyard" wrote: >The getDocComment method of various Reflection classes was always used as a >string, and we thought changing the behaviour in PHP made more sense. Looking at the stub file, the use of false instead of null to signal "no value" seems to

Re: [PHP-DEV] [VOTE] Make OPcache a non-optional part of PHP

2025-06-25 Thread Tim Düsterhus
Hi Am 2025-06-11 09:38, schrieb Tim Düsterhus: voting just opened on the “Make OPcache a non-optional part of PHP” RFC. Please find the following resources: - RFC: https://wiki.php.net/rfc/make_opcache_required - Discussion: https://externals.io/message/127459 - PoC PR: https://github.com/php