Skip to content

Conversation

@JohnVillalovos
Copy link
Collaborator

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.

Copilot AI review requested due to automatic review settings February 10, 2026 20:10
@JohnVillalovos
Copy link
Collaborator Author

It now looks like this:

image

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@JohnVillalovos JohnVillalovos merged commit c996aa5 into develop Feb 10, 2026
17 checks passed
@JohnVillalovos JohnVillalovos deleted the jlvillal/no_composer branch February 10, 2026 20:30
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