feat: Generate a helpful web page if missing composer#992
feat: Generate a helpful web page if missing composer#992JohnVillalovos merged 1 commit intodevelopfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request adds a helpful error page when composer dependencies are missing, replacing generic 500 errors with clear instructions for developers. The implementation adds a new guard function that checks for vendor/autoload.php and provides context-appropriate error messages for both web browsers and API clients.
Changes:
- Added new ComposerDependenciesGuard.php file with guard function to check for composer dependencies
- Updated Web/Services/index.php to use the new guard function for API requests
- Updated Pages/Page.php to use the new guard function for web page requests, replacing old conditional loading
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| lib/ComposerDependenciesGuard.php | New file containing the guard function that checks for composer dependencies and displays appropriate error messages |
| Web/Services/index.php | Updated to call the guard function before loading other dependencies |
| Pages/Page.php | Replaced conditional vendor/autoload.php loading with the new guard function call |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
0be6368 to
c29f5c5
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
If `composer install` has not been setup yet, causing `vendor/autoload.php` to not be created, generate a helpful error message on the web page. Before the server would just generate a 500 message with no details.
c29f5c5 to
bc04dfc
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

If
composer installhas not been setup yet, causingvendor/autoload.phpto not be created, generate a helpful error message on the web page.Before the server would just generate a 500 message with no details.