Skip to content

Fix release bundle cache handling#164

Open
WesWeCan wants to merge 1 commit into
NativePHP:elementfrom
WesWeCan:fix/release-build-cache
Open

Fix release bundle cache handling#164
WesWeCan wants to merge 1 commit into
NativePHP:elementfrom
WesWeCan:fix/release-build-cache

Conversation

@WesWeCan

Copy link
Copy Markdown

Summary

  • Exclude Laravel bootstrap/cache from iOS and Android release bundle copies so stale dev package manifests are not reused after composer install --no-dev.
  • Recreate the empty bootstrap/cache directory before Composer runs so Laravel package discovery can regenerate clean metadata.
  • Make iOS fail fast when Composer install fails, matching Android's existing behavior.

Why

Release builds install Composer dependencies with --no-dev, but the bundle copy could include cached bootstrap/cache/packages.php and services.php generated from the developer dependency set. If those cached files reference dev-only providers, Composer's post-autoload scripts can fail or a broken iOS bundle can be shipped.

Test plan

  • ./vendor/bin/pest ./tests/Feature/ReleaseBuildBundleTest.php
  • ./vendor/bin/pint --dirty --format agent

Notes

  • The fix does not copy compiled cache files into the release bundle; it only preserves the required empty bootstrap/cache directory.
  • Android already checked Composer failures, so the Android change is limited to cache exclusion and directory recreation.

Made with Cursor

Exclude stale Laravel bootstrap cache files before no-dev Composer installs so release bundles regenerate package metadata against production dependencies.

Co-authored-by: Cursor <cursoragent@cursor.com>
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.

1 participant