diff --git a/Module.php b/Module.php index ec84e53..b1a6f29 100644 --- a/Module.php +++ b/Module.php @@ -11,11 +11,11 @@ namespace ZendDiCompiler; -use Zend\Mvc\MvcEvent; -use Zend\Config\Config; -use Zend\EventManager\EventInterface as Event; -use Zend\ModuleManager\ModuleManager; -use Zend\ServiceManager\ServiceManager; +use Laminas\Mvc\MvcEvent; +use Laminas\Config\Config; +use Laminas\EventManager\EventInterface as Event; +use Laminas\ModuleManager\ModuleManager; +use Laminas\ServiceManager\ServiceManager; /** * @package ZendDiCompiler @@ -38,7 +38,7 @@ class Module public function getAutoloaderConfig() { return [ - 'Zend\Loader\StandardAutoloader' => [ + 'Laminas\Loader\StandardAutoloader' => [ 'namespaces' => [ __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__, ] @@ -63,7 +63,7 @@ public function getServiceConfig() $this->zendDiCompiler = new ZendDiCompiler; return [ - // Provide ZendDiCompiler as a Zend\ServiceManager service. + // Provide ZendDiCompiler as a Laminas\ServiceManager service. 'services' => [ 'ZendDiCompiler' => $this->zendDiCompiler, ] @@ -93,7 +93,7 @@ public function modulesLoaded(Event $e) $this->config = new Config($serviceManager->get('config')); $this->zendDiCompiler->setConfig($this->config); - // If Zend\Mvc is not used, the onBootstrap event won't be called and no mvc-related + // If Laminas\Mvc is not used, the onBootstrap event won't be called and no mvc-related // shared instances will be added. if (!$this->config->get('zendDiCompiler')->useZendMvc) { $this->zendDiCompiler->init(); @@ -101,7 +101,7 @@ public function modulesLoaded(Event $e) } /** - * If Zend\Mvc is used, this function will be called and mvc-related shared instances will be provided + * If Laminas\Mvc is used, this function will be called and mvc-related shared instances will be provided * * @param MvcEvent $mvcEvent */ diff --git a/README.md b/README.md index c0c9971..4c9fe53 100644 --- a/README.md +++ b/README.md @@ -21,14 +21,14 @@ # Introduction -Are you tired of writing tons of factory code (closures) for the Zend\ServiceManager in your Zend Framework 2 application? +Are you tired of writing tons of factory code (closures) for the Laminas\ServiceManager in your Zend Framework 2 application? Are outdated factory methods causing bugs? This can all be avoided by using ZendDiCompiler! **ZendDiCompiler** is a Zend Framework 2 module that uses auto-generated factory code for dependency-injection. It saves you a lot of work, since there's **no need anymore for writing -Zend\ServiceManager factory closures** and keeping them up-to-date manually. +Laminas\ServiceManager factory closures** and keeping them up-to-date manually. -ZendDiCompiler scans your code using **Zend\Di** and creates factory methods automatically. If the factory methods are outdated, ZendDiCompiler +ZendDiCompiler scans your code using **Laminas\Di** and creates factory methods automatically. If the factory methods are outdated, ZendDiCompiler updates them in the background. Therefore, you **develop faster**, **avoid bugs** due to outdated factory methods, and experience **great performance** in production! @@ -37,16 +37,16 @@ experience **great performance** in production! - **Code scanning** for creating DI definitions and **automatic factory code generation**. - Can deal with **shared instances** and **type preferences**. - Allows for **custom code introspection strategies** (by default, only constructors are scanned). -- Can be used as a **complement to Zend\ServiceManager**. +- Can be used as a **complement to Laminas\ServiceManager**. - Detection of outdated generated factory code and **automatic rescanning** (great for development). - Can create new instances or reuse instances created before. - Can be used as a **factory for runtime objects** combining DI and passing of runtime parameters. -- **Greater perfomance** and less memory consumption, as compared to using Zend\Di\Di with cached definitions. +- **Greater perfomance** and less memory consumption, as compared to using Laminas\Di\Di with cached definitions. # Caveats - [Setter injection and interface injection](http://framework.zend.com/manual/current/en/tutorials/quickstart.di.html) are not supported yet. Instances must be injected via constructor injection (which I recommend over the two other methods anyway). -- Using ZendDiCompiler makes sense if you develop a large application or a framework. For smaller applications, ZendDiCompiler may be overkill and you should handle instantiation using Zend\ServiceManager callback methods. +- Using ZendDiCompiler makes sense if you develop a large application or a framework. For smaller applications, ZendDiCompiler may be overkill and you should handle instantiation using Laminas\ServiceManager callback methods. # Installation @@ -98,7 +98,7 @@ As soon as you inject the ZendDiCompiler itself into your controllers and other The ZF2 MVC architecture is based on controller classes with action methods. Given this architecture, controller dependencies become numerous very quickly. In order to avoid bloated controller constructors, it makes sense to inject ZendDiCompiler as a single dependency into ZF2 controller classes and use it to pull the other dependencies from inside the controllers. -This means using it as a _service locator_, just like `Zend\ServiceManager` is typically used. +This means using it as a _service locator_, just like `Laminas\ServiceManager` is typically used. ZendDiCompiler is also used as a _service locator_ inside of the provided `ZendDiCompiler\DiFactory` which is very useful for [creating runtime objects with dependencies](#using-the-difactory-to-create-runtime-objects-with-dependencies). This @@ -110,7 +110,7 @@ DiFactory or your extended version of it with [custom creation methods](#passing ## Configuration -ZendDiCompiler uses standard [Zend\Di configuration](http://framework.zend.com/manual/2.1/en/modules/zend.di.configuration.html) +ZendDiCompiler uses standard [Laminas\Di configuration](http://framework.zend.com/manual/2.1/en/modules/zend.di.configuration.html) (which is not well documented yet). To make things easier, see [example.config.php](https://github.com/aimfeld/ZendDiCompiler/blob/master/config/example.config.php) for examples of how to specify: @@ -139,13 +139,13 @@ The following _default shared instances_ can be constructor-injected without exp - `ZendDiCompiler\ZendDiCompiler` - `ZendDiCompiler\DiFactory` -- `Zend\Mvc\MvcEvent` -- `Zend\Config\Config` -- `Zend\View\Renderer\PhpRenderer` -- `Zend\Mvc\ApplicationInterface` -- `Zend\ServiceManager\ServiceLocatorInterface` -- `Zend\EventManager\EventManagerInterface` -- `Zend\Mvc\Router\RouteStackInterface` +- `Laminas\Mvc\MvcEvent` +- `Laminas\Config\Config` +- `Laminas\View\Renderer\PhpRenderer` +- `Laminas\Mvc\ApplicationInterface` +- `Laminas\ServiceManager\ServiceLocatorInterface` +- `Laminas\EventManager\EventManagerInterface` +- `Laminas\Mvc\Router\RouteStackInterface` ## Type preferences @@ -214,9 +214,9 @@ In our example, we have the following classes: ExampleController ```php -use Zend\Mvc\Controller\AbstractActionController; +use Laminas\Mvc\Controller\AbstractActionController; use ZendDiCompiler\ZendDiCompiler; -use Zend\Config\Config; +use Laminas\Config\Config; class ExampleController extends AbstractActionController { @@ -346,7 +346,7 @@ class Module ## Using the DiFactory to create runtime objects with dependencies It is useful to distinguish two types of objects: _services_ and _runtime objects_. For _services_, all parameters should -be specified in the configuration (e.g. a config array wrapped in a `Zend\Config\Config` object). If class constructors +be specified in the configuration (e.g. a config array wrapped in a `Laminas\Config\Config` object). If class constructors e.g. in third party code require some custom parameters, they can be specified in the [instance configuration](https://github.com/aimfeld/ZendDiCompiler/blob/master/config/example.config.php)). @@ -424,7 +424,7 @@ class ExampleDiFactory extends DiFactory */ public function createRuntimeB($runtimeParam1, $runtimeParam2) { - $config = $this->zendDiCompiler->get('Zend\Config\Config'); + $config = $this->zendDiCompiler->get('Laminas\Config\Config'); $serviceA = $this->zendDiCompiler->get('ZendDiCompiler\Example\ServiceA'); return new RuntimeB($config, $serviceA, $runtimeParam1, $runtimeParam2); } @@ -463,7 +463,7 @@ Just for illustration, this is the generated service locator created by ZendDiCo ```php namespace ZendDiCompiler; -use Zend\Di\ServiceLocator; +use Laminas\Di\ServiceLocator; /** * Generated by ZendDiCompiler\Generator (2013-03-07 21:11:39) @@ -532,7 +532,7 @@ class GeneratedServiceLocator extends ServiceLocator return $this->services['ZendDiCompiler\Example\ExampleController']; } - $object = new \ZendDiCompiler\Example\ExampleController($this->get('ZendDiCompiler\ZendDiCompiler'), $this->getZendDiCompilerExampleServiceA(), $this->getZendDiCompilerExampleServiceC(), $this->get('Zend\Config\Config')); + $object = new \ZendDiCompiler\Example\ExampleController($this->get('ZendDiCompiler\ZendDiCompiler'), $this->getZendDiCompilerExampleServiceA(), $this->getZendDiCompilerExampleServiceC(), $this->get('Laminas\Config\Config')); if (!$newInstance) { $this->services['ZendDiCompiler\Example\ExampleController'] = $object; } @@ -608,7 +608,7 @@ class GeneratedServiceLocator extends ServiceLocator return $this->services['ZendDiCompiler\Example\RuntimeA']; } - $object = new \ZendDiCompiler\Example\RuntimeA($this->get('Zend\Config\Config'), $this->getZendDiCompilerExampleServiceA(), $params); + $object = new \ZendDiCompiler\Example\RuntimeA($this->get('Laminas\Config\Config'), $this->getZendDiCompilerExampleServiceA(), $params); if (!$newInstance) { $this->services['ZendDiCompiler\Example\RuntimeA'] = $object; } @@ -734,10 +734,10 @@ class GeneratedServiceLocator extends ServiceLocator ## Code scan log -ZendDiCompiler logs problems found during code scanning in `data/ZendDiCompiler/code-scan.log`. If you can't retrieve an object from ZendDiCompiler, you will probably find the reason in this log. The most common problem is that you have untyped scalar parameters instead of a [parameter array](#passing-all-runtime-parameters-in-a-single-array) in your constructors without providing values in your [Zend\Di configuration](http://framework.zend.com/manual/current/en/modules/zend.di.configuration.html). Here's an example of the code scan log showing some problems: +ZendDiCompiler logs problems found during code scanning in `data/ZendDiCompiler/code-scan.log`. If you can't retrieve an object from ZendDiCompiler, you will probably find the reason in this log. The most common problem is that you have untyped scalar parameters instead of a [parameter array](#passing-all-runtime-parameters-in-a-single-array) in your constructors without providing values in your [Laminas\Di configuration](http://framework.zend.com/manual/current/en/modules/zend.di.configuration.html). Here's an example of the code scan log showing some problems: ``` INFO (6): Start generating service locator by code scanning. -DEBUG (7): Survey\Cache\Zf1CacheAdapter: Class Zend\Cache\Storage\StorageInterface could not be located in provided definitions. +DEBUG (7): Survey\Cache\Zf1CacheAdapter: Class Laminas\Cache\Storage\StorageInterface could not be located in provided definitions. DEBUG (7): Survey\DataAggregator\Aggregate: Missing instance/object for parameter data for Survey\DataAggregator\Aggregate::__construct DEBUG (7): Survey\Db\Table\Rowset: Missing instance/object for parameter config for Survey\Db\Table\Rowset::__construct DEBUG (7): Survey\DbValidate\ValidationResult: Missing instance/object for parameter errorCount for Survey\DbValidate\ValidationResult::__construct @@ -761,7 +761,7 @@ In case of simple [value objects](http://martinfowler.com/bliki/ValueObject.html As a bonus, ZendDiCompiler will write a `component-dependency-info.txt` file containing information about which of the scanned components depend on which classes. -Scanned classes are grouped into components (e.g. the Zend\Mvc\MvcEvent class belongs to the Zend\Mvc component). +Scanned classes are grouped into components (e.g. the Laminas\Mvc\MvcEvent class belongs to the Laminas\Mvc component). For every component, all constructor-injected classes are listed. This helps you analyze which components depend on which classes of other components. Consider organizing your components into layers. Each layer should depend on classes of the same or lower layers only. @@ -773,7 +773,7 @@ Here's an example of what you might see: MyLibrary\Mail classes inject: - MyLibrary\Mail\Transport - MyLibrary\TextEngine\TextEngine -- Zend\Config\Config +- Laminas\Config\Config MyLibrary\Validator classes inject: - MyLibrary\Db\Tables diff --git a/composer.json b/composer.json index 7ffcdd4..982f93f 100644 --- a/composer.json +++ b/composer.json @@ -4,7 +4,7 @@ "keywords": ["dependency injection", "dependency injection container", "DIC", "zend framework", "service manager", "zf2"], "homepage": "https://github.com/aimfeld/ZendDiCompiler", "type": "library", - "license": "New BSD License", + "license": "BSD-3-Clause", "authors": [ { "name": "Adrian Imfeld", @@ -14,9 +14,9 @@ ], "require": { "php": ">=7.0", - "zendframework/zend-config": ">=2.6", - "zendframework/zend-di": ">=2.6", - "zendframework/zend-servicemanager": "^3.0" + "laminas/laminas-config": ">=2.6", + "laminas/laminas-di": ">=2.6", + "laminas/laminas-servicemanager": "^3.0" }, "replace": { "aimfeld/di-wrapper": "*" diff --git a/config/example.config.php b/config/example.config.php index db18660..40ef414 100644 --- a/config/example.config.php +++ b/config/example.config.php @@ -4,7 +4,7 @@ * Override the DI configuration in your project config. * * For info on the structure of the 'instance' and the 'preference' array, - * see Zend\Di documentation. + * see Laminas\Di documentation. */ return [ // ZendDiCompiler configuration diff --git a/config/module.config.php b/config/module.config.php index d919f60..d6a1c1c 100644 --- a/config/module.config.php +++ b/config/module.config.php @@ -4,12 +4,12 @@ * Override the DI configuration in your project config. * * For an example config, see example.config.php. For info on the structure of - * the 'instance' and the 'preference' array, see Zend\Di documentation. + * the 'instance' and the 'preference' array, see Laminas\Di documentation. */ return [ // ZendDiCompiler configuration 'zendDiCompiler' => [ - // Set to false, if your application does not use Zend\Mvc and the onBootstrap event is therefore not called. + // Set to false, if your application does not use Laminas\Mvc and the onBootstrap event is therefore not called. 'useZendMvc' => true, // Directories that will be code-scanned diff --git a/src/ZendDiCompiler/Example/ExampleController.php b/src/ZendDiCompiler/Example/ExampleController.php index c47efad..eded185 100644 --- a/src/ZendDiCompiler/Example/ExampleController.php +++ b/src/ZendDiCompiler/Example/ExampleController.php @@ -12,9 +12,9 @@ namespace ZendDiCompiler\Example; -use Zend\Mvc\Controller\AbstractActionController; +use Laminas\Mvc\Controller\AbstractActionController; use ZendDiCompiler\ZendDiCompiler; -use Zend\Config\Config; +use Laminas\Config\Config; /** * @package ZendDiCompiler diff --git a/src/ZendDiCompiler/Example/ExampleDiFactory.php b/src/ZendDiCompiler/Example/ExampleDiFactory.php index 0cd3243..3516956 100644 --- a/src/ZendDiCompiler/Example/ExampleDiFactory.php +++ b/src/ZendDiCompiler/Example/ExampleDiFactory.php @@ -32,7 +32,7 @@ class ExampleDiFactory extends DiFactory */ public function createRuntimeB($runtimeParam1, $runtimeParam2) { - $config = $this->zendDiCompiler->get('Zend\Config\Config'); + $config = $this->zendDiCompiler->get('Laminas\Config\Config'); $serviceA = $this->zendDiCompiler->get('ZendDiCompiler\Example\ServiceA'); return new RuntimeB($config, $serviceA, $runtimeParam1, $runtimeParam2); } diff --git a/src/ZendDiCompiler/Example/Module.php b/src/ZendDiCompiler/Example/Module.php index 19109e0..832c377 100644 --- a/src/ZendDiCompiler/Example/Module.php +++ b/src/ZendDiCompiler/Example/Module.php @@ -12,7 +12,7 @@ namespace ZendDiCompiler\Example; -use Zend\Mvc\MvcEvent; +use Laminas\Mvc\MvcEvent; use ZendDiCompiler\ZendDiCompiler; /** diff --git a/src/ZendDiCompiler/Example/RuntimeA.php b/src/ZendDiCompiler/Example/RuntimeA.php index 85d498d..a1832dc 100644 --- a/src/ZendDiCompiler/Example/RuntimeA.php +++ b/src/ZendDiCompiler/Example/RuntimeA.php @@ -12,7 +12,7 @@ namespace ZendDiCompiler\Example; -use Zend\Config\Config; +use Laminas\Config\Config; /** * @package ZendDiCompiler diff --git a/src/ZendDiCompiler/Example/RuntimeB.php b/src/ZendDiCompiler/Example/RuntimeB.php index eb36569..0bf5fe9 100644 --- a/src/ZendDiCompiler/Example/RuntimeB.php +++ b/src/ZendDiCompiler/Example/RuntimeB.php @@ -12,7 +12,7 @@ namespace ZendDiCompiler\Example; -use Zend\Config\Config; +use Laminas\Config\Config; /** * @package ZendDiCompiler diff --git a/src/ZendDiCompiler/Example/ServiceC.php b/src/ZendDiCompiler/Example/ServiceC.php index 82ef59e..410b01c 100644 --- a/src/ZendDiCompiler/Example/ServiceC.php +++ b/src/ZendDiCompiler/Example/ServiceC.php @@ -12,7 +12,7 @@ namespace ZendDiCompiler\Example; -use Zend\Mvc\MvcEvent; +use Laminas\Mvc\MvcEvent; /** * @package ZendDiCompiler diff --git a/src/ZendDiCompiler/Generator.php b/src/ZendDiCompiler/Generator.php index d1b534b..40b20f6 100644 --- a/src/ZendDiCompiler/Generator.php +++ b/src/ZendDiCompiler/Generator.php @@ -11,19 +11,19 @@ namespace ZendDiCompiler; -use Zend\Code\Generator\DocBlockGenerator; -use Zend\Code\Generator\ValueGenerator; -use Zend\Di\Di; -use Zend\Di\InstanceManager; -use Zend\Di\ServiceLocator; -use Zend\Di\ServiceLocator\GeneratorInstance; -use Zend\Code\Generator\MethodGenerator; -use Zend\Code\Generator\ParameterGenerator; -use Zend\Code\Generator\ClassGenerator; -use Zend\Code\Generator\FileGenerator; -use Zend\Code\Generator\PropertyGenerator; -use Zend\Config\Config; -use Zend\Log\Logger; +use Laminas\Code\Generator\DocBlockGenerator; +use Laminas\Code\Generator\ValueGenerator; +use Laminas\Di\Di; +use Laminas\Di\InstanceManager; +use Laminas\Di\ServiceLocator; +use Laminas\Di\ServiceLocator\GeneratorInstance; +use Laminas\Code\Generator\MethodGenerator; +use Laminas\Code\Generator\ParameterGenerator; +use Laminas\Code\Generator\ClassGenerator; +use Laminas\Code\Generator\FileGenerator; +use Laminas\Code\Generator\PropertyGenerator; +use Laminas\Config\Config; +use Laminas\Log\Logger; use ZendDiCompiler\Exception\RuntimeException; use DateTime; use ReflectionClass; @@ -31,7 +31,7 @@ /** * @package ZendDiCompiler */ -class Generator extends \Zend\Di\ServiceLocator\Generator +class Generator extends \Laminas\Di\ServiceLocator\Generator { /** * Support for passing a $params array for instance creation @@ -71,7 +71,7 @@ public function __construct(Di $injector, Config $config, Logger $logger) /** * Construct, configure, and return a PHP class file code generation object * - * Creates a Zend\Code\Generator\FileGenerator object that has + * Creates a Laminas\Code\Generator\FileGenerator object that has * created the specified class and service locator methods. * * @param null|string $filename diff --git a/src/ZendDiCompiler/ZendDiCompiler.php b/src/ZendDiCompiler/ZendDiCompiler.php index 545c06e..b0a138d 100644 --- a/src/ZendDiCompiler/ZendDiCompiler.php +++ b/src/ZendDiCompiler/ZendDiCompiler.php @@ -12,18 +12,18 @@ namespace ZendDiCompiler; use TypeError; -use Zend\Di\Di; -use Zend\Di\Definition\ArrayDefinition; -use Zend\Di\Definition\CompilerDefinition; -use Zend\Di\Definition\IntrospectionStrategy; -use Zend\Di\DefinitionList; -use Zend\Di\InstanceManager; -use Zend\Code\Scanner\DirectoryScanner; -use Zend\Config\Config; -use Zend\Di\Config as DiConfig; -use Zend\Log\Logger; -use Zend\Log\Writer\Stream as StreamWriter; -use Zend\Mvc\MvcEvent; +use Laminas\Di\Di; +use Laminas\Di\Definition\ArrayDefinition; +use Laminas\Di\Definition\CompilerDefinition; +use Laminas\Di\Definition\IntrospectionStrategy; +use Laminas\Di\DefinitionList; +use Laminas\Di\InstanceManager; +use Laminas\Code\Scanner\DirectoryScanner; +use Laminas\Config\Config; +use Laminas\Di\Config as DiConfig; +use Laminas\Log\Logger; +use Laminas\Log\Writer\Stream as StreamWriter; +use Laminas\Mvc\MvcEvent; use DateTime; use ZendDiCompiler\Exception\RuntimeException; @@ -233,7 +233,7 @@ public function getTypePreference($className) } /** - * Shared instances which can be injected if Zend\Mvc is used. + * Shared instances which can be injected if Laminas\Mvc is used. * * @param MvcEvent $mvcEvent */ @@ -243,12 +243,12 @@ public function addMvcSharedInstances(MvcEvent $mvcEvent) $serviceManager = $application->getServiceManager(); $mvcSharedInstances = [ - 'Zend\Mvc\MvcEvent' => $mvcEvent, - 'Zend\View\Renderer\PhpRenderer' => $serviceManager->get('Zend\View\Renderer\PhpRenderer'), - 'Zend\Mvc\ApplicationInterface' => $application, - 'Zend\ServiceManager\ServiceLocatorInterface' => $serviceManager, - 'Zend\EventManager\EventManagerInterface' => $application->getEventManager(), - 'Zend\Router\RouteStackInterface' => $mvcEvent->getRouter(), + 'Laminas\Mvc\MvcEvent' => $mvcEvent, + 'Laminas\View\Renderer\PhpRenderer' => $serviceManager->get('Laminas\View\Renderer\PhpRenderer'), + 'Laminas\Mvc\ApplicationInterface' => $application, + 'Laminas\ServiceManager\ServiceLocatorInterface' => $serviceManager, + 'Laminas\EventManager\EventManagerInterface' => $application->getEventManager(), + 'Laminas\Router\RouteStackInterface' => $mvcEvent->getRouter(), ]; $this->addSharedInstances($mvcSharedInstances); @@ -261,7 +261,7 @@ protected function addDefaultSharedInstances() { // Provide merged config as shared instance $defaultSharedInstances = [ - 'Zend\Config\Config' => $this->config, // The merged global configuration + 'Laminas\Config\Config' => $this->config, // The merged global configuration 'ZendDiCompiler\DiFactory' => new DiFactory($this), // Provide DiFactory get_class($this) => $this, // Provide ZendDiCompiler itself ]; @@ -427,7 +427,7 @@ protected function writeServiceLocator(Generator $generator, $className) * Write component dependencies * * Scanned classes are grouped into components. The second part of the class name - * is the component name (Zend\Db\Adapter\Adapter => Db component). The output + * is the component name (Laminas\Db\Adapter\Adapter => Db component). The output * shows for every component on which other components it depends by analysing * class names of injected classes. * @@ -466,7 +466,7 @@ protected function writeComponentDependencyInfo(DefinitionList $definitions) $now = (new DateTime('now'))->format('Y-m-d H:i:s'); $info = sprintf('Component dependency info - generated by %s (%s)', __NAMESPACE__, $now) . PHP_EOL; $info .= PHP_EOL; - $info .= 'Scanned classes are grouped into components (e.g. the Zend\Mvc\MvcEvent class belongs to the Zend\Mvc component).' . PHP_EOL . + $info .= 'Scanned classes are grouped into components (e.g. the Laminas\Mvc\MvcEvent class belongs to the Laminas\Mvc component).' . PHP_EOL . 'For every component, all constructor-injected classes are listed. This helps you analyze which components' . PHP_EOL . 'depend on which classes of other components. Consider organizing your components into layers.' . PHP_EOL . 'Each layer should depend on classes of the same or lower layers only.' . PHP_EOL . @@ -538,7 +538,7 @@ protected function checkInit() { if (!$this->isInitialized) { throw new RuntimeException( - "ZendDiCompiler must be initialized before instances can be retrieved. If you don't use Zend\\Mvc, override 'useZendMvc' in the zendDiCompiler config." + "ZendDiCompiler must be initialized before instances can be retrieved. If you don't use Laminas\\Mvc, override 'useZendMvc' in the zendDiCompiler config." ); } }