Skip to content

[Feat] [4.x] Composer as tooling#1135

Open
RichardAnderson wants to merge 1 commit into
vitodeploy:4.xfrom
RichardAnderson:feat/composer-tooling
Open

[Feat] [4.x] Composer as tooling#1135
RichardAnderson wants to merge 1 commit into
vitodeploy:4.xfrom
RichardAnderson:feat/composer-tooling

Conversation

@RichardAnderson
Copy link
Copy Markdown
Member

Introduces composer as a site level tool.

@RichardAnderson RichardAnderson changed the title [Feat] Composer as tooling [Feat] [4.x Composer as tooling May 27, 2026
@RichardAnderson RichardAnderson changed the title [Feat] [4.x Composer as tooling [Feat] [4.x] Composer as tooling May 27, 2026
@RichardAnderson RichardAnderson requested a review from Copilot May 30, 2026 22:22
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Moves Composer from a global PHP-service install into a per-site tooling item managed alongside Node/Pnpm/Yarn, and replaces the multi-tooling picker on PHP/Laravel/PHP-Blank create forms with a single JavaScript package-manager selector.

Changes:

  • Add ComposerTooling (installs Composer to $HOME/.local/vito/bin, registered via ToolingServiceProvider); composer install now resolves Composer from PATH via SiteShellEnvironment.
  • Make Composer required tooling for PHPSite/Laravel/PHPBlank (always installed at latest supported version), and override createTimeTools/requiredTooling to [] for Wordpress and PHPMyAdmin.
  • Replace the generic developer-tooling field with a package_manager tooling selector (Node/pnpm/yarn) and remove global Composer install from PHP::install and InstallServer.

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated no comments.

Show a summary per file
File Description
app/Tooling/ComposerTooling.php New site-level Composer tooling implementation.
app/Providers/ToolingServiceProvider.php Registers ComposerTooling.
app/SSH/OS/Composer.php Uses SiteShellEnvironment so composer install finds Composer on PATH.
resources/views/ssh/composer/install.blade.php New install script: per-user Composer with sha384 verify and .bashrc/.profile PATH activation.
resources/views/ssh/composer/uninstall.blade.php New uninstall script removing the binary and PATH activation lines.
resources/views/ssh/composer/composer-install.blade.php Quotes cd path; uses composer from PATH instead of /usr/local/bin/composer.
resources/views/ssh/services/php/install-composer.blade.php Removed; no longer install Composer globally as part of PHP service.
app/Services/PHP/PHP.php Drops installComposer() from PHP service install.
app/Actions/Server/InstallServer.php Removes the per-PHP-service Composer install step.
app/SiteTypes/PHPSite.php Adds Composer to create-time/required tooling and derives tooling versions from package_manager.
app/SiteTypes/Wordpress.php Overrides createTimeTools/requiredTooling to [].
app/SiteTypes/PHPMyAdmin.php Overrides createTimeTools/requiredTooling to [].
app/Providers/SiteTypeServiceProvider.php Replaces tooling field with package_manager selector for PHP/PHP-Blank/Laravel.
app/DTOs/DynamicField.php toolingSelector gains explicit default and allowNone support.
tests/Feature/SiteToolingTest.php New tests covering Composer registration, defaults, install/uninstall, and required-tooling rejection.
tests/Feature/PHPTest.php New test asserting PHP service install no longer fetches Composer globally.

@RichardAnderson RichardAnderson marked this pull request as ready for review May 30, 2026 22:32
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