[make:decorator] Add new maker to create decorator - #1807
Merged
Conversation
GromNaN
force-pushed
the
feature/make-decorator
branch
3 times, most recently
from
August 28, 2026 18:34
7d87396 to
1359fc1
Compare
GromNaN
force-pushed
the
feature/make-decorator
branch
2 times, most recently
from
August 29, 2026 20:28
d9b3ca0 to
3fe7b78
Compare
Add a make:decorator command that generates a decorator class for an existing service. The maker asks for the service to decorate and the class name of the decorator, then generates a class that either implements the decorated service interfaces or extends its class. Supporting pieces: - DecoratorHelper resolves a service id from a full id or a short class name, and exposes suggestions on error. - MakeDecoratorPass fills the helper with the service ids, the service id to class map and the short class name map at compile time. - DecoratorInfo and the ClassMethod / MethodArgument models describe the methods to forward to the decorated service, including variadic parameters. - UseStatementGenerator handles the extra type imports needed by the generated methods. - Validator gains a check for existing class names. Closes symfony#1401
GromNaN
force-pushed
the
feature/make-decorator
branch
from
August 30, 2026 10:08
3fe7b78 to
ca9ce46
Compare
Member
Author
|
Thank you @WedgeSama for the initial work and @Neirda24 for the review. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rebase and continuation of #1613 by @WedgeSama, updated for the current
1.xcodebase (config moved from XML to PHP, help files restructured) and with the remaining review feedback from @Neirda24 applied:getRealId()strict comparison (in_arraywith strict mode).ReflectionClasslookup ofContainerInterfaceconstants with a static map for theonInvalidoption.Add a
make:decoratorcommand that generates a decorator class for an existing service. The maker asks for the service to decorate and the class name of the decorator, then generates a class that either implements the decorated service interfaces or extends its class.Closes #1401