[Feat] [4.x] Composer as tooling#1135
Open
RichardAnderson wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
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 viaToolingServiceProvider);composer installnow resolves Composer fromPATHviaSiteShellEnvironment. - Make Composer required tooling for
PHPSite/Laravel/PHPBlank(always installed at latest supported version), and overridecreateTimeTools/requiredToolingto[]forWordpressandPHPMyAdmin. - Replace the generic developer-tooling field with a
package_managertooling selector (Node/pnpm/yarn) and remove global Composer install fromPHP::installandInstallServer.
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. |
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.
Introduces composer as a site level tool.