Skip to content

Fix GitHub Actions setup-composer fallback lockfile handling (#342)#343

Merged
coisa merged 3 commits into
mainfrom
chore/342-relax-composer-fallback-runtime-no-lock
May 12, 2026
Merged

Fix GitHub Actions setup-composer fallback lockfile handling (#342)#343
coisa merged 3 commits into
mainfrom
chore/342-relax-composer-fallback-runtime-no-lock

Conversation

@coisa
Copy link
Copy Markdown
Contributor

@coisa coisa commented May 12, 2026

Summary

  • Set require-lock-file to false when setup-composer installs the fallback DevTools runtime in .github/actions/php/setup-composer/action.yml.
  • Add regression coverage in tests/GitHubActions/SetupComposerActionTest.php asserting fallback install no longer requires a lock file.
  • Add an Unreleased changelog entry for this workflow reliability fix.

Verification

  • Pre-commit hooks executed during commit:
    • composer
    • phplint
    • jsonlint
    • yamllint

Closes #342

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 12, 2026

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 1322fc65-ccdf-4df7-808f-5f47374cff9c

📥 Commits

Reviewing files that changed from the base of the PR and between 5d08d84 and 6939ef7.

📒 Files selected for processing (4)
  • .github/actions/php/setup-composer/action.yml
  • .github/wiki
  • CHANGELOG.md
  • tests/GitHubActions/SetupComposerActionTest.php

📝 Walkthrough

Summary by CodeRabbit

  • Bug Fixes

    • Relaxed GitHub Actions fallback so the DevTools runtime can be provisioned without requiring a composer.lock file in shared CI contexts.
  • Tests

    • Added a test to verify the fallback installation no longer mandates a composer.lock file.
  • Chores

    • Updated the pinned wiki subproject reference.

Walkthrough

This PR relaxes the fallback Composer install step in the shared GitHub Action to tolerate repositories without composer.lock, enabling shared workflows to execute in lockless consumer repositories. The configuration change is validated by a new test, and the fix is documented in the changelog and wiki.

Changes

Fallback Composer Install Lockfile Relaxation

Layer / File(s) Summary
Fallback Composer install configuration and test validation
.github/actions/php/setup-composer/action.yml, tests/GitHubActions/SetupComposerActionTest.php
The require-lock-file configuration in the fallback DevTools Composer install step changes from 'true' to 'false', and a new PHPUnit test method fallbackInstallShouldNotRequireComposerLockFile validates this configuration is correctly set in the action definition.
Changelog and wiki documentation updates
CHANGELOG.md, .github/wiki
The changelog under Unreleased / ### Fixed documents issue #342 and the relaxed fallback Composer install behavior for shared GitHub Actions contexts; the wiki subproject is updated to a new commit reference.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Suggested labels

enhancement

Poem

🐰 In shared workflows where lockfiles don't exist,
The composer falls back with a gentle twist.
No lock required for the bootstrap to run—
A fleeting workflow, yet deterministic and fun!
The wiki and changelog both sing the refrain,
One small config change, no pipeline pain. 🌱

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/342-relax-composer-fallback-runtime-no-lock

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 12, 2026

@coisa coisa merged commit 350d2e3 into main May 12, 2026
33 checks passed
@github-project-automation github-project-automation Bot moved this from Backlog to Released in PHP Fast Forward Project May 12, 2026
@coisa coisa deleted the chore/342-relax-composer-fallback-runtime-no-lock branch May 12, 2026 01:50
github-actions Bot added a commit that referenced this pull request May 12, 2026
@coderabbitai coderabbitai Bot added the enhancement New feature or request label May 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request github-actions

Projects

Status: Released

Development

Successfully merging this pull request may close these issues.

Relax setup-composer fallback runtime install to work without composer.lock

1 participant