Re: [PHP-DEV] Re: [RFC] Attributes v2

2020-04-16 Thread Benjamin Eberlei
On Thu, Apr 16, 2020 at 4:41 PM Nicolas Grekas wrote: > Le jeu. 16 avr. 2020 à 16:29, Larry Garfield a > écrit : > >> On Thu, Apr 16, 2020, at 1:46 AM, Benjamin Eberlei wrote: >> >> > > > > 3. I see the most common case for attributes being getting the >> object >> > > > > version. With the ref

Re: [PHP-DEV] [RFC] [DISCUSSION] Ensure correct magic methods' signatures when typed

2020-04-16 Thread tyson andre
> Ah, so that's what this is about! In that case, I'd be happy to simply > always enforce that __construct() cannot return a value, in the same way we > do for ": void" functions. (If we have backwards compatibility concerns, we > can add this as a warning instead of hard error.) I'd approve of th

Re: [PHP-DEV] [RFC] [DISCUSSION] Ensure correct magic methods' signatures when typed

2020-04-16 Thread Gabriel Caruso
On Thu, 16 Apr 2020 at 16:22, Guilliam Xavier wrote: > On Sun, Apr 5, 2020 at 4:02 PM Gabriel Caruso > wrote: > > > > Hello, internals. > > > > Hereby you can find the RFC Document that I want to discuss as suggested > > via https://externals.io/message/109416 and > > https://externals.io/messag

Re: [PHP-DEV] Type hints in array destructuring expressions

2020-04-16 Thread Nikita Popov
On Thu, Apr 16, 2020 at 12:20 PM Enno Woortmann wrote: > Hi together, > > as the voting for the "Type casting in array destructuring expressions" > shows a clear direction to be declined (sad faces on my side, I really > would've liked it as a feature completion of the casting feature set > witho

Re: [PHP-DEV] Re: [RFC] Attributes v2

2020-04-16 Thread Nicolas Grekas
Le jeu. 16 avr. 2020 à 16:29, Larry Garfield a écrit : > On Thu, Apr 16, 2020, at 1:46 AM, Benjamin Eberlei wrote: > > > > > > 3. I see the most common case for attributes being getting the > object > > > > > version. With the reflection API as currently described, I see two > > > > > shortcomin

Re: [PHP-DEV] Re: [RFC] Attributes v2

2020-04-16 Thread Larry Garfield
On Thu, Apr 16, 2020, at 1:46 AM, Benjamin Eberlei wrote: > > > > 3. I see the most common case for attributes being getting the object > > > > version. With the reflection API as currently described, I see two > > > > shortcomings. > > > > > > > > A) I can't tell if an attribute has a valid obje

Re: [PHP-DEV] [RFC] [DISCUSSION] Ensure correct magic methods' signatures when typed

2020-04-16 Thread Guilliam Xavier
On Sun, Apr 5, 2020 at 4:02 PM Gabriel Caruso wrote: > > Hello, internals. > > Hereby you can find the RFC Document that I want to discuss as suggested > via https://externals.io/message/109416 and > https://externals.io/message/107990: > > https://wiki.php.net/rfc/magic-methods-signature > > Best

Re: [PHP-DEV] Type hints in array destructuring expressions

2020-04-16 Thread Enno Woortmann
Hi, - It has been requested several times on this list to stop using the wording "type hint" and instead write "type declaration" ;) I've updated the RFC to use the "type declaration" wording, thanks for the hint :) - When I see this example in the RFC: ``` $years = [["now", 2020], ["futur

Re: [PHP-DEV] Type hints in array destructuring expressions

2020-04-16 Thread Guilliam Xavier
On Thu, Apr 16, 2020 at 12:20 PM Enno Woortmann wrote: > > Hi together, > > as the voting for the "Type casting in array destructuring expressions" > shows a clear direction to be declined (sad faces on my side, I really > would've liked it as a feature completion of the casting feature set > with

Re: [PHP-DEV] Type hints in array destructuring expressions

2020-04-16 Thread Enno Woortmann
Agree this would slow things down but if it could be potentially type checked on the assignment with type constraint in front of the variable name I think that would be a neat feature. So to work as a function parameter but not like a typed property. Hi Michał, A type check during the assignmen

Re: [PHP-DEV] PHP 7.4.5 Released!

2020-04-16 Thread Guilliam Xavier
On Thu, Apr 16, 2020 at 12:02 PM Derick Rethans wrote: > > The PHP development team announces the immediate availability of PHP > 7.4.5. This is a security bug fix release. > > All PHP 7.4 users are encouraged to upgrade to this version. > > For source downloads of PHP 7.4.5 please visit our downl

Re: [PHP-DEV] Type hints in array destructuring expressions

2020-04-16 Thread Michał Brzuchalski
Hi Nicolas, czw., 16 kwi 2020 o 12:48 Nicolas Grekas napisał(a): > > > https://wiki.php.net/rfc/typehint_array_desctructuring >> > > Thanks, Enno, I like it a lot! > I hope the implementation won't find any blocker. > > > >> I fear that if you go that path people would automatically expect it to

Re: [PHP-DEV] [RFC][DISCUSSION] PHP Namespace in core

2020-04-16 Thread Rowan Tommins
On Wed, 15 Apr 2020 at 20:54, G. P. B. wrote: > On Wed, 15 Apr 2020 at 19:24, Andrea Faulds wrote: > > We already have PHP language features relying on classes in the root > > namespace (Closure, Throwable, ArrayAccess, etc) so the point Marcio > > makes about inconsistency is nonetheless valid

Re: [PHP-DEV] Type hints in array destructuring expressions

2020-04-16 Thread Nicolas Grekas
> > https://wiki.php.net/rfc/typehint_array_desctructuring > Thanks, Enno, I like it a lot! I hope the implementation won't find any blocker. > I fear that if you go that path people would automatically expect it to be > possible to write: > > int $id = $data['id']; > int $id = getIdFromData($d

[PHP-DEV] [VOTE] Stricter type-checks for arithmetic/bitwise operators

2020-04-16 Thread Nikita Popov
Hi internals, I have opened voting on https://wiki.php.net/rfc/arithmetic_operator_type_checks. Voting closes 2020-04-30. Regards, Nikita

Re: [PHP-DEV] Type hints in array destructuring expressions

2020-04-16 Thread Michał Brzuchalski
Hi Enno, czw., 16 kwi 2020 o 12:20 Enno Woortmann napisał(a): > Hi together, > > as the voting for the "Type casting in array destructuring expressions" > shows a clear direction to be declined (sad faces on my side, I really > would've liked it as a feature completion of the casting feature set

[PHP-DEV] Type hints in array destructuring expressions

2020-04-16 Thread Enno Woortmann
Hi together, as the voting for the "Type casting in array destructuring expressions" shows a clear direction to be declined (sad faces on my side, I really would've liked it as a feature completion of the casting feature set without the need for a really new syntax, as the parser also already cov

[PHP-DEV] PHP 7.4.5 Released!

2020-04-16 Thread Derick Rethans
The PHP development team announces the immediate availability of PHP 7.4.5. This is a security bug fix release. All PHP 7.4 users are encouraged to upgrade to this version. For source downloads of PHP 7.4.5 please visit our downloads page. Windows binaries can be found on the PHP for Windows site

[PHP-DEV] PHP 7.3.17 Released

2020-04-16 Thread Christoph M. Becker
The PHP development team announces the immediate availability of PHP 7.3.17. This is a security release which also contains several bug fixes. All PHP 7.3 users are encouraged to upgrade to this version. For source downloads of PHP 7.3.17 please visit our downloads page. Windows binaries can be