[PHP-DEV] Validating #[\Attribute] targets

2025-07-25 Thread Daniel Scherzer
Hi internals, The #[\Attribute] attribute is used to mark classes as being usable as attributes. It currently does not trigger any error if added to a trait, interface, enum, or abstract class. However, if any of those *were* used as an attribute, calling ReflectionAttribute::newInstance() would f

[PHP-DEV] [VOTE] RFC: #[\Deprecated] for traits

2025-07-24 Thread Daniel Scherzer
Hi internals, Voting is now open for this RFC. * RFC: https://wiki.php.net/rfc/deprecated_traits * Discussion thread: https://externals.io/message/127912 Voting will end 2025-08-07 at end-of-day UTC. -Daniel

[PHP-DEV] [VOTE] RFC: FILTER_THROW_ON_FAILURE

2025-07-24 Thread Daniel Scherzer
Hi internals, Voting is now open for this RFC. * RFC: https://wiki.php.net/rfc/filter_throw_on_failure * Discussion thread: https://externals.io/message/127911 Voting will end 2025-08-07 at end-of-day UTC. -Daniel

[PHP-DEV] Re: [RFC] [Discussion] FILTER_THROW_ON_FAILURE

2025-07-21 Thread Daniel Scherzer
On Sat, Jul 5, 2025 at 4:23 PM Daniel Scherzer wrote: > Hi internals, > > I'd like to start the discussion for a new RFC about adding > a FILTER_THROW_ON_FAILURE flag to the filter extension. > > * RFC: https://wiki.php.net/rfc/filter_throw_on_failure > * Implementati

[PHP-DEV] Re: [RFC] [Discussion] #[\Deprecated] for traits

2025-07-21 Thread Daniel Scherzer
On Sat, Jul 5, 2025 at 4:30 PM Daniel Scherzer wrote: > Hi internals, > > I'd like to start the discussion for a new RFC about adding support for > #[\Deprecated] on traits. > > * RFC: https://wiki.php.net/rfc/deprecated_traits > * Implementation: https://github.

[PHP-DEV] Re: [VOTE] RFC: #[\DelayedTargetValidation] attribute

2025-07-21 Thread Daniel Scherzer
On Thu, Jul 17, 2025 at 9:21 AM Daniel Scherzer wrote: > Hi internals, > > Voting is now open for this RFC. > > * RFC: https://wiki.php.net/rfc/delayedtargetvalidation_attribute > * Discussion thread: https://externals.io/message/127702 > > Voting will end 2025

[PHP-DEV] [PHP8.5] RFC/Major feature freeze in 3 weeks

2025-07-21 Thread Daniel Scherzer
Hi internals, Any *RFCs* that are trying to target PHP 8.5 need to have completed voting by August 12, 3 weeks from tomorrow. This lets us finalize the list of the biggest features that need to be merged. For smaller features *that do not require an RFC*, they can still be proposed and implemented

[PHP-DEV] [VOTE] RFC: #[\DelayedTargetValidation] attribute

2025-07-17 Thread Daniel Scherzer
Hi internals, Voting is now open for this RFC. * RFC: https://wiki.php.net/rfc/delayedtargetvalidation_attribute * Discussion thread: https://externals.io/message/127702 Voting will end 2025-07-31 at end-of-day UTC. -Daniel

[PHP-DEV] Re: [RFC] [Discussion] #[\DelayedTargetValidation] attribute

2025-07-14 Thread Daniel Scherzer
On Tue, Jun 17, 2025 at 4:26 PM Daniel Scherzer wrote: > Hi internals, > > I'd like to start the discussion for a new RFC about adding a > `#[\DelayedTargetValidation]` attribute. > > * RFC: https://wiki.php.net/rfc/delayedtargetvalidation_attribute > * Implementation:

[PHP-DEV] RFCs that are pending implementation

2025-07-09 Thread Daniel Scherzer
Hi internals, I just merged the last deprecation from the *8.4* deprecations RFC, and so https://wiki.php.net/rfc/deprecations_php_8_4 is officially done. As I moved it from the "Pending Implementation / Landing" section of the main RFC page, I noticed that there are a few RFCs that * are not wai

Re: [PHP-DEV] Re: [RFC] [Discussion] #[\DelayedTargetValidation] attribute

2025-07-06 Thread Daniel Scherzer
On Sun, Jul 6, 2025 at 5:48 AM Tim Düsterhus wrote: > Hi > > On 7/5/25 00:49, Daniel Scherzer wrote: > > If there is no further feedback, I intend to start a vote in a few days. > > Looking at your #[\Deprecated] for traits RFC > (https://externals.io/messa

[PHP-DEV] [RFC] [Discussion] #[\Deprecated] for traits

2025-07-05 Thread Daniel Scherzer
Hi internals, I'd like to start the discussion for a new RFC about adding support for #[\Deprecated] on traits. * RFC: https://wiki.php.net/rfc/deprecated_traits * Implementation: https://github.com/php/php-src/pull/19045 --Daniel

[PHP-DEV] [RFC] [Discussion] FILTER_THROW_ON_FAILURE

2025-07-05 Thread Daniel Scherzer
Hi internals, I'd like to start the discussion for a new RFC about adding a FILTER_THROW_ON_FAILURE flag to the filter extension. * RFC: https://wiki.php.net/rfc/filter_throw_on_failure * Implementation: https://github.com/php/php-src/pull/18896 --Daniel

Re: [PHP-DEV] Re: [RFC] [Discussion] #[\DelayedTargetValidation] attribute

2025-07-05 Thread Daniel Scherzer
On Fri, Jul 4, 2025 at 4:50 PM Rob Landers wrote: > > On Sun, Jun 22, 2025, at 22:00, Daniel Scherzer wrote: > > On Tue, Jun 17, 2025 at 4:26 PM Daniel Scherzer < > daniel.e.scher...@gmail.com> wrote: > > Hi internals, > > I'd like to start the d

[PHP-DEV] Re: [RFC] [Discussion] #[\DelayedTargetValidation] attribute

2025-07-04 Thread Daniel Scherzer
On Tue, Jun 17, 2025 at 4:26 PM Daniel Scherzer wrote: > Hi internals, > > I'd like to start the discussion for a new RFC about adding a > `#[\DelayedTargetValidation]` attribute. > > * RFC: https://wiki.php.net/rfc/delayedtargetvalidation_attribute > * Implementation:

Re: [PHP-DEV] [RFC] Deprecations for PHP 8.5

2025-07-04 Thread Daniel Scherzer
On Fri, Jul 4, 2025 at 3:17 PM Ilija Tovilo wrote: > Hi everyone > > On Wed, Jul 2, 2025 at 9:58 PM Gina P. Banyard wrote: > > > > It is this time of year again where we proposed a list of deprecations > to add in PHP 8.5: > > > > https://wiki.php.net/rfc/deprecations_php_8_5 > > > Deprecate Ref

Re: [PHP-DEV] [RFC] [Discussion] #[\DelayedTargetValidation] attribute

2025-07-04 Thread Daniel Scherzer
On Sun, Jun 22, 2025 at 10:24 PM Alexandru Pătrănescu wrote: > Hi Daniel, internals, > > On Wed, Jun 18, 2025, 02:29 Daniel Scherzer > wrote: > >> Hi internals, >> >> I'd like to start the discussion for a new RFC about adding a >> `#[\DelayedTar

[PHP-DEV] PHP 8.5.0alpha1 is available for testing

2025-07-03 Thread Daniel Scherzer
/34f32cb39e432134d77c618642972b84 Thank you, and happy testing! Regards, Daniel Scherzer, Volker Dusch, and Pierrick Charron php-8.5.0alpha1.tar.bz2 SHA256 hash: 5840cd1ca7e73beab84abe184c135bcf72732f680d5c25729a813d66c93f9fbc PGP signature: -BEGIN PGP SIGNATURE

[PHP-DEV] Re: [RFC] [Discussion] #[\DelayedTargetValidation] attribute

2025-06-22 Thread Daniel Scherzer
On Tue, Jun 17, 2025 at 4:26 PM Daniel Scherzer wrote: > Hi internals, > > I'd like to start the discussion for a new RFC about adding a > `#[\DelayedTargetValidation]` attribute. > > * RFC: https://wiki.php.net/rfc/delayedtargetvalidation_attribute > * Implementation:

Re: [PHP-DEV] [RFC] [Discussion] #[\DelayedTargetValidation] attribute

2025-06-18 Thread Daniel Scherzer
On Wed, Jun 18, 2025 at 5:22 AM Volker Dusch wrote: > On Wed, Jun 18, 2025 at 1:28 AM Daniel Scherzer < > daniel.e.scher...@gmail.com> wrote: > >> I'd like to start the discussion for a new RFC about adding a >> `#[\DelayedTargetValidation]` attribute. >&

[PHP-DEV] [RFC] [Discussion] #[\DelayedTargetValidation] attribute

2025-06-17 Thread Daniel Scherzer
Hi internals, I'd like to start the discussion for a new RFC about adding a `#[\DelayedTargetValidation]` attribute. * RFC: https://wiki.php.net/rfc/delayedtargetvalidation_attribute * Implementation: https://github.com/php/php-src/pull/18817 --Daniel

Re: [PHP-DEV] [VOTE] RFC: Final Property Promotion

2025-06-11 Thread Daniel Scherzer
On Wed, Jun 11, 2025 at 1:29 AM Derick Rethans wrote: > Hi, > > It seems the poll is now closed, but the RFC is still listed in the > "In voting phase" section, and the Status is still "Voting". Would you > please have a look at that? > > cheers, > Derick > Sorry about that, time flies. I have

Re: [PHP-DEV] [RFC] Transform void into an alias for null

2025-06-04 Thread Daniel Scherzer
On Wed, Jun 4, 2025 at 4:49 PM Bob Weinand wrote: > On 4.6.2025 22:39:28, Daniel Scherzer wrote: > > On Wed, Jun 4, 2025 at 1:35 PM Bob Weinand wrote: > >> >> On 4.6.2025 16:54:05, Bob Weinand wrote: >> > On 2.6.2025 18:27:51, Gina P. Banyard wrote: >>

Re: [PHP-DEV] [RFC] Transform void into an alias for null

2025-06-04 Thread Daniel Scherzer
On Wed, Jun 4, 2025 at 1:35 PM Bob Weinand wrote: > > On 4.6.2025 16:54:05, Bob Weinand wrote: > > On 2.6.2025 18:27:51, Gina P. Banyard wrote: > >> Hello internals, > >> > >> This is the second RFC out of a set of type system related RFCs I > >> want to propose for PHP 8.5. > >> > >> The objecti

Re: [PHP-DEV] #[Deprecated] Attribute

2025-05-27 Thread Daniel Scherzer
On Tue, May 27, 2025 at 9:41 PM Ben Ramsey wrote: > > Last night, I identified a need for `#[Deprecated]` on a userland class in > one of my libraries, but I had to settle on `@deprecated` for the widest > range of compatibility. > > Has there been anymore thought on putting together an implement

[PHP-DEV] [VOTE] RFC: Final Property Promotion

2025-05-26 Thread Daniel Scherzer
Hi internals, Voting is now open for this RFC. * RFC: https://wiki.php.net/rfc/final_promotion * Discussion thread: https://externals.io/message/126926 Voting will end 2025-06-09 at end-of-day UTC. -Daniel

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

