On Tue, Apr 7, 2020 at 2:45 PM Nikita Popov wrote:
> Hi internals,
>
> It's been a few years since I originally brought up the named parameters
> RFC: https://wiki.php.net/rfc/named_params
>
> This topic has recently come up as part of
> https://externals.io/message/109220 again, in particular wi
On Thu, Apr 9, 2020 at 7:21 AM Stanislav Malyshev
wrote:
> Hi!
>
> > 2. Throw a notice if a parameter name is changed. While LSP violations
> are
> > normally fatal errors (in PHP 8), we could use a lower-severity
> diagnostic
> > for this case, that allows code to still run, but makes developers
On Tue, Apr 7, 2020 at 2:45 PM Nikita Popov wrote:
>
> ## LSP checks for parameter names
>
> Parameter names currently have no particular significance in PHP, only
> their position in the signature is important. If named parameters are
> introduced (in a way that does not require opt-in at the dec
Hi!
> 2. Throw a notice if a parameter name is changed. While LSP violations are
> normally fatal errors (in PHP 8), we could use a lower-severity diagnostic
> for this case, that allows code to still run, but makes developers aware of
> the problem. (It should be noted that automatic fixup of par
Le mardi 7 avril 2020, 14:44:38 CEST Nikita Popov a écrit :
> The larger problem is that internal functions don't have a well-defined
> concept of parameter default value. Parameter defaults are implicit in C
> code, and sometimes based on argument count checks. When named parameters
> are involved
On 07/04/2020 13:44, Nikita Popov wrote:
Make named-parameter opt-in in some fashion, so that parameter names
only need to be preserved for methods that have the opt-in marker. I'm not
a fan of this, as it greatly diminishes the practical usefulness of named
parameters.
I generally prefer the
On Tue, Apr 7, 2020 at 6:45 AM Nikita Popov wrote:
>
> ## LSP checks for parameter names
>
> Parameter names currently have no particular significance in PHP, only
> their position in the signature is important. If named parameters are
> introduced (in a way that does not require opt-in at the dec