Skip to content

docs(php-sample-app): clarify build.sh is always required#263

Closed
Kyle-Neale wants to merge 1 commit into
masterfrom
kyle.neale/php-sample-app-readme-fix
Closed

docs(php-sample-app): clarify build.sh is always required#263
Kyle-Neale wants to merge 1 commit into
masterfrom
kyle.neale/php-sample-app-readme-fix

Conversation

@Kyle-Neale

Copy link
Copy Markdown
Contributor

The sample app's README currently frames ./build.sh as needed "so the app can be staged on offline Cloud Foundry environments" — implying it's optional online. In practice it's always required, because php_buildpack's own composer install writes to lib/vendor/, but htdocs/index.php loads ../vendor/autoload.php (i.e. ./vendor/). Without build.sh the app boots with PHP Fatal error: Failed opening required '/home/vcap/app/htdocs/../vendor/autoload.php'.

This PR tightens the wording to state the autoload requirement up front and keeps the offline-staging note as a secondary benefit.

Surfaced while verifying #257 on TAS 10.4 (bark-12516): an initial push without build.sh returned HTTP 500 for that exact reason.

@Kyle-Neale
Kyle-Neale requested a review from a team as a code owner May 28, 2026 21:59
@github-actions github-actions Bot added the documentation Documentation related changes label May 28, 2026
@Kyle-Neale Kyle-Neale added the changelog/no-changelog Changes don't appear in changelog label Jun 1, 2026
@Kyle-Neale

Copy link
Copy Markdown
Contributor Author

Superseded by #257, which fixes the underlying vendor-path mismatch rather than documenting it as a permanent constraint.

Pinned composer's vendor-dir to lib/vendor in composer.json and updated htdocs/index.php to require from that path — so php_buildpack's staging-time composer install and the sample app now agree on where the autoloader lives. cf push works standalone in online envs, verified today on page-13163. The original README wording (build.sh needed only for offline envs) is accurate again with #257 applied.

@Kyle-Neale Kyle-Neale closed this Jul 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/no-changelog Changes don't appear in changelog documentation Documentation related changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant