Skip to content

Release 2.5.1: avoid starting containers when configuring Composer cache - #256

Merged
defunctl merged 2 commits into
mainfrom
release/2.5.1
Oct 2, 2026
Merged

defunctl merged 2 commits into
mainfrom
release/2.5.1

Conversation

@defunctl

@defunctl defunctl commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Release testing

This prepares 2.5.1 for testing against release/2.5.1. The CLI version is bumped to 2.5.1, and the release date remains TBD while we validate consuming projects.


Main Changes

slic composer-cache set previously offered to restart the PHP services and defaulted to yes in noninteractive mode. On a fresh CI runner, that could start the stack before slic use selected the project's PHP version. Applying that version afterward could require additional image downloads and container recreation.

The cache command now saves the setting and checks which PHP services are running:

  • If neither service is running, it finishes without prompting or starting containers.
  • If slic, wordpress, or both are running, it offers to recreate only those services with the updated cache mount.
  • Recreation uses --no-deps, leaving stopped services and dependencies alone. Compose failures are reported and return a nonzero exit status.

This applies to both composer-cache set and unset.


CI setup

Configure the cache and stage the desired PHP version before selecting the project:

slic composer-cache set /path/to/composer-cache
slic php-version set 8.3 --skip-rebuild
slic use my-plugin

The first two commands configure the next startup without starting containers. slic use then applies the selected PHP version. Projects can also declare their PHP version in slic.json or .env.slic.local instead of staging a matrix version explicitly.

This fixes premature startup from the cache command. It does not change how slic use handles mount and PHP changes on an already-running stack.


Testing

  • Temporary checks passed for set and unset with no PHP services running, either service running individually, and both running.
  • Verified accepting and declining the recreation prompt, and that a recreation failure returns Compose's exit status.
  • PHP syntax checks and git diff --check passed.

The behavior checks stubbed container operations; consuming-project CI validation remains outstanding. Temporary test files are not included in this PR.

Summary by CodeRabbit

  • New Features
    • Composer cache settings can be saved while the stack is stopped, without starting it. The settings apply the next time PHP services start.
    • If PHP services are running, you can choose to recreate only those services to apply the setting. Stopped services and dependencies are left untouched.
    • If you decline recreation, the saved setting remains and applies after the services are recreated.
  • Other
    • Updated the CLI version to 2.5.1.

@defunctl defunctl self-assigned this Sep 30, 2026
@coderabbitai

coderabbitai Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Enterprise

Run ID: 748c877c-472b-4acb-9a34-5fa817b1dc5d

📥 Commits

Reviewing files that changed from the base of the PR and between 62b68a0 and b364d42.

📒 Files selected for processing (1)
  • changelog.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • changelog.md

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.


📝 Walkthrough

Walkthrough

The composer-cache command saves settings without starting stopped services. If PHP services are running, it can recreate only those services to apply the cache mount. The CLI version and changelog are updated to 2.5.1.

Changes

Composer cache settings

Layer / File(s) Summary
Save and apply composer-cache settings
src/slic.php, slic.php, changelog.md
The handler reports when the setting will apply on a later service start. If PHP services are running, it offers to recreate only those services and reports command failures. The CLI version and changelog are updated to 2.5.1.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: d4mation

Merge Risk: ⚪ Minimal · up to b364d

The Composer-cache change is ready to merge after normal checks; no concrete issue remains from the reviewed changes.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: avoiding container startup when configuring the Composer cache.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files. (1 skipped: 1 …
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


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

@defunctl
defunctl marked this pull request as ready for review September 30, 2026 22:41
@defunctl
defunctl merged commit 1cea334 into main Oct 2, 2026
50 checks passed
@defunctl
defunctl deleted the release/2.5.1 branch October 2, 2026 15:56
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.

3 participants