[Question] Using type declaration in function definitions #2183
bsacharski
started this conversation in
General
Replies: 1 comment 2 replies
-
Yes, it’s good to change. Reason mostly is legacy code. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, just wanted to ask about function definitions in the Deployer code.
Is there any specific reason why the code doesn't use type declarations in many functions?
For instance, right now we have:
From what I've seen in
composer.json
, the project requires PHP 7.3, so backwards compatibility with previous PHP versions, that may not support some declarations shouldn't be an issue.Maybe the code could be improved by adding the type declarations in the functions, for instance:
I understand that this will probably break things for some people, but given that Deployer is working towards version 7.0, it might be a good time for this change?
Beta Was this translation helpful? Give feedback.
All reactions