Skip to content

refactor: swap laminas-config-aggregator for webware-configmanager - #18

Open
tyrsson wants to merge 2 commits into
1.0.xfrom
tyrsson-swap-configmanager
Open

tyrsson wants to merge 2 commits into
1.0.xfrom
tyrsson-swap-configmanager

Conversation

@tyrsson

@tyrsson tyrsson commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

What changed

laminas/laminas-config-aggregator is replaced with webware/webware-configmanager ^1.0.0-alpha.4, which documents a drop-in contract for it. Provider lists and their order are untouched, so the merged config is unchanged. What differs is the merger: Webware\ConfigManager\Merge\ConfigMerger::merge in place of laminas' private ConfigAggregator::mergeArray.

webware-configmanager requires brick/varexporter ^0.7.0, which forces laminas/laminas-servicemanager from 4.5.1 to 4.6.0. commondoc's ^4.5 constraint still holds. laminas/laminas-config-aggregator stays installed transitively through webware-console.

The lock on this branch also refreshes webware/webware-tools to 1.0.0, which composer.json already admitted, and which requires two call sites to pass their arguments by name.

Behavioural note

Laminas\View\ConfigProvider is aggregated after LaminasViewProvider and ThemeProvider and also declares AggregateResolver::class, so its factory wins for that key. This is unchanged by the swap and matches what laminas produced.

Require webware/webware-configmanager ^1.0.0-alpha.4 in place of the
direct laminas/laminas-config-aggregator requirement, and point the
aggregator imports at the configmanager classes.

- config/config.php: ConfigAggregator, Provider\ArrayProvider and
  Provider\PhpFileProvider now come from Webware\ConfigManager. The
  provider list, its order and its comments are unchanged.
- config/autoload/global.php and config/development.config.php.dist:
  the ConfigAggregator import only.
- src/ConfigProvider.php: the docblock claimed that
  ConfigAggregator::mergeArray keeps first-seen key order. That method
  is private in laminas and absent from configmanager, which merges
  through Webware\ConfigManager\Merge\ConfigMerger::merge. The sentence
  now names the real mechanism.
- test/integration/ContainerBootTest.php: one test covering the two
  provider order constraints documented in config/config.php.

Merged output is identical for commondoc's provider list under both
aggregators: same array, same key order, including the
AggregateResolver and EventDispatcher factories.

laminas/laminas-config-aggregator remains installed because
webware/webware-console requires it; it stays at 1.20.0.

Lock movement is forced by the new requirement: brick/varexporter
0.6.0 to 0.7.0 (configmanager requires ^0.7.0) and
laminas/laminas-servicemanager 4.5.1 to 4.6.0, because 4.5.1 excludes
varexporter 0.7.0. The php-standard-library packages moved from
require-dev to require because configmanager needs them at runtime.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@codecov

codecov Bot commented Nov 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

composer.json already admitted 1.0.0 through ^1.0.0-rc.14, so only the lock
moved: webware/webware-tools 1.0.0-rc.14 to 1.0.0, reference 8093557 to
9369090, with no other package and no content-hash change.

That package carries the Mago pin. vendor/webware/webware-tools/mago.toml now
reads version = "1.60.2" where it read 1.59.0, and the version and schema lines
are the only difference in that file. This repo's mago.toml stays extends-only.

Under 1.60.2 the enabled literal-named-argument rule resolved 12 call sites it
could not resolve at 1.59.0: 10 in tests and 2 in src/. Each one now passes the
argument by name. No baseline entry was added; both baseline files still read
issues = [].

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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