Welcome! Log In Create A New Profile

Advanced

[PHP-DEV] [RFC][VOTE] Parameter Type Widening

Posted by Niklas Keller 
Niklas Keller
[PHP-DEV] [RFC][VOTE] Parameter Type Widening
January 10, 2017 09:40AM
Resenting due to mailing list failure yesterday.

----

Morning Internals,

I just opened the vote on "Parameter Type Widening", initially named
"Parameter No Type Variance".

RFC: http://wiki.php.net/rfc/parameter-no-type-variance

Voting will keep open for three weeks and close on 30th of January,
probably in the evening of UTC.

You can find an excerpt of the RFC below.

----

PHP currently doesn't allow any variance of parameter types when checking
whether a method implemented in a class is compatible with the method
defined either in the parent class or interface.

This RFC proposes to allow omitting a type entirely in a subclass, as
dropping all parameter constraints is always valid according to the
contravariance rule.

Implementing this RFC would allow libraries to be upgraded to use type
declarations in their method signatures. Currently adding types to a method
of a class in a library would break any code that extends that class.

This would provide an easier upgrade path for libraries to start using
scalar types, to replace manual checks being done inside the methods,
without requiring an update for all sub-classes.

----

Kind Regards and Happy Voting,
Niklas Keller
Christoph M. Becker
[PHP-DEV] Re: [RFC][VOTE] Parameter Type Widening
January 10, 2017 01:00PM
On 10.01.2017 at 09:33, Niklas Keller wrote:

> I just opened the vote on "Parameter Type Widening", initially named
> "Parameter No Type Variance".
>
> Voting will keep open for three weeks and close on 30th of January,
> probably in the evening of UTC.

The RMs asked to postpone any votings for now, because of the current
mailing list issues, see news DOT php DOT net SLAHS php DOT internals
SLASH 97658.

--
Christoph M. Becker

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
Niklas Keller
Re: [PHP-DEV] Re: [RFC][VOTE] Parameter Type Widening
January 10, 2017 04:40PM
>
> On 10.01.2017 at 09:33, Niklas Keller wrote:
>
> > I just opened the vote on "Parameter Type Widening", initially named
> > "Parameter No Type Variance".
> >
> > Voting will keep open for three weeks and close on 30th of January,
> > probably in the evening of UTC.
>
> The RMs asked to postpone any votings for now, because of the current
> mailing list issues, see news DOT php DOT net SLAHS php DOT internals
> SLASH 97658.


I know, I wasn't really at my desktop until just now. I have stopped the
voting for now, even if everything seems to be resolved since
http://news.php.net/php.internals/97653.

Regards, Niklas
Sorry, only registered users may post in this forum.

Click here to login