From 10f02e9729c317fdc6931442c6d15114f4460a8c Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Sat, 3 Jan 2026 23:31:35 +0700 Subject: [PATCH 1/3] Drop support of doctrine-orm-module 4.1, use ^6.3.0 --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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", From a332dcc78b045c54ed2a01743482d2aecb0ce2df Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Mon, 26 Jan 2026 03:52:28 +0700 Subject: [PATCH 2/3] tweak test --- spec/Fixture/LaminasCacheModule.php | 38 +++++++++++++++++++ ...onsoleCommandWithDoctrineORMModuleSpec.php | 2 + 2 files changed, 40 insertions(+) create mode 100644 spec/Fixture/LaminasCacheModule.php diff --git a/spec/Fixture/LaminasCacheModule.php b/spec/Fixture/LaminasCacheModule.php new file mode 100644 index 00000000..ad611d94 --- /dev/null +++ b/spec/Fixture/LaminasCacheModule.php @@ -0,0 +1,38 @@ + */ + public function getConfig(): array + { + $provider = 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 = $provider->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', From af54da04973b4b2668976f13b59ac860e49b2b91 Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Mon, 26 Jan 2026 03:54:00 +0700 Subject: [PATCH 3/3] run rector --- spec/Fixture/LaminasCacheModule.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/Fixture/LaminasCacheModule.php b/spec/Fixture/LaminasCacheModule.php index ad611d94..d6ef0937 100644 --- a/spec/Fixture/LaminasCacheModule.php +++ b/spec/Fixture/LaminasCacheModule.php @@ -14,14 +14,14 @@ final class LaminasCacheModule /** @return array */ public function getConfig(): array { - $provider = new LaminasCacheConfigProvider(); + $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 = $provider->getDependencyConfig(); + $serviceManagerConfig = $configProvider->getDependencyConfig(); $serviceManagerConfig['delegators'][AdapterPluginManager::class] ??= []; $serviceManagerConfig['delegators'][AdapterPluginManager::class] = array_values(array_unique(array_merge( $serviceManagerConfig['delegators'][AdapterPluginManager::class],