[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

[PHP-DEV] Re: [RFC] [Discussion] Final promoted properties

2025-05-07 Thread Daniel Scherzer
On Mon, Mar 24, 2025 at 11:33 AM Daniel Scherzer < daniel.e.scher...@gmail.com> wrote: > Hi internals, > > I'd like to start the discussion for a new RFC about allowing final > promoted properties. You can see some preliminary discussion at < > https://externals.io

[PHP-DEV] Re: [VOTE] Never parameters (v2)

2025-05-06 Thread Daniel Scherzer
On Mon, Apr 21, 2025 at 1:13 PM Daniel Scherzer wrote: > Hi internals, > > I have opened the vote on https://wiki.php.net/rfc/never-parameters-v2. > The vote will run for 2 weeks (and a few hours), closing on May 5th at the > end of the day (UTC). > > --Daniel > This RFC

[PHP-DEV] [VOTE] Never parameters (v2)

2025-04-21 Thread Daniel Scherzer
Hi internals, I have opened the vote on https://wiki.php.net/rfc/never-parameters-v2. The vote will run for 2 weeks (and a few hours), closing on May 5th at the end of the day (UTC). --Daniel

[PHP-DEV] Re: [RFC] [Discussion] Never parameters

2025-04-15 Thread Daniel Scherzer
On Tue, Apr 8, 2025 at 6:40 PM Daniel Scherzer wrote: > > Since a lot of the discussion seems to be around static analysis and > whether there is a real use case for this, I wanted to share another use > case I just came across: in the `thephpleague/commonmark` package, > differen

[PHP-DEV] Re: [RFC] [Discussion] Never parameters

2025-04-08 Thread Daniel Scherzer
On Mon, Mar 10, 2025 at 12:05 PM Daniel Scherzer < daniel.e.scher...@gmail.com> wrote: > Hi internals, > > I'd like to start discussion on a new RFC about allowing `never` for > parameter types when declaring a method. > > * RFC: https://wiki.php.net/rfc/never-par

Re: [PHP-DEV] [RFC] [Discussion] Never parameters

2025-04-05 Thread Daniel Scherzer
On Thu, Mar 20, 2025 at 4:00 PM Larry Garfield wrote: > I have a use case for this in Serde, so would be in favor. > > We should not block this kind of improvement on the hope of generics. > Worst case, we have this plus generics so you have options, how terrible. > > Would you mind sharing detai

[PHP-DEV] Re: Constructor property promotion for final properties

2025-04-05 Thread Daniel Scherzer
On Fri, Feb 21, 2025 at 12:09 PM Daniel Scherzer < daniel.e.scher...@gmail.com> wrote: > Hi internals, > > I recently found out that constructor property promotion cannot be used > for final properties. I propose that it become allowed. Thoughts? Would > this need an RFC, or

Re: [PHP-DEV] Release Managers for PHP 8.5

2025-03-26 Thread Daniel Scherzer
On Wed, Mar 26, 2025 at 12:10 PM Calvin Buckley wrote: > Hi all, > > It's time to start the process of finding and electing RMs for the next > minor PHP release. > > I'd like to also throw my hat in the ring. I've been contributing for a while now, and recently got VCS access/karma. > > Candida

Re: [PHP-DEV] VCS Account Request: daniels

2025-03-25 Thread Daniel Scherzer
On Tue, Mar 25, 2025 at 5:11 PM Ilija Tovilo wrote: > Hi Daniel > > Derick also granted you the corresponding karma for your wiki account. > How can I check if this went through? I don't see any new option to vote on https://wiki.php.net/rfc/optional-interfaces. -Daniel

Re: [PHP-DEV] [RFC] [Discussion] Never parameters

2025-03-25 Thread Daniel Scherzer
On Tue, Mar 25, 2025 at 11:01 AM Rowan Tommins [IMSoP] wrote: > > I don't think the language should pretend to support something that it > doesn't > I don't see what the pretending is here - the engine supports declaring that a method must accept a parameter but makes no promises about the type

[PHP-DEV] [RFC] [Discussion] Final promoted properties

2025-03-24 Thread Daniel Scherzer
Hi internals, I'd like to start the discussion for a new RFC about allowing final promoted properties. You can see some preliminary discussion at < https://externals.io/message/126475>, but this is now an official RFC. * RFC: https://wiki.php.net/rfc/final_promotion * Implementation: https://gith

Re: [PHP-DEV] Re: Constructor property promotion for final properties

2025-03-24 Thread Daniel Scherzer
On Mon, Mar 24, 2025 at 11:22 AM Larry Garfield wrote: > > To answer the original question: I'm not against this change, but as it is > a syntax change, I think it does warrant an RFC, even if it's a small/easy > one. That's a good way to flesh out the edge cases like that. > > --Larry Garfield

Re: [PHP-DEV] VCS Account Request: daniels

2025-03-21 Thread Daniel Scherzer
Hi internals. On Fri, Mar 21, 2025 at 3:11 PM Daniel Scherzer wrote: > Contributing to php-src with features and bug fixes, > https://github.com/DanielEScherzer Since there wasn't much space in the form field to fill out the details, I've been contributing to various parts

[PHP-DEV] VCS Account Request: daniels

2025-03-21 Thread Daniel Scherzer
Contributing to php-src with features and bug fixes, https://github.com/DanielEScherzer

Re: [PHP-DEV] Re: Constructor property promotion for final properties

2025-03-21 Thread Daniel Scherzer
On Fri, Mar 21, 2025 at 9:45 AM Alexandru Pătrănescu wrote: > > On Fri, Mar 21, 2025 at 5:20 PM Daniel Scherzer < > daniel.e.scher...@gmail.com> wrote: > >> On Fri, Mar 21, 2025 at 4:07 AM Tim Düsterhus wrote: >> >>> Can you clarify if the followi

Re: [PHP-DEV] Re: Constructor property promotion for final properties

2025-03-21 Thread Daniel Scherzer
On Fri, Mar 21, 2025 at 4:07 AM Tim Düsterhus wrote: > Can you clarify if the following would result in constructor property > promotion or not: > > class Foo { > public function __construct( > final string $bar, > ) { } > } > > Best regards > Tim Düsterhu

Re: [PHP-DEV] [RFC] [Discussion] Never parameters

2025-03-20 Thread Daniel Scherzer
On Sun, Mar 16, 2025 at 12:31 PM Matt Fonda wrote: > Hi Daniel, > > I believe this feature essentially amounts to "add methods which can never > be called", which in my mind makes no sense. If a method types against an > interface, and that interface uses a method with a never parameter type, > t

Re: [PHP-DEV] [RFC] [Discussion] Never parameters

2025-03-11 Thread Daniel Scherzer
[responding to multiple people instead of spamming multiple emails, I hope that is okay] On Mon, Mar 10, 2025 at 12:38 PM Eugene Sidelnyk wrote: > > Yet, do you think it's reasonable that "never" type should be used rather > than "void"? From what I know, never - is a special type used whe

[PHP-DEV] [RFC] [Discussion] Never parameters

2025-03-11 Thread Daniel Scherzer
Hi internals, I'd like to start discussion on a new RFC about allowing `never` for parameter types when declaring a method. * RFC: https://wiki.php.net/rfc/never-parameters-v2 * Implementation: https://github.com/php/php-src/pull/18016 -Daniel

[PHP-DEV] ReflectionClass output for enums

2025-02-25 Thread Daniel Scherzer
Hi internals, A few months back I sent for improving the output of `ReflectionClass::__toString()` when used for enums (and `ReflectionEnum::__toString()`, which just inherits that method). Since this is technically a breaking change if anyone is relying

[PHP-DEV] Constructor property promotion for final properties

2025-02-21 Thread Daniel Scherzer
Hi internals, I recently found out that constructor property promotion cannot be used for final properties. I propose that it become allowed. Thoughts? Would this need an RFC, or is this minor enough to be acceptable with just a mailing list discussion? Background: In the process of trying to hel

[PHP-DEV] Re: [VOTE] Attributes on Constants

2025-01-05 Thread Daniel Scherzer
On Sat, Jan 4, 2025 at 4:03 PM Daniel Scherzer wrote: > > the vote will be open for 3 weeks given the holidays, closing on > 2025-01-06 at 00:00:00 UTC. > > Just a reminder that this will close in 24 hours, if you can vote but > haven't yet > > -Daniel > I have c

[PHP-DEV] Re: [VOTE] Attributes on Constants

2025-01-04 Thread Daniel Scherzer
> the vote will be open for 3 weeks given the holidays, closing on 2025-01-06 at 00:00:00 UTC. Just a reminder that this will close in 24 hours, if you can vote but haven't yet -Daniel

[PHP-DEV] [VOTE] Attributes on Constants

2024-12-15 Thread Daniel Scherzer
Hi internals. I have opened the vote on https://wiki.php.net/rfc/attributes-on-constants - the vote will be open for 3 weeks given the holidays, closing on 2025-01-06 at 00:00:00 UTC. -Daniel

[PHP-DEV] Re: [RFC] [Discussion] Attributes on compile-time constants

2024-12-14 Thread Daniel Scherzer
On Sat, Nov 30, 2024 at 9:00 AM Daniel Scherzer wrote: > Hi again, > > Based on feedback to my last thread[1] that an RFC would be needed to > allow attributes on constants, I have just filed > https://wiki.php.net/rfc/attributes-on-constants and added it to the > "Under

Re: [PHP-DEV] [RFC] [Discussion] Attributes on compile-time constants

2024-12-03 Thread Daniel Scherzer
On Mon, Dec 2, 2024 at 2:48 PM Tim Düsterhus wrote: > Thank you for your RFC. As you might have guessed from my comments on > the PR, I quite like the proposal to round off attributes. Nevertheless > any new syntax has quite a bit of an impact on tooling around PHP (see > also (3) below), so I'm

[PHP-DEV] [RFC] [Discussion] Attributes on compile-time constants

2024-11-30 Thread Daniel Scherzer
Hi again, Based on feedback to my last thread[1] that an RFC would be needed to allow attributes on constants, I have just filed https://wiki.php.net/rfc/attributes-on-constants and added it to the "Under Discussion" section on the main RFC page. I plan to open the vote in two weeks unless issues

[PHP-DEV] Re: Adding attributes to compile-time constants

2024-11-30 Thread Daniel Scherzer
Since it seems that this requires an RFC, I have created an account on wiki.php.net with the username `danielescherzer` and kindly request edit privileges so that I can create the RFC. -Daniel On Tue, Nov 26, 2024 at 12:15 PM Daniel Scherzer < daniel.e.scher...@gmail.com> wrote: > Hi

[PHP-DEV] Adding attributes to compile-time constants

2024-11-26 Thread Daniel Scherzer
rwise the functionality is there and seems to work. Is anyone willing to help with the memory issue? Separately, once the memory issue is fixed, would this need to go through an RFC process? Thanks, --Daniel Scherzer [1] https://github.com/php/php-src/pull/16952

[PHP-DEV] Adding `ReflectionConstant::getExtension()` and `::getExtensionName()`

2024-10-31 Thread Daniel Scherzer
Hi internals, Last week I sent [1] to implement `ReflectionConstant::getExtension()` and `::getExtensionName()`. It was suggested [2] that I ask the mailing list if there are any objections. Are there? --Daniel Scherzer (https://github.com/DanielEScherzer) [1] https://github.com/php/php-src

[PHP-DEV] Sharing the CustomCast extension

2024-09-18 Thread Daniel Scherzer
useful for others. Basically, the extension allows a class to control how it should be treated when cast to a boolean, integer, or float. If this extension is useful to others, I can look into getting it published on PECL. Thanks, --Daniel Scherzer [1] https://github.com/DanielEScherzer/CustomCast

[PHP-DEV] Adding new `ReflectionConstant::getFileName()`

2024-09-16 Thread Daniel Scherzer
luded as part of the 8.4 release. Thanks, --Daniel Scherzer (https://github.com/DanielEScherzer) [1] https://github.com/php/php-src/pull/15847 [2] https://github.com/php/php-src/issues/15723 [3] https://github.com/php/php-src/pull/15847#issuecomment-2345774089 [4] https://github.com/php/php-src