Use --no-dev for the release workflow's composer install - #1079
Merged
Conversation
The deploy job pins PHP 7.4 but installed dev dependencies too, and some of those need PHP 8, so composer failed before the build ran. Nothing in the release path uses the root vendor/ directory.
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.
Same fix as Automattic/jetpack-crm#12, which failed for exactly this reason earlier today.
The deploy job pins PHP 7.4 and runs
composer installwith dev dependencies included. Several of those need PHP 8:doctrine/instantiatorwants^8.4,symfony/stringwants>=8.4,symfony/console>=8.2,webmozart/assert^8.2andpsr/log>=8.0. None have a 7.x fallback, so composer refuses and the job dies before it reaches the build or the deploy.This hasn't bitten yet because the release workflow has never actually run here. Every run so far shows as skipped, which is the
startsWith( head_ref, 'release/' )guard doing its job on ordinary merges. The first real release would have hit it.Worth noting
composer.lockhas no runtime packages at all, so--no-devinstalls nothing and the step could be dropped entirely. I've left it in and matched the jetpack-crm fix instead, so the workflow stays identical across the plugins sharing this tooling.WP Job Manager has the same missing flag but is not affected. Its dev tree locks PHPUnit at 9.6.34 and every package there has a 7.x alternative, so it resolves fine on 7.4.