Re: [PHP-DEV] [RFC][Discussion] NotSerializable attribute

2023-12-09 Thread G. P. B.
The implementation is simple and straight to the point, and uses machinery that has been added to the engine to deal more consistently with internal classes. In an ideal world (IMHO) serialization would be opt-in and __serialize() would be used to enable and describe the serialization format.

Re: [PHP-DEV] [RFC][Discussion] NotSerializable attribute

2023-12-09 Thread Rowan Tommins
On 9 December 2023 12:30:29 GMT, Max Semenik wrote: >Hi, I'd like to propose a new attribute, #[NotSerializable]. This >functionality is already available for internal classes - userspace should >benefit from it, too. If this ends up approximately the same as implementing serialisation as an

Re: [PHP-DEV] [RFC][Discussion] NotSerializable attribute

2023-12-09 Thread Niels Dossche
On 12/9/23 17:28, Larry Garfield wrote: > On Sat, Dec 9, 2023, at 10:17 AM, Niels Dossche wrote: >> Hi Max >> >> On 12/9/23 13:30, Max Semenik wrote: >>> Hi, I'd like to propose a new attribute, #[NotSerializable]. This >>> functionality is already available for internal classes - userspace should

Re: [PHP-DEV] [RFC][Discussion] NotSerializable attribute

2023-12-09 Thread Larry Garfield
On Sat, Dec 9, 2023, at 10:17 AM, Niels Dossche wrote: > Hi Max > > On 12/9/23 13:30, Max Semenik wrote: >> Hi, I'd like to propose a new attribute, #[NotSerializable]. This >> functionality is already available for internal classes - userspace should >> benefit from it, too. >> >> The RFC:

Re: [PHP-DEV] Filesystem path APIs

2023-12-09 Thread Niels Dossche
On 12/9/23 10:40, David CARLIER wrote: > On Fri, 8 Dec 2023 at 16:10, Niels Dossche wrote: > >> Hi David >> >> On 08/12/2023 10:08, David CARLIER wrote: >>> I think these would be great additions to PHP as working with paths >> and files is a core part of any programming language. >>> >>>

Re: [PHP-DEV] [RFC][Discussion] NotSerializable attribute

2023-12-09 Thread Niels Dossche
Hi Max On 12/9/23 13:30, Max Semenik wrote: > Hi, I'd like to propose a new attribute, #[NotSerializable]. This > functionality is already available for internal classes - userspace should > benefit from it, too. > > The RFC: https://wiki.php.net/rfc/not_serializable > Proposed implementation:

Re: [PHP-DEV] [RFC][Discussion] NotSerializable attribute

2023-12-09 Thread Dennis Snell via internals
> On Dec 9, 2023, at 4:55 PM, Robert Landers wrote: > > On Sat, Dec 9, 2023 at 4:32 PM Dennis Snell via internals > wrote: >> >> Max, I love this idea. >> >> Would it make sense to flip the design though and add `#[Serializable]` with >> a new `php.ini` setting? >> >> I’m thinking that

Re: [PHP-DEV] Re: [RFC][Discussion] NotSerializable attribute

2023-12-09 Thread Robert Landers
On Sat, Dec 9, 2023 at 4:32 PM Dennis Snell via internals wrote: > > Max, I love this idea. > > Would it make sense to flip the design though and add `#[Serializable]` with > a new `php.ini` setting? > > I’m thinking that almost every class I use, if not every single class, should > not be

[PHP-DEV] Re: [RFC][Discussion] NotSerializable attribute

2023-12-09 Thread Dennis Snell via internals
Max, I love this idea. Would it make sense to flip the design though and add `#[Serializable]` with a new `php.ini` setting? I’m thinking that almost every class I use, if not every single class, should not be serialized. If PHP had a flag to say “prevent all classes from serializing” then I

[PHP-DEV] [RFC][Discussion] NotSerializable attribute

2023-12-09 Thread Max Semenik
Hi, I'd like to propose a new attribute, #[NotSerializable]. This functionality is already available for internal classes - userspace should benefit from it, too. The RFC: https://wiki.php.net/rfc/not_serializable Proposed implementation: https://github.com/php/php-src/pull/12788 Please let me

Re: [PHP-DEV] Filesystem path APIs

2023-12-09 Thread David CARLIER
On Fri, 8 Dec 2023 at 16:10, Niels Dossche wrote: > Hi David > > On 08/12/2023 10:08, David CARLIER wrote: > > I think these would be great additions to PHP as working with paths > and files is a core part of any programming language. > > > > > > Seems like it, is there an argument to be