Repository navigation
fix(adapters): copy vendor/ into the PHP asset stage so package CSS resolves - #467
Merged
Hydralerne merged 3 commits intoSep 16, 2026
Conversation
…esolves The generated PHP Dockerfile compiles front-end assets in a separate Node stage that never receives the Composer vendor/ tree. Any Laravel app whose CSS pulls from a Composer package — Flux, Filament, or anything that ships a stylesheet — dies at `npm run build` with `Can't resolve ../../vendor/livewire/flux/dist/flux.css`. generatePhpDockerfile emits a `builder` (Composer) stage, an optional node:* asset stage, and the FrankenPHP runtime. The asset stage's `COPY . /workspace` brings the repo but not vendor/ (git-ignored, so never in the build context). resources/css/app.css @imports package CSS straight out of vendor/, and Tailwind 4 @source-scans it — both resolved by npm run build, which then fails. Copy vendor/ from the builder into the asset stage before the build. Reuses sourceDir so a rootDirectory monorepo sub-app copies the right path, and is guarded on installLine (vendor/ exists only when composer install ran).
Hydralerne
changed the base branch from
main
to
feat/bugfix-batch-2026-09-16
September 16, 2026 00:48
Hydralerne
merged commit Sep 16, 2026
d8dbf53
into
oblien:feat/bugfix-batch-2026-09-16
8 checks passed
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.
PHP asset builds could not resolve stylesheets supplied by Composer packages because the Node stage copied only the source context. The asset stage now copies the completed builder workspace, including installed packages and generated files, before running the JavaScript build.
Adapted the original contributor fix for #892 while retaining its history. Reusing the whole workspace handles ordinary vendor directories, custom Composer vendor-dir settings, monorepo sub-applications and disabled/custom install commands without requiring a hard-coded vendor path or a second context copy.
Validation: 33 Dockerfile recipe tests pass. Two real Docker builds execute the generated asset stage with an installer-created stylesheet, covering a root application and a monorepo/custom dependency path; both fail with main’s recipe and pass after the fix. The fixture supplies the installer output; these tests do not compile PHP extensions. API TypeScript passes.
Fixes #501 when #892 merges into main.