Skip to content

Commit

Permalink
Issue #198: Fixed ConfigProvider injection issue
Browse files Browse the repository at this point in the history
  • Loading branch information
alexmerlin authored Aug 23, 2023
1 parent a640fff commit 0c32762
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
'config_cache_path' => 'data/cache/config-cache.php',
];

// @codingStandardsIgnoreStart
$aggregator = new Laminas\ConfigAggregator\ConfigAggregator([
Mezzio\Authorization\ConfigProvider::class,
Mezzio\Authorization\Acl\ConfigProvider::class,
Mezzio\Authorization\Rbac\ConfigProvider::class,
Mezzio\Authentication\ConfigProvider::class,
Expand All @@ -19,18 +19,27 @@
Mezzio\Hal\ConfigProvider::class,
Mezzio\ProblemDetails\ConfigProvider::class,
Mezzio\Router\FastRouteRouter\ConfigProvider::class,
Mezzio\Twig\ConfigProvider::class,
Laminas\Diactoros\ConfigProvider::class,
Laminas\InputFilter\ConfigProvider::class,
Laminas\Filter\ConfigProvider::class,
Laminas\HttpHandlerRunner\ConfigProvider::class,
Laminas\Hydrator\ConfigProvider::class,
Laminas\Log\ConfigProvider::class,
Laminas\Mail\ConfigProvider::class,
Laminas\Paginator\ConfigProvider::class,
Laminas\Validator\ConfigProvider::class,
// Include cache configuration
new Laminas\ConfigAggregator\ArrayProvider($cacheConfig),
Mezzio\Helper\ConfigProvider::class,
Mezzio\ConfigProvider::class,
Mezzio\Router\ConfigProvider::class,
class_exists(Mezzio\Tooling\ConfigProvider::class)
? Mezzio\Tooling\ConfigProvider::class
: function () {
return [];
},

// DK packages
Dot\Cli\ConfigProvider::class,
Dot\Log\ConfigProvider::class,
Expand Down Expand Up @@ -59,6 +68,5 @@
realpath(__DIR__) . '/development.config.php'
),
], $cacheConfig['config_cache_path']);
// @codingStandardsIgnoreEnd

return $aggregator->getMergedConfig();

0 comments on commit 0c32762

Please sign in to comment.