On 2024-06-28 23:06, Máté Kocsis wrote:
Hi Everyone,
I've been working on a new RFC for a while now, and time has come to
present it to a wider audience.
Last year, I learnt that PHP doesn't have built-in support for parsing
URLs according to any well established standards (RFC 1738 or the
Hey, internals!
As many before me, I have come accross a need to load a SQLite extension.
While it is supported on the SQLite3 interface, popular frameworks (namely
Laravel) use solely PDO and loading extensions is not available on PDO.
I've looked into the history of this issue and it seems tha
The current amount of secondary votes makes it feel daunting. I would
suspect not all voters will think thoroughly about each of the questions.
I suggest that most of these questions could be agreed upon in discussions
before the vote.
Maybe the RFC could propose a certain wording of the guidelin
Hey all,
If you try to implement an interface that does not exist, you get the
'Interface "%s" not found' error. Usually that's useful as it points to a
code error.
However, sometimes we want our code to be compatible with an optional
library. For example, my Expression class might be compa
Here’s the previous RFC:
https://wiki.php.net/rfc/conditional_break_continue_return
And the previous discussion: https://externals.io/message/110107
Is there some reason you cannot do this:
https://3v4l.org/hF1vr
Unless I’m missing something, you can’t patch-define a namespaced
OptionalInterface that easily.
Anyway, I was not implying this is something impossible to accomplish. My point
is that it would be beneficial to have synta
Hi,
I would like to propose a new syntax that let's you implement an interface
only if it exists.
`class MyClass extends ?OptionalInterface {}`
If the `OptionalInterface` exists, the class implements it. If no such
interface can be found, it is ignored.
https://wiki.php.net/rfc/opti
Hey,
Thanks for all the feedback!
The RFC is now expanded to explicitly address the concerns on how the
optional interfaces interact with type checks, eval'd interfaces, opcache,
autoloading, reflection and the Override attribute. Did Did I miss
something? Please let me know if anything is
On 2025-02-07 06:57, Larry Garfield wrote:
Hi folks. A few years ago I posted an RFC for a pipe operator, as seen
in
many other languages. At the time it didn't pass, in no small part
because the implementation was a bit shaky and it was right before
freeze.
Nonetheless, there are now even mo
Hello,
I would like to attempt an RFC on the "optional interfaces" feature that I
mentioned a while ago: https://externals.io/message/125967
I've created a wiki account with username `tontonsb`. Could you please grant
me the required privileges?
Thanks,
Juris
While it is nice the Symfony and WordPress wouldn't suffer a lot from
dropping this cache, what's the impact on scripts that are processing
hundreds of files?
Would doing ` $stat = stat($filename);` instead of separate calls to
`filemtime` and `filesize` actually be important? Or would it still am
On 2025-03-14 10:09, Juris Evertovskis wrote:
Hello,
I've opened the vote on the Optional interfaces RFC.
https://wiki.php.net/rfc/optional-interfaces
Implementation: https://github.com/php/php-src/pull/17288
Discussion: https://externals.io/message/126185
The voting will be closed on
On 2025-03-14 16:24, Viktor Khramov wrote:
Hey Juris.
I have a question about this feature.
At the example blow
interface A
{
public function x(Foo $foo);
}
interface B
{
public function x(Bar $foo);
}
class Test implements ?A, ?B
{
}
what would happen if both interfaces existed?
Hi Vi
On 2025-03-20 18:09, Gina P. Banyard wrote:
And another user [2] was basically suggesting my previous solution of
adding support for type classes/runtime implementation of interfaces.
Hey,
There are two ideas -- the `$object implements Iface` that you suggested
and the `SomeClass implements
On 2025-03-14 16:04, Jorg Sowa wrote:
Hello Juris, There is some uncertainty for me on how this approach
would work with namespaces.
Let's get this example:
https://3v4l.org/bI1Rj
I would expect to get the error message that I forgot to insert `use
Stringable;`.
But with your idea everything
Hello,
I've opened the vote on the Optional interfaces RFC.
https://wiki.php.net/rfc/optional-interfaces
Implementation: https://github.com/php/php-src/pull/17288
Discussion: https://externals.io/message/126185
The voting will be closed on 2025-03-29 00:00:00 UTC.
BR,
Juri
On 2025-03-20 18:50, Daniel Scherzer wrote:
The original inspiration which I discussed in the RFC is fixing the
signature of the BackedEnum methods, which currently use the second
option.
Hey,
I'm not opposed to having a bottom type, but the `try`/`tryFrom` issue
feels caused by another
On 2025-04-05 18:51, Niels Dossche wrote:
Hi internals
I'm opening the discussion for the RFC "array_first() and
array_last()".
https://wiki.php.net/rfc/array_first_last
Kind regards
Niels
Hi,
Do you think it would be hard or wrong to add `array_nth`? I've had more
trouble with that as th
Hello,
Sorry, but I've got another idea. I already validated it with ChatGPT who
labeled it spicy. After clarifying some misunderstandings, they updated the
label to "heretical". I hope you'll find it exciting as well.
As you're all aware, classes in PHP are literally unusable and impossibl
On 2025-04-27 08:42, Larry Garfield wrote:
There's two key problems with exceptions as PHP currently has them:
1. Creating and attaching the backtrace to them is stupidly expensive.
It's one of the most expensive things you can ask the engine to do, I
think.
Would an EmptyBacktraceException so
On 2025-04-29 17:29, Matthew Weier O'Phinney wrote:
* Exceptions should not be used for normal application logic flow. If
the "error" is recoverable and/or expected, use a different mechanism
so you can use standard conditional branching.
As such, there are a lot of situations where I may not
Hi,
Reading this as a PHP dev is confusing (terminology-wise) because errors
used to be the fatal ("stop the world") conditions while exceptions were the
catchable, recovarable issues within some call - feels to me pretty
equivalent to what you're proposing here.
What's the problem with PHP excep
Hi,
A recent discussion brought up the need for multiple constructors for the
same class.
https://externals.io/message/126428
The need was mostly answered by suggestions to use factory methods.
However on an earlier discussion it was discussed how it's fine and even
useful for constructor
On 2025-02-18 19:31, Rob Landers wrote:
On Tue, Feb 18, 2025, at 17:52, Juris Evertovskis wrote:
Hi,
A recent discussion brought up the need for multiple constructors for
the same class.
https://externals.io/message/126428
The need was mostly answered by suggestions to use factory
On 2025-03-07 01:48, Rob Landers wrote:
They're not 100% arbitrary, but mostly due to technical limitations.
- One level deep: Nesting multiple levels results in ambiguous grammar.
- As a parent class: This also results in ambiguity.
- Abstract: If it cannot be a parent class, it doesn't make s
Hi all,
It's almost awkward to bother the list with this humble RFC amidst so many
exciting proposals :)
With help from Ilija and Niels the implementation is now working and tested,
so the RFC seems getting closer to the voting phase.
Ilija raised a point about optional interfaces not b
On 2025-03-06 10:04, Tim Düsterhus wrote:
- I don't understand the use of `private` properties. Given that the
classes cannot have methods, they would be inaccessible, no?
I think the RFC was a bit unclear on this. Short classes can have
methods. The short syntax just doesn't provide the abil
Hi,
Maybe I didn’t read the RFC carefully enough, but… Do any of these features
require the other one?
I’m asking because I wouldn’t want to see them both denied just because the
voters disagree with one of them.
Good luck with this proposal!
Juris
Hey,
Just a headsup that I plan to start the vote in a couple of days. Please let
me know if there are concerns that might affect your stance on this
proposal.
https://wiki.php.net/rfc/optional-interfaces
BR,
Juris
-Original Message-
From: Tim Düsterhus
Sent: Sunday, February 23, 2025 5:05 PM
To: Máté Kocsis
Cc: Internals
Subject: Re: [PHP-DEV] [RFC] [Discussion] Add WHATWG compliant URL parsing
API
> Naming of `WhatWgError` and `WhatWgErrorType`. They are placed within the
`Uri\WhatWg` namespace
-Original Message-
From: Calvin Buckley
Sent: Thursday, March 27, 2025 11:19 PM
To: php internals
Subject: [PHP-DEV] Using a cross-platform glob implementation on all
platforms
> CI is currently passing with this.
Hi,
It looks like you didn't have to adjust any tests. Can you clarify
Hello,
The voting has concluded with 15 votes in favor and 19 against. As such, the
RFC has been declined.
https://wiki.php.net/rfc/optional-interfaces
Thank you all for taking the time to consider the proposal and casting your
votes. I'm especially grateful to those who helped refine t
On 2025-04-01 13:27, Tim Düsterhus wrote:
Is this intended as a serious proposal? I've stopped reading halfway
through, because depending on how the proposal is intended to be
perceived, the appropriate response and the amount of reasonable time
to
spend on it would differ.
Hi,
I'm abusing t
Hi,
I'd like to add a bit to the harmful/useful debate.
While writing a `->setAccessible(true)` is not harmful per se, it's a clear
indication one is following an outdated example/tutorial. New code should never
contain it, not even for consistency (which could be argued for `__sleep()` if
you
-Original Message-
From: Eric Norris
Sent: Thursday, June 26, 2025 7:25 PM
To: PHP internals
Subject: [PHP-DEV] [RFC][DISCUSSION] Object-oriented curl API v2
> I'd like to formally propose a restart of the original object-oriented curl
> API RFC
Cool. Calling functions with object as
Hey,
> if you are not going to call ReflectionAttribute::newInstance(), then you
> don't
> really need to mark the trait/interface/enum/abstract class as an attribute.
Personally I never knew the `#[\Attribute]` is only required to do
`->newInstance()`.
The docs make it seem like it’s
36 matches
Mail list logo