-
-
Notifications
You must be signed in to change notification settings - Fork 36
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
InvalidConfigProviderException: Mezzio\Helper\ConfigProvider is registered more than once #161
Comments
Removing line 19 \Mezzio\Helper\ConfigProvider::class from config\config.php should fix the issue. This fixed my issue with the current skeleton. |
We cannot remove ConfigProviders from config/config.php because, depending how the project is installed, one might choose not to inject ConfigProviders into config/config.php, leading to the opposite of the current situation where ConfigProviders are not registered at all. |
Maybe the renaming under version 3 of laminas-component-installer is the problem: laminas/laminas-component-installer#52 See: https://docs.laminas.dev/laminas-component-installer/#marking-packages-to-auto-install |
I can confirm @matthewpallotta's solution:
Thank you, Matthew! P.S.: Haven't ran a full test yet (meaning, running the actual application), will update this soon to let you know. |
The title and description of this issue are horrible for SEO So let me spell the actual error: InvalidConfigProviderException: Mezzio\Helper\ConfigProvider is registered more than once mezzio/mezzio#203Fatal error: Uncaught Laminas\ConfigAggregator\InvalidConfigProviderException: Mezzio\Helper\ConfigProvider is
registered more than once. Config providers should be unique. In case a specific order is required, please double
check before deleting the duplicate(s). in ***\vendor\laminas\laminas-config-aggregator\src
\InvalidConfigProviderException.php:15
Stack trace:
#0 ***\vendor\laminas\laminas-config-aggregator\src\ConfigAggregator.php(117): Laminas\ConfigAggregator\InvalidConfigProviderException::fromDuplicateProvider('Mezzio\\Helper\\C...')
#1 ***\vendor\laminas\laminas-config-aggregator\src\ConfigAggregator.php(85): Laminas\ConfigAggregator\ConfigAggregator->validateNoDuplicateProviders(Array)
#2 ***\config\config.php(16): Laminas\ConfigAggregator\ConfigAggregator->__construct(Array, 'data/cache/conf...')
#3 ***\bin\clear-config-cache.php(9): include('***\project\...')
#4 {main}
thrown in ***\vendor\laminas\laminas-config-aggregator\src\InvalidConfigProviderException.php on line 15 |
Bug Report
Summary
Clean installation results in an error after running
bin/clear-config-cache.php
Current behavior
How to reproduce
Just do a clean project creation:
composer create-project mezzio/mezzio-skeleton dir_name
Using composer's
--no-cache
flag yields the same error.Expected behavior
Finish the project creation without errors.
The text was updated successfully, but these errors were encountered: