Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Config stub does not match default config file. Causes error when using dontMergeFrameworkConfiguration() #51736

Closed
MaxGiting opened this issue Jun 7, 2024 · 0 comments · Fixed by #51751
Labels

Comments

@MaxGiting
Copy link
Contributor

Laravel Version

11.1.1

PHP Version

8.2.13

Database Driver & Version

No response

Description

When publishing all configuration files the stub for app.php does not contain all used keys.
Should the stubs contain everything that is required?

I found this issue because I am using the new dontMergeFrameworkConfiguration() app setting.
To use this setting I believe you must publish all config files and maintain them yourself.
But once you have done that you get errors as there are missing config keys.

if you run composer install after publishing all config files and using the setting dontMergeFrameworkConfiguration(), this error is produced.

In RegisterProviders.php line 59:

  array_merge(): Argument #1 must be of type array, null given

The below repository is a new Laravel install with all config published that shows it errors when running composer install
https://github.com/MaxGiting/publish-config-example

Steps To Reproduce

  1. New Laravel install composer create-project laravel/laravel publish-config-example
  2. Publish all config files php artisan config:publish --all --force
  3. Turn off config merging with dontMergeFrameworkConfiguration() MaxGiting/publish-config-example@ced8045
  4. Run composer install
crynobone added a commit that referenced this issue Jun 10, 2024
@crynobone crynobone added the bug label Jun 10, 2024
taylorotwell pushed a commit that referenced this issue Jun 10, 2024
…` set to `true` (#51751)

* [11.x] Fixes `config:publish` with `dontMergeFrameworkConfiguration()`
set to `true`

fixes #51736

Signed-off-by: Mior Muhammad Zaki <[email protected]>

* wip

Signed-off-by: Mior Muhammad Zaki <[email protected]>

* wip

Signed-off-by: Mior Muhammad Zaki <[email protected]>

* Apply fixes from StyleCI

* wip

Signed-off-by: Mior Muhammad Zaki <[email protected]>

* wip

Signed-off-by: Mior Muhammad Zaki <[email protected]>

* wip

Signed-off-by: Mior Muhammad Zaki <[email protected]>

* wip

Signed-off-by: Mior Muhammad Zaki <[email protected]>

* Apply fixes from StyleCI

* wip

Signed-off-by: Mior Muhammad Zaki <[email protected]>

* wip

Signed-off-by: Mior Muhammad Zaki <[email protected]>

* wip

Signed-off-by: Mior Muhammad Zaki <[email protected]>

* Update ConfigPublishCommandTest.php

* Apply fixes from StyleCI

* Update composer.json

* Update composer.json

* Update ConfigPublishCommandTest.php

* Update composer.json

* wip

Signed-off-by: Mior Muhammad Zaki <[email protected]>

---------

Signed-off-by: Mior Muhammad Zaki <[email protected]>
Co-authored-by: StyleCI Bot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants