Ability to add new required arguments #8242
brandonkelly
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
|
Adding a new parameter to a method signature itself does not seem very useful. The harder question would be, to fix all the call-sites. since you are adding a new non defaulting param, you need to adjust every call. Without more context and constraints this seems undoable from a logic point of view |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Rector\Arguments\ValueObject\ArgumentAdderrequires that you specify a default value for the argument.Related to #8240, it would be nice if there was a
RequiredArgumentAdderalternative that could be used to add a new argument without a default value.$someObject = new SomeExampleClass; $someObject->someMethod(); class MyCustomClass extends SomeExampleClass { - public function someMethod() + public function someMethod(SomeType $someArgument) { } }Beta Was this translation helpful? Give feedback.
All reactions