diff --git a/composer.json b/composer.json index 86db3a64..ddb51682 100644 --- a/composer.json +++ b/composer.json @@ -49,7 +49,7 @@ }, "conflict": { "doctrine/dbal": "<3.0", - "doctrine/doctrine-orm-module": "<4.1", + "doctrine/doctrine-orm-module": "<6.3.0", "laminas/laminas-mvc": "<3.8", "laminas/laminas-servicemanager": "<3.10", "mezzio/mezzio": "<3.20.1", @@ -57,7 +57,7 @@ }, "require-dev": { "doctrine/dbal": "^3.9.3", - "doctrine/doctrine-orm-module": "^4.2.1 || ^5.3", + "doctrine/doctrine-orm-module": "^6.3.0", "kahlan/kahlan": "^6.1", "laminas/laminas-cli": "^1.11", "laminas/laminas-coding-standard": "^3.0", diff --git a/spec/Fixture/LaminasCacheModule.php b/spec/Fixture/LaminasCacheModule.php new file mode 100644 index 00000000..d6ef0937 --- /dev/null +++ b/spec/Fixture/LaminasCacheModule.php @@ -0,0 +1,38 @@ + */ + public function getConfig(): array + { + $configProvider = new LaminasCacheConfigProvider(); + + // laminas-cache exposes its ServiceManager wiring under the `dependencies` key. + // Laminas MVC consumes `service_manager`, so we map it here. + // + // Also include the installed adapter packages' delegators so the AdapterPluginManager + // knows how to create the configured adapters (e.g. Memory, Filesystem). + $serviceManagerConfig = $configProvider->getDependencyConfig(); + $serviceManagerConfig['delegators'][AdapterPluginManager::class] ??= []; + $serviceManagerConfig['delegators'][AdapterPluginManager::class] = array_values(array_unique(array_merge( + $serviceManagerConfig['delegators'][AdapterPluginManager::class], + [ + MemoryAdapterPluginManagerDelegatorFactory::class, + FilesystemAdapterPluginManagerDelegatorFactory::class, + ] + ))); + + return [ + 'service_manager' => $serviceManagerConfig, + ]; + } +} diff --git a/spec/Integration/IntegrationViaErrorPreviewConsoleCommandWithDoctrineORMModuleSpec.php b/spec/Integration/IntegrationViaErrorPreviewConsoleCommandWithDoctrineORMModuleSpec.php index 51141108..0bcbe4e9 100644 --- a/spec/Integration/IntegrationViaErrorPreviewConsoleCommandWithDoctrineORMModuleSpec.php +++ b/spec/Integration/IntegrationViaErrorPreviewConsoleCommandWithDoctrineORMModuleSpec.php @@ -4,6 +4,7 @@ use Doctrine\ORM\EntityManager; use ErrorHeroModule\Command\Preview\ErrorPreviewConsoleCommand; +use ErrorHeroModule\Spec\Fixture\LaminasCacheModule; use Laminas\Mvc\Application; use Symfony\Component\Console\Tester\CommandTester; @@ -14,6 +15,7 @@ $application = Application::init([ 'modules' => [ 'Laminas\Router', + LaminasCacheModule::class, 'DoctrineModule', 'DoctrineORMModule', 'ErrorHeroModule',