Re: [PHP-DEV] Initial discussion - more deprecation options

2025-05-08 Thread Ilija Tovilo
Hi Daniel On Thu, May 8, 2025 at 5:48 PM Daniel Scherzer wrote: > > So this example would emit deprecation warnings on all getting and setting > operations, but I was thinking that they would *not* be emitted when being > accessed from within the same class (private scope). Consider a project t

Re: [PHP-DEV] Initial discussion - more deprecation options

2025-05-08 Thread Daniel Scherzer
On Thu, May 8, 2025 at 8:38 AM Tim Düsterhus wrote: > Hi > > Am 2025-05-07 21:43, schrieb Niels Dossche: > > Definitely NAK on deprecating properties, which has the potential of > > adding lots of overhead. > > FWIW: Deprecating properties is already possibly by means of deprecating > a property

Re: [PHP-DEV] Initial discussion - more deprecation options

2025-05-07 Thread Niels Dossche
On 07/05/2025 22:02, Tim Düsterhus wrote: > Hi > > Am 2025-05-07 21:43, schrieb Niels Dossche: >> Definitely NAK on deprecating properties, which has the potential of adding >> lots of overhead. > > FWIW: Deprecating properties is already possibly by means of deprecating a > property hook. I gu

Re: [PHP-DEV] Initial discussion - more deprecation options

2025-05-07 Thread Tim Düsterhus
Hi Am 2025-05-07 21:43, schrieb Niels Dossche: Definitely NAK on deprecating properties, which has the potential of adding lots of overhead. FWIW: Deprecating properties is already possibly by means of deprecating a property hook. I guess this is an acceptable workaround to not require a ded

Re: [PHP-DEV] Initial discussion - more deprecation options

2025-05-07 Thread Niels Dossche
Hi Definitely NAK on deprecating properties, which has the potential of adding lots of overhead. Note also that cache slot merging (during compact_literals optimizer pass) when opcache is active may dodge the deprecation notice, and I don't want more VM workarounds for then doing this anyway.

Re: [PHP-DEV] Initial discussion - more deprecation options

2025-05-07 Thread Larry Garfield
On Wed, May 7, 2025, at 12:50 PM, Daniel Scherzer wrote: > Hi internals > > I'd like to start off some preliminary discussion about expanding the places > that `#[\Deprecated]` can be used, and more widely how userland code can have > the engine trigger deprecation warnings (rather than just manual

[PHP-DEV] Initial discussion - more deprecation options

2025-05-07 Thread Daniel Scherzer
Hi internals I'd like to start off some preliminary discussion about expanding the places that `#[\Deprecated]` can be used, and more widely how userland code can have the engine trigger deprecation warnings (rather than just manually calling `trigger_error()`). This is intended to be a follow-up