improve the Application::bootstrapWith hook to find Laravel's application name #3036
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.
Description
As per #3034 this fixes the scenario in which a Laravel 11+ application does not have the config/app.php file and when in this file is not specified the "name" key (using the default from vendor/laravel/framework/config/app.php).
I was trying to cover my code with test but I cannot execute the test suite, it cannot execute some build using make due to lack of permissions 🤷♂️ .
The new behaviour from Laravel config loader is here: https://github.com/laravel/framework/blob/11.x/src/Illuminate/Foundation/Bootstrap/LoadConfiguration.php#L189
This is the default config:
https://github.com/laravel/framework/blob/11.x/config/app.php#L19
Fixes #3034
Reviewer checklist