Repository navigation
Base the install command on package-tools' InstallCommand - #37
Merged
Merged
Conversation
Owner decision 6: install commands subclass laranail/package-tools' InstallCommand and keep laranail/console's display API through its two traits, so neither package depends on the other. A contract test pins the name, option, description, visibility, output and exit codes; it passed against the old base before the change.
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.
Owner decision 6 ("traits"), the pattern proven in laranail/captcha#24.
laranail::confetti.installnow extends laranail/package-tools'InstallCommandand keeps laranail/console's display API and run lifecycle by using itsInteractsWithConsoleServicesandInteractsWithConsoleWritertraits. No new dependency direction: both packages were already required.Package, passeshidden: false(the command was listed before), restores the description the base overwrites, and boots console support.packageRegistered()because the container cannot autowirePackage; still registered by class name inhasCommands().handle()'sConfettiConfigparameter is now optional (?ConfettiConfig $config = null), because a required parameter would be an incompatible override of the base'shandle(): int. Artisan still method-injects it; the fallback resolves the same singleton.$commandAliaseswere set, so none to re-apply.tests/Feature/InstallCommandContractTest.phppins the name, aliases, description, listing visibility, the--forceoption, no arguments, every output line in both asset modes, and the exit code. The behaviour assertions passed against the old base before the change; the inheritance assertion failed there and passes now.Local: Pest 188 passed, PHPStan clean, Pint clean, Rector clean, lint greps clean.