Re: [PHP-DEV] Nullsafe array access can still emit a warning

2022-08-24 Thread Gert de Pagter
`$undefined?->bar()` does feel wrong, but `$arr[0]?->bar()` does not to me. But maybe i've just been using javascript too much lately On Wed, 24 Aug 2022 at 15:11, Marco Pivetta wrote: > > Hey Gert, > > On Wed, 24 Aug 2022 at 14:59, Gert de Pagter wrote: >> >

[PHP-DEV] Nullsafe array access can still emit a warning

2022-08-24 Thread Gert de Pagter
upcoming PHP version? I didn't see anything mentioned specifically about this in the RFC. https://3v4l.org/1raa8 Greetings, Gert de Pagter/ BackEndTea -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

[PHP-DEV] [RFC Proposal] Allow methods to 'become' static

2021-03-14 Thread Gert de Pagter
Hey Internals, Recently i've been working on an older code base, where we have a lot of classes with all static methods. We've been moving to injecting the classes, and calling the methods as if they were not static. I wanted to add interfaces to these classes, with non static methods, so we can

[PHP-DEV] RFC karma

2020-06-05 Thread Gert de Pagter
Hey Internals, I’d like RFC karma in order to write an RFC on intersection types. Could someone give me the need permissions? Thanks in advance! -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] Intersection types

2020-05-30 Thread Gert de Pagter
Hi Internals, With recent additions of the type system like union types [1], id like to propose adding intersection types as well. Looking through past RFCs I found one from 2016 [2] which never left the discussion phase and is currently marked as inactive. Before continuing with an RFC I'd lik

Re: [PHP-DEV] Warn when declaring required parameter after optionalone

2020-01-09 Thread Gert
.5 where only deprecations get added, in that case an error in 8.0 would be fine. -- Gert On Thu, 9 Jan 2020 at 15:06, Mark Randall wrote: > > On 09/01/2020 12:31, Sebastian Bergmann wrote: > > I would prefer erroring out over just emitting a warning. > > I'm in agreement wit

Re: [PHP-DEV] [VOTE] Reclassifying engine warnings

2019-10-15 Thread Gert
I may be a bit late to this party, but will the promotion to error exception of illegal offsets also happen for using resources as array keys? These currently produce a notice, and are then casted to an integer: https://3v4l.org/cQ8hf Or will the behaviour of that remain the same? On Fri, 11 Oct 2

Re: [PHP-DEV] Warning for "confusable" types

2019-10-14 Thread Gert
On that note, since traits aren't possible as a return type. Would it be possible to determine that the given return type is a trait? In that case a more specific error message could also be possible. I don't know much of the internals, so i don't know if that is even possible atm, but it would be

Re: [PHP-DEV] XML Validation

2019-09-23 Thread Gert
Is this something that would need an RFC? I'd be willing to take a shot at it myself, but my C experience is rather limited, so i'm not sure if i could cook up an implementation. On Mon, 23 Sep 2019 at 09:44, Benjamin Eberlei wrote: > > Hi Gert, > > On Mon, Sep 23, 2019

[PHP-DEV] XML Validation

2019-09-23 Thread Gert
Hi Internals, I've been working with XML and validation recently, and the Dom classes do basically everything that is needed. The only thing is that to get the errors of the schema validation we call the `validateSchema` on the DomDocument, and then use the `libxml_get_errors` function to actually

Re: [PHP-DEV] [RFC] Reclassifying engine warnings

2019-08-28 Thread Gert
Maybe i'm misunderstanding something here, but what does turning notices into deprecations achieve? Because if you have deprecation notices being logged then it shouldn't be extra work to log notices/warnings as well right? On Wed, 28 Aug 2019 at 16:16, Chase Peeler wrote: > > Well, one reason I

[PHP-DEV] Error instead of returning false

2019-05-07 Thread Gert
haviour default. This RFC would target PHP 8.0, but i'd like to hear some opinions on this. Greetings, Gert de Pagter (BackEndTea) -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] open_basedir?

2019-05-07 Thread Gert
Hello, If the plan is to remove it in 8.0, then i'd say its beneficial to already deprecate it in 7.4. This will give users an earlier warning that these upgrades need to happen. Cheers On Tue, 7 May 2019 at 12:18, Joe Watkins wrote: > Morning Nikita, > > It would be wise to do a) and b) regar