Skip to content

Base the install command on package-tools' InstallCommand - #18

Merged
imanimanyara merged 1 commit into
mainfrom
refactor/install-command-package-tools-base
Oct 5, 2026
Merged

imanimanyara merged 1 commit into
mainfrom
refactor/install-command-package-tools-base

Conversation

@imanimanyara

Copy link
Copy Markdown
Member

Applies decision 6 (the pattern merged in laranail/captcha#24).

  • InstallCommand now extends Simtabi\Laranail\Package\Tools\Commands\InstallCommand and uses laranail/console's InteractsWithConsoleServices and InteractsWithConsoleWriter traits. No new dependency direction.
  • Signature and description move into constants; the constructor passes hidden: false so the command stays listed, restores the original description, and boots console support eagerly.
  • The provider binds the command in packageRegistered(), since the new base takes the Package.
  • tests/Feature/InstallCommandContractTest.php pins name, aliases, description, visibility, definition, output lines and exit code. Behaviour assertions passed on the old base; the inheritance assertion failed there and passes now.

Local: Pest 99 passed, PHPStan clean, Pint (shared laranail config) clean, Rector dry-run clean.

Decision 6: the install command subclasses laranail/package-tools' InstallCommand and keeps laranail/console's display API through its two traits, so neither package depends on the other. A contract test pins the name, description, visibility, definition, output and exit code against the old base.
Copilot AI balanced review requested due to automatic review settings October 5, 2026 09:21

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@imanimanyara
imanimanyara merged commit 793a5ce into main Oct 5, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants