[PHP-DEV] Re: Including "Disable the ability to use concrete types in PHAR metadata" in PHP 8.0?

2020-07-06 Thread Stanislav Malyshev
Hi! > https://bugs.php.net/bug.php?id=76774 has been open since 2018-08-21. > > That ticket proposes the following: > >> I propose that we disable the ability to have concrete types included in the >> serialized metadata by >> providing an empty classlist to the unserialize call in the PHAR

[PHP-DEV] Including "Disable the ability to use concrete types in PHAR metadata" in PHP 8.0?

2020-07-06 Thread tyson andre
Hi internals, https://bugs.php.net/bug.php?id=76774 has been open since 2018-08-21. That ticket proposes the following: > I propose that we disable the ability to have concrete types included in the > serialized metadata by > providing an empty classlist to the unserialize call in the PHAR

[PHP-DEV] [RFC] FFI Improvements: Consistency and soliving some problems

2020-07-06 Thread Кирилл Несмеянов
Hi all!   I would like to start discussion about the «FFI Improvements» RFC. At the moment, I do not have the right to create wiki page, so I post it on the github:  https://github.com/SerafimArts/php-rfcs/blob/ffi-improvements/rfcs/-ffi-improvements.md   The proposal: - Contains

[PHP-DEV] Re: [RFC] [VOTE] Make constructors and destructors return void

2020-07-06 Thread Benas IML
Hey internals, I have updated the RFC with 2 changes: 1. Made the RFC target PHP 9.0 for enforcing `void` rules implicitly. 2. Added a secondary vote for allowing explicit `void` return type declaration. I will be opening the vote again on Wednesday (July 8th). Best regards, Benas On Fri, 3

Re: [PHP-DEV] [RFC][DISCUSSION] Strict operators directive

2020-07-06 Thread Arnold Daniels
On Mon, Jul 6, 2020 at 6:33 PM Benjamin Eberlei wrote: > > > On Mon, Jul 6, 2020 at 5:27 PM Arnold Daniels < > arnold.adaniels...@gmail.com> wrote: > >> Hi all, >> >> I'd like to start the discussion of the "Strict operators directive" RFC >> version 1.5. This RFC proposes a new directive

Re: [PHP-DEV] [RFC][DISCUSSION] Strict operators directive

2020-07-06 Thread Arnold Daniels
On Mon, Jul 6, 2020 at 6:22 PM Marco Pivetta wrote: > Hey Arnold, > > Perhaps it makes sense for <=> to still operate with other types, as long > as they are uniform? Specifically: > > * error: 1 <=> "1" > * ok: "a" <=> "b" > * ok: true <=> false > Using `==`, `!=`, and `<=>` with string

Re: [PHP-DEV] Proposal: A way for classes to define a response to any primitive type cast

2020-07-06 Thread Marco Pivetta
Hey Josh, Similar proposals were raised recently for `__toArray()`: see https://externals.io/message/108369#108369 I'd endorse avoiding object-to- casts via cast operations: they are a good source of bugs. My rationale for the discouragement of magic cast methods is explained with some code

Re: [PHP-DEV] [RFC][DISCUSSION] Strict operators directive

2020-07-06 Thread Benjamin Eberlei
On Mon, Jul 6, 2020 at 5:27 PM Arnold Daniels wrote: > Hi all, > > I'd like to start the discussion of the "Strict operators directive" RFC > version 1.5. This RFC proposes a new directive strict_operators, which > limits the type juggling done by operators to avoid unexpected results. > >

Re: [PHP-DEV] [RFC][DISCUSSION] Strict operators directive

2020-07-06 Thread Marco Pivetta
Hey Arnold, Perhaps it makes sense for <=> to still operate with other types, as long as they are uniform? Specifically: * error: 1 <=> "1" * ok: "a" <=> "b" * ok: true <=> false Similar for sorting: I use <=> to differentiate multi-dimensional arrays: perhaps it should error if the array

[PHP-DEV] [RFC][DISCUSSION] Strict operators directive

2020-07-06 Thread Arnold Daniels
Hi all, I'd like to start the discussion of the "Strict operators directive" RFC version 1.5. This RFC proposes a new directive strict_operators, which limits the type juggling done by operators to avoid unexpected results. https://wiki.php.net/rfc/strict_operators There are some significant

[PHP-DEV] Re: [RFC] Named arguments

2020-07-06 Thread Nikita Popov
On Fri, Jul 3, 2020 at 4:35 PM Nikita Popov wrote: > On Mon, Jun 29, 2020 at 5:13 PM Nikita Popov wrote: > >> On Tue, Jun 23, 2020 at 12:10 PM Nikita Popov >> wrote: >> >>> On Tue, May 5, 2020 at 3:51 PM Nikita Popov >>> wrote: >>> Hi internals, I've recently started a thread

[PHP-DEV] Proposal: A way for classes to define a response to any primitive type cast

2020-07-06 Thread Josh Bruce
Apologies, first time, still learning and have no historical context - timing is what it is. Proposal type: Concept Implementer: Unknown, fallback to me after slow learning Presumed simple implementation as the pattern should already be in place: Cast of (string) -> __toString() - already