Skip to content

fix: install composer before user build steps#214

Merged
AaronFeledy merged 3 commits intomainfrom
build-fail-composer
Feb 18, 2026
Merged

fix: install composer before user build steps#214
AaronFeledy merged 3 commits intomainfrom
build-fail-composer

Conversation

@AaronFeledy
Copy link
Member

@AaronFeledy AaronFeledy commented Feb 18, 2026

Fixes #211 — composer silently missing when build_as_root fails.

Moves composer installation from build_internal to build_as_root_internal so it runs before user build steps. Adds build-fail example test to validate.


Note

Medium Risk
Changes PHP service build-step ordering by moving Composer installation earlier in the root build phase, which can affect existing projects that relied on previous sequencing. Adds a CI example to catch regressions around failed build_as_root steps.

Overview
Ensures the requested Composer version is installed via build_as_root_internal (instead of being the first build_internal step), so Composer is available even if a user build_as_root command fails.

Adds a new examples/build-fail Leia test case and includes it in the PR workflow matrix to validate Composer remains installed when build_as_root exits non-zero.

Written by Cursor Bugbot for commit 2bc3e58. This will update automatically on new commits. Configure here.

@netlify
Copy link

netlify bot commented Feb 18, 2026

Deploy Preview for lando-php ready!

Name Link
🔨 Latest commit 2bc3e58
🔍 Latest deploy log https://app.netlify.com/projects/lando-php/deploys/699631310146b50008f75cb4
😎 Deploy Preview https://deploy-preview-214--lando-php.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 80 (🔴 down 13 from production)
Accessibility: 98 (no change from production)
Best Practices: 100 (no change from production)
SEO: 100 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

Move composer installation from build_internal to build_as_root_internal
so it runs before user build_as_root commands. Previously, if a
build_as_root step failed, it would prevent composer from being installed
entirely.

Fixes #211
@AaronFeledy AaronFeledy changed the title Fix composer silently failing when build_as_root fails fix: install composer before user build steps Feb 18, 2026
@AaronFeledy AaronFeledy marked this pull request as ready for review February 18, 2026 21:27
@AaronFeledy AaronFeledy merged commit 712ecb1 into main Feb 18, 2026
44 checks passed
@AaronFeledy AaronFeledy deleted the build-fail-composer branch February 18, 2026 22:03
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.

Composer silently fails to install if a build_as_root command fails

1 participant