ci: run composer commands with sudo in plugin CI workflow - #359
Merged
Merged
Conversation
The Pest install step in .github/workflows/plugin-ci-workflow.yml now runs composer config, composer require, rm, and composer install with sudo so the step can write to directories owned by another user in the CI runner. Also drop the deprecated --dev flag from composer require.
TheWitness
requested review from
bmfmancini and
xmacan
and
a lite review from Copilot
September 18, 2026 05:37
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Composer plugin execution and production-versus-development dependency handling need correction.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
This pull request updates the plugin CI workflow to run Composer operations with elevated permissions and adjusts Pest dependency installation.
Changes:
- Adds
sudoto Composer and lockfile commands. - Removes the deprecated
--devflag fromcomposer require.
File summaries
| File | Description |
|---|---|
.github/workflows/plugin-ci-workflow.yml |
Adjusts Composer dependency installation in CI. |
Review details
Suppressed comments (1)
.github/workflows/plugin-ci-workflow.yml:134
- Removing
--devchanges Composer's target section:composer requirewill add these test-only packages torequire, while the latercomposer install --devonly controls what is installed and does not move them back torequire-dev. Keep the dev flag (or use the supported equivalent) so the CI-only Pest dependencies are not recorded as production requirements.
sudo composer require --no-progress --no-interaction "pestphp/pest: ^3" "pestphp/pest-plugin-drift: ^3.0"
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
bmfmancini
previously approved these changes
Sep 18, 2026
bmfmancini
left a comment
Member
There was a problem hiding this comment.
LGTM - thanks @TheWitness.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
bmfmancini
previously approved these changes
Sep 18, 2026
bmfmancini
approved these changes
Sep 18, 2026
xmacan
approved these changes
Sep 18, 2026
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.
Summary
The
Install Composer Dependenciesstep in.github/workflows/plugin-ci-workflow.ymlrancomposer config,composer require,rm, andcomposer installwithoutsudo. Recent changes to the CI runner mean these commands need elevated permissions to write to the sharedcacticheckout, so the step was failing.Changes
composer config,composer require,rm -f composer.lock, andcomposer installwithsudoin the Pest install step.--devflag fromcomposer require(Composer no longer supports it onrequire).Before
After