Repository navigation
Keep Laravel's command signatures and tidy the new-group notice - #2
Merged
Merged
Conversation
0.1.0 declared getStub(): string over Laravel's untyped getStub(), and configure(): void where Symfony Console 7 leaves configure() untyped, so a subclass overriding either as the framework declares it was a fatal error. getStub() is untyped again (ConfigCommand keeps ConfigMakeCommand's string). --in is now added from specifyParameters() and configureUsingFluentDefinition(), untyped in every supported Laravel, since no configure() override can match both Symfony 7 and 8. A guard test reflects every command's overrides against its framework parent, and fixture subclasses are loaded in their own process.
The "Created new <group>" notice was printed while the plan was resolved, before the native generator ran its own checks, so a command that then refused (an unknown policy guard, an invalid observer model, an unknown controller type) still announced a group it never created. The notice is now held and printed from sortImports(), which the native generator calls with the built class just before writing it; a host handle() that writes the class itself gets it once the file exists. Inside a nested group, the group's own kind folders (Billing/Controllers) were listed as existing groups when the root also places classes right in the group, as laravel-ddd's catch-all kinds do. GroupFolders now leaves out the root's kind folders at the level it inspects.
Closed
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.
Fixes found while rebuilding laravel-ddd on mod.
mod:*commands can override their methods with Laravel's own signatures again. 0.1.0 declaredgetStub(): string, andconfigure(): voidwhere Symfony Console 7 leavesconfigure()untyped, so an override without the return type was a fatal error. A new test compares every mod command method with its Laravel or Symfony parent, so a stricter signature can't come back.