Skip to content

Conversation

@pmmaga
Copy link
Contributor

@pmmaga pmmaga commented Mar 10, 2017

A child class should be able to restrict visibility on the constructor. Given that the number of required parameters is already not enforced, I believe the visibility should also not be enforced.

Link for bugsnet: https://bugs.php.net/bug.php?id=61970

This doesn't cause any BC break as it is lifting a current restriction.

@pmmaga pmmaga force-pushed the bug-61970 branch 3 times, most recently from 3e68c04 to bea8d2d Compare March 11, 2017 00:15
@krakjoe krakjoe added the Bug label Mar 11, 2017
@nikic nikic added Feature and removed Bug labels Mar 11, 2017
@nikic
Copy link
Member

nikic commented Mar 11, 2017

How does this handle the case where the ctor is specified in a interface / abstract method?

@pmmaga
Copy link
Contributor Author

pmmaga commented Mar 12, 2017

Thanks for the heads up. I was lifting the restriction for those as well. I've fixed it and added tests to cover those cases.

@nikic
Copy link
Member

nikic commented May 1, 2017

Merged as 5324fb1 into master, thanks!

@nikic nikic closed this May 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants