# Converting from Zend 2.3 to Laminas getting could not be initialized error

**URL:** <https://discourse.laminas.dev/t/converting-from-zend-2-3-to-laminas-getting-could-not-be-initialized-error/2198>\
**Category:** Migration\
**Tags:** laminas-mvc\
**Created:** [March 23, 2021, 2:06pm UTC](https://discourse.laminas.dev/t/converting-from-zend-2-3-to-laminas-getting-could-not-be-initialized-error/2198 "2021-03-23T14:06:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mgriswold](https://avatars.discourse-cdn.com/v4/letter/m/43a26b/32.png) [@mgriswold](https://discourse.laminas.dev/u/mgriswold)\
**Post date:** [March 23, 2021, 2:06pm UTC](https://discourse.laminas.dev/t/converting-from-zend-2-3-to-laminas-getting-could-not-be-initialized-error/2198/1 "2021-03-23T14:06:28Z")

</div>

I’m converting a project (qatools) from Zend Framework 2.3 to Laminas. I went through the conversion steps. Now I’m seeing the following error.

Uncaught Laminas\ModuleManager\Exception\RuntimeException: Module (qatools) could not be initialized

Here is what my composer file looks like.

```json
{
    "name": "laminas/qatools",
    "description": "Webapp for HPCC QA",
    "type": "project",
    "license": "BSD-3-Clause",
    "require": {
        "php": ">=7.2.34",
        "ext-dom": "*",
		"ext-gd": "*",
        "monolog/monolog": "1.2.*",
        "phpoffice/phpspreadsheet": "1.17.*",
        "kamisama/php-resque-ex": "1.2.*",
        "kamisama/php-resque-ex-scheduler": "1.2.*",
        "colinmollenhour/credis": "1.5.*",
        "cache/simple-cache-bridge": "^1.0",
        "cache/memcache-adapter": "^1.0",
        "cache/redis-adapter": "^1.0",
        "laminas/laminas-component-installer": "^1.0 || ^2.1",
        "laminas/laminas-development-mode": "^3.2",
		"laminas/laminas-modulemanager": "^2.8", 
        "laminas/laminas-mvc": "^3.1.1"
    },
	"autoload": {
        "psr-4": {
            "qatools\\": "module/qatools/src/"
        }
    }
}

```

Here is module.config.php

```php
<?php

/**
 * @see https://github.com/laminas/laminas-mvc-skeleton for the canonical source repository
 * @copyright https://github.com/laminas/laminas-mvc-skeleton/blob/master/COPYRIGHT.md
 * @license https://github.com/laminas/laminas-mvc-skeleton/blob/master/LICENSE.md New BSD License
 */

/**
 * List of enabled modules for this application.
 *
 * This should be an array of module namespaces used in the application.
 */
return [
    'Laminas\Router',
    'Laminas\Validator',
    'qatools',
];

```

Let me know if you see anything wrong with the above files. Thanks.

---

<div class="post-metadata">

**Author:** ![froschdesign](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.laminas.dev/froschdesign/32/38_2.png) [@froschdesign](https://discourse.laminas.dev/u/froschdesign)\
**Post date:** [March 23, 2021, 2:50pm UTC](https://discourse.laminas.dev/t/converting-from-zend-2-3-to-laminas-getting-could-not-be-initialized-error/2198/2 "2021-03-23T14:50:58Z")

</div>

> [@mgriswold](#):
>
> `'qatools',`

Please check the related path and class names. In version 3 the (service) names are case sensitive.

---

<div class="post-metadata">

**Author:** ![ALTAMASH80](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.laminas.dev/altamash80/32/895_2.png) [@ALTAMASH80](https://discourse.laminas.dev/u/ALTAMASH80)\
**Post date:** [March 29, 2021, 7:47am UTC](https://discourse.laminas.dev/t/converting-from-zend-2-3-to-laminas-getting-could-not-be-initialized-error/2198/4 "2021-03-29T07:47:16Z")

</div>

In addition to the @froschdesign answer I would like to ask have you run the below command as well?

```auto
composer dump-autoload

```

Thanks!

---

<div class="post-metadata">

**Author:** ![tomstryja](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.laminas.dev/tomstryja/32/1075_2.png) [@tomstryja](https://discourse.laminas.dev/u/tomstryja)\
**Post date:** [March 29, 2021, 11:18am UTC](https://discourse.laminas.dev/t/converting-from-zend-2-3-to-laminas-getting-could-not-be-initialized-error/2198/5 "2021-03-29T11:18:54Z")

</div>

I would migrate to ZF3 first. See the blog post [Migrating ZF2 to ZF3](https://www.we-rc.com/blog/2017/03/29/migrating-zf2-to-zf3)  
Then [migrate to Laminas](https://docs.laminas.dev/migration/).
