final modifierprivateNow that 7.1 is EOL (https://secure.php.net/supported-versions.php), maybe we should bump to 7.2 add _parameter_ type declarations in a new minor? If we consider current docblocks as a contract?
๐ For adding parameter types. There is a reason why symfony won't do this in a major release...
๐ For adding return types
๐ for adding return types to final classes, but not otherwise, and not to interfaces either: https://3v4l.org/KLvG9
:-1: For adding parameter types. There is a reason why symfony won't do this in a major release...
You mean a minor release, and what's the reason?
๐ for adding return types to final classes, but not otherwise, and not to interfaces either: https://3v4l.org/KLvG9
๐ for full return / parameter types to final classes
You mean a minor release, and what's the reason?
If we add a parameter type and someone uses an other type hint, it would break:
https://3v4l.org/XBfik
Butโฆ they can't use a type declaration if we don't, that would break the LSP, and php rightfully forbids that: https://3v4l.org/eiigE
Also, we can add type declarations to private methods.
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
As explained here some interface are required/useful if we want to add final modifier to some class.
And maybe SearchHandlerInterface.