Skip to content

Conversation

@warcooft
Copy link
Contributor

Description
This PR improves how configuration values are merged during registrar discovery. Previously, nested configuration arrays (e.g., globals['before']) were being overwritten because the merging process used array_merge(), which only works at the top level. As a result, any registrar attempting to append or modify nested config values would unintentionally replace the entire subtree.

This ensures that nested configuration arrays are merged correctly without overwriting existing keys, providing more predictable and safer behavior for external packages and modules that rely on registrars.

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value (without duplication)
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@neznaika0
Copy link
Contributor

See #9231 and #9445

@neznaika0
Copy link
Contributor

We didn't make the right decision. And this is BC, in 4.7 with the update of the docs and tests.
I think we should just discuss it in the existing issue.

@michalsn michalsn added breaking change Pull requests that may break existing functionalities wrong branch PRs sent to wrong branch labels Nov 16, 2025
@warcooft
Copy link
Contributor Author

See #9231 and #9445

We didn't make the right decision. And this is BC, in 4.7 with the update of the docs and tests. I think we should just discuss it in the existing issue.

Understandable, thankyou!

@warcooft warcooft closed this Nov 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking change Pull requests that may break existing functionalities wrong branch PRs sent to wrong branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants