# Migration

**URL:** https://discourse.laminas.dev/c/migration/12.md

[Latest](https://discourse.laminas.dev/latest.md) · [Categories](https://discourse.laminas.dev/categories.md) · [Tags](https://discourse.laminas.dev/tags.md)

---

## [About the Migration category](https://discourse.laminas.dev/t/about-the-migration-category/1431)

<div class="topic-metadata">

**Author:** [@froschdesign](https://discourse.laminas.dev/u/froschdesign)\
**Replies:** 0

</div>

Ask questions about migration from Zend Framework to Laminas, from Mezzio 2.0 to 3.0 (formerly Expressive), from ZF2 to ZF3 and more.

---

## [Undefined constant 'JSON\_ERROR\_DEPTH'](https://discourse.laminas.dev/t/undefined-constant-json-error-depth/3896)

<div class="topic-metadata">

**Author:** [@tompin](https://discourse.laminas.dev/u/tompin)\
**Replies:** 4\
**Last updated:** [April 18, 2025, 11:11pm UTC](https://discourse.laminas.dev/t/undefined-constant-json-error-depth/3896 "2025-04-18T23:11:55Z")

</div>

Hi, I’m trying to update a system that I wrote a long time ago in Zend Framework to run on PHP 8.3. I’ve got it running fine on my development machine (MacOS). When I try and deploy the same body of code on a remote Linu…

---

## [Doctrine migrations in Mezzio](https://discourse.laminas.dev/t/doctrine-migrations-in-mezzio/3700)

<div class="topic-metadata">

**Author:** [@sanjivsharmalv](https://discourse.laminas.dev/u/sanjivsharmalv)\
**Replies:** 2\
**Last updated:** [June 9, 2024, 6:06am UTC](https://discourse.laminas.dev/t/doctrine-migrations-in-mezzio/3700 "2024-06-09T06:06:06Z")

</div>

As we do not have modules structure of MVC framework, the traditional command of doctrine CLI no longer work in Mezzio. In that case how do we go ahead with migrations?

---

## [Comparison between api-tools and Dotkernel API](https://discourse.laminas.dev/t/comparison-between-api-tools-and-dotkernel-api/3694)

<div class="topic-metadata">

**Author:** [@arhimede](https://discourse.laminas.dev/u/arhimede)\
**Replies:** 14\
**Last updated:** [May 24, 2024, 8:30pm UTC](https://discourse.laminas.dev/t/comparison-between-api-tools-and-dotkernel-api/3694 "2024-05-24T20:30:48Z")

</div>

We published the first document related to transition from api-tools to dotkernel api, the comparison between them. If we missed some criteria for comparison, we are happy to extend this document. The entire dotkernel …

---

## [Unable to resolve service "HttpRouter" to a factory](https://discourse.laminas.dev/t/unable-to-resolve-service-httprouter-to-a-factory/3654)

<div class="topic-metadata">

**Author:** [@Avinash\_Dalvi](https://discourse.laminas.dev/u/Avinash_Dalvi)\
**Replies:** 16\
**Last updated:** [April 1, 2024, 5:31pm UTC](https://discourse.laminas.dev/t/unable-to-resolve-service-httprouter-to-a-factory/3654 "2024-04-01T17:31:19Z")

</div>

Fatal error: Uncaught Laminas\\ServiceManager\\Exception\\ServiceNotFoundException: Unable to resolve service “HttpRouter” to a factory There is two factory is missing. Router and HttpRouter. After adding this line into gl…

---

## [Lamina-tools is not supporting laminas-servicemanger:3.21](https://discourse.laminas.dev/t/lamina-tools-is-not-supporting-laminas-servicemanger-3-21/3649)

<div class="topic-metadata">

**Author:** [@mahendra](https://discourse.laminas.dev/u/mahendra)\
**Replies:** 14\
**Last updated:** [April 1, 2024, 4:34pm UTC](https://discourse.laminas.dev/t/lamina-tools-is-not-supporting-laminas-servicemanger-3-21/3649 "2024-04-01T16:34:47Z")

</div>

the laminas-tools dependencies are not supporting the laminas-servicemanager:3.21. pleas suggest me any solution on it the version compatibility error.

---

## [Class not found Error after migration](https://discourse.laminas.dev/t/class-not-found-error-after-migration/1772)

<div class="topic-metadata">

**Author:** [@bhausch](https://discourse.laminas.dev/u/bhausch)\
**Replies:** 10\
**Last updated:** [November 14, 2023, 9:42pm UTC](https://discourse.laminas.dev/t/class-not-found-error-after-migration/1772 "2023-11-14T21:42:11Z")

</div>

After migration from ZF2 to laminas (MVC) we got a class not found error/warning and our application is not running. Warning: Class ‘Laminas\\View\\HelperPluginManager’ not found in PATH/vendor/laminas/laminas-zendframewo…

---

## [Newbie here - just upgrade from zend to laminas but getting Fatal error: Uncaught Error: Failed opening required 'File/Iterator/Autoload.php'](https://discourse.laminas.dev/t/newbie-here-just-upgrade-from-zend-to-laminas-but-getting-fatal-error-uncaught-error-failed-opening-required-file-iterator-autoload-php/3358)

<div class="topic-metadata">

**Author:** [@Docabilly](https://discourse.laminas.dev/u/Docabilly)\
**Replies:** 2\
**Last updated:** [June 14, 2023, 10:30pm UTC](https://discourse.laminas.dev/t/newbie-here-just-upgrade-from-zend-to-laminas-but-getting-fatal-error-uncaught-error-failed-opening-required-file-iterator-autoload-php/3358 "2023-06-14T22:30:08Z")

</div>

Hi, I am a bit flustered and confused about laminas - my problem. macOS M2 MacBook Pro I used the standard migration tool. Migrate to Laminas It went really well. I have PHP 8.1.19 installed and a phpinfo.php displ…

---

## [Zend\_Locale which replacement should I use?](https://discourse.laminas.dev/t/zend-locale-which-replacement-should-i-use/3254)

<div class="topic-metadata">

**Author:** [@seb\_dev](https://discourse.laminas.dev/u/seb_dev)\
**Replies:** 3\
**Last updated:** [March 23, 2023, 5:24pm UTC](https://discourse.laminas.dev/t/zend-locale-which-replacement-should-i-use/3254 "2023-03-23T17:24:58Z")

</div>

Hi there, in some of our plugins in Magento, they use Zend\_Locale , what do I need to change this into to make use of Laminas? The code where this is used in is: $form\['shipping\_address'\]\['country\_code'\] = Zend\_Locale:…

---

## [LocalizedToNormalized which replacement should I use?](https://discourse.laminas.dev/t/localizedtonormalized-which-replacement-should-i-use/3253)

<div class="topic-metadata">

**Author:** [@seb\_dev](https://discourse.laminas.dev/u/seb_dev)\
**Replies:** 3\
**Last updated:** [March 23, 2023, 10:53am UTC](https://discourse.laminas.dev/t/localizedtonormalized-which-replacement-should-i-use/3253 "2023-03-23T10:53:36Z")

</div>

Hi there, in some of our plugins in Magento, they use Zend\_Filter\_LocalizedToNormalized, what do I need to change this into to make use of Laminas? Thanks. Best regards, Seb

---

## [Migration ZF3 to Laminas](https://discourse.laminas.dev/t/migration-zf3-to-laminas/3240)

<div class="topic-metadata">

**Author:** [@lon9man](https://discourse.laminas.dev/u/lon9man)\
**Replies:** 3\
**Last updated:** [March 14, 2023, 10:37am UTC](https://discourse.laminas.dev/t/migration-zf3-to-laminas/3240 "2023-03-14T10:37:40Z")

</div>

Hello, trying to migrate ZF3 to Laminas run laminas-migration migrate and received the error: This command REMOVES your composer.lock file and vendor directory; do you wish to continue?y Migrating project at path "/ho…

---

## [Transfer ZF2 from centos server 6 to another server ubuntu 22.04](https://discourse.laminas.dev/t/transfer-zf2-from-centos-server-6-to-another-server-ubuntu-22-04/3049)

<div class="topic-metadata">

**Author:** [@Apple\_Mac](https://discourse.laminas.dev/u/Apple_Mac)\
**Replies:** 0\
**Last updated:** [September 14, 2022, 4:02pm UTC](https://discourse.laminas.dev/t/transfer-zf2-from-centos-server-6-to-another-server-ubuntu-22-04/3049 "2022-09-14T16:02:59Z")

</div>

Hi Guys: For site moving between two different linux server what steps must do? I want move a site that written in zend framework 2.0 from centos server 6.0 to another server ubuntu server 22.04, i appreciate that tell…

---

## [Change Application Files paths](https://discourse.laminas.dev/t/change-application-files-paths/3037)

<div class="topic-metadata">

**Author:** [@rajath](https://discourse.laminas.dev/u/rajath)\
**Replies:** 4\
**Last updated:** [September 8, 2022, 8:00pm UTC](https://discourse.laminas.dev/t/change-application-files-paths/3037 "2022-09-08T20:00:13Z")

</div>

Hi, I want to change the src application folder(Controller,Factory,Model,Event,…) to a different folder \\module\\Application\\src\\Application from \\module\\Application\\src\\ What are the change need to make for the same. …

---

## [Laminas showing Renderer Error](https://discourse.laminas.dev/t/laminas-showing-renderer-error/3015)

<div class="topic-metadata">

**Author:** [@rajath](https://discourse.laminas.dev/u/rajath)\
**Replies:** 8\
**Last updated:** [August 29, 2022, 3:19pm UTC](https://discourse.laminas.dev/t/laminas-showing-renderer-error/3015 "2022-08-29T15:19:38Z")

</div>

Hi, i am trying to user renderer functionality and getting path error Laminas\\View\\Renderer\\PhpRenderer::render: Unable to render template “application/history/subviewdetails”; resolver could not resolve to a file F…

---

## [Loading modules not working](https://discourse.laminas.dev/t/loading-modules-not-working/3024)

<div class="topic-metadata">

**Author:** [@ushiro](https://discourse.laminas.dev/u/ushiro)\
**Replies:** 1\
**Last updated:** [August 25, 2022, 2:17pm UTC](https://discourse.laminas.dev/t/loading-modules-not-working/3024 "2022-08-25T14:17:15Z")

</div>

I’ve been struggling with this issue for 2 days now, so any help would be really appreciated. We are trying to migrate our laminas-mvc project to 3.x. There is this piece of code which loads the modules for php-unit test…

---

## [How should I use NotFoundHandler when migrating to Stratigility v3?](https://discourse.laminas.dev/t/how-should-i-use-notfoundhandler-when-migrating-to-stratigility-v3/3009)

<div class="topic-metadata">

**Author:** [@stuartmcgill\_cap](https://discourse.laminas.dev/u/stuartmcgill_cap)\
**Replies:** 1\
**Last updated:** [August 15, 2022, 4:06pm UTC](https://discourse.laminas.dev/t/how-should-i-use-notfoundhandler-when-migrating-to-stratigility-v3/3009 "2022-08-15T16:06:17Z")

</div>

I’m trying to migrate a legacy app from Laminas v1 to v3 (as part of a PHP 8.1 upgrade). I’ve got the bare bones of the existing middleware working by wrapping it up in DoublePassMiddlewareDecorator e.g. $app = new Lam…

---

## [Custom Library Path Issue](https://discourse.laminas.dev/t/custom-library-path-issue/2982)

<div class="topic-metadata">

**Author:** [@rajath](https://discourse.laminas.dev/u/rajath)\
**Replies:** 2\
**Last updated:** [August 2, 2022, 5:03pm UTC](https://discourse.laminas.dev/t/custom-library-path-issue/2982 "2022-08-02T17:03:23Z")

</div>

Hello, I am migrating from Zf2 to Laminas. Finding an issue with locating custom library class message:\[Uncaught Error: Class ’ ‘Libraries\\MIB\\Functions’ ’ not found in myapplication/module/Application/src/Module.php:3…

---

## [Migration from Zf2](https://discourse.laminas.dev/t/migration-from-zf2/2973)

<div class="topic-metadata">

**Author:** [@rajath](https://discourse.laminas.dev/u/rajath)\
**Replies:** 2\
**Last updated:** [July 26, 2022, 4:18pm UTC](https://discourse.laminas.dev/t/migration-from-zf2/2973 "2022-07-26T16:18:51Z")

</div>

How to map factories written in the group of service manager in zf2 to laminas. Controller factories are working good Not working showing path error - "Unable to resolve service “Application\\Service\\UserServiceInterface…

---

## [Migration Issues](https://discourse.laminas.dev/t/migration-issues/2962)

<div class="topic-metadata">

**Author:** [@rajath](https://discourse.laminas.dev/u/rajath)\
**Replies:** 2\
**Last updated:** [July 25, 2022, 8:01pm UTC](https://discourse.laminas.dev/t/migration-issues/2962 "2022-07-25T20:01:26Z")

</div>

Hi, I am trying to migrate zend 2 application to laminas. Finding an issues with loading namespace contents use Application\\Form\\PubliccustContactUs; use Application\\Model\\Rmacontactus; use Libraries\\Msc\\Functions; S…

---

## [Upgrading Zend Framework 2.5.0 to be compatible with php 7](https://discourse.laminas.dev/t/upgrading-zend-framework-2-5-0-to-be-compatible-with-php-7/2510)

<div class="topic-metadata">

**Author:** [@didgewind](https://discourse.laminas.dev/u/didgewind)\
**Replies:** 3\
**Last updated:** [July 14, 2022, 4:59pm UTC](https://discourse.laminas.dev/t/upgrading-zend-framework-2-5-0-to-be-compatible-with-php-7/2510 "2022-07-14T16:59:58Z")

</div>

Hi there, I’ve got a site using Zend Framework 2.5.0. It runs on Php 5.6. I’d like to migrate to Php 7.x, but it seems ZF 2.5.0 is not compatible with Php 7.x. I’ve read in ZF blog (PHP 7.2 Support! - Blog - Zend Framew…

---

## [Upgrading laminas version 3 from laminas version 2](https://discourse.laminas.dev/t/upgrading-laminas-version-3-from-laminas-version-2/2937)

<div class="topic-metadata">

**Author:** [@nilamrsharma](https://discourse.laminas.dev/u/nilamrsharma)\
**Replies:** 4\
**Last updated:** [June 28, 2022, 11:03am UTC](https://discourse.laminas.dev/t/upgrading-laminas-version-3-from-laminas-version-2/2937 "2022-06-28T11:03:53Z")

</div>

Our current project is on Laminas2. Last year we had updated our project from ZF2 to Laminas2. Now we want to upgrade to laminas3(php 8.1) and we have started the migration but it is not going as smooth as expected. We…

---

## [Updating code changes for laminas 3](https://discourse.laminas.dev/t/updating-code-changes-for-laminas-3/2938)

<div class="topic-metadata">

**Author:** [@nilamrsharma](https://discourse.laminas.dev/u/nilamrsharma)\
**Replies:** 3\
**Last updated:** [June 29, 2022, 2:13pm UTC](https://discourse.laminas.dev/t/updating-code-changes-for-laminas-3/2938 "2022-06-29T14:13:48Z")

</div>

Hello, I am facing many issue while upgrading laminas version 3 from laminas 2, Main/Module.php under onBootstrap() method public function onBootstrap(MvcEvent $e) { try { HttpException::setLoggingDepen…

---

## [Ini\_set() return false and failed in laminas and PHP8](https://discourse.laminas.dev/t/ini-set-return-false-and-failed-in-laminas-and-php8/2864)

<div class="topic-metadata">

**Author:** [@ali.alinezhad](https://discourse.laminas.dev/u/ali.alinezhad)\
**Replies:** 5\
**Last updated:** [June 17, 2022, 11:38am UTC](https://discourse.laminas.dev/t/ini-set-return-false-and-failed-in-laminas-and-php8/2864 "2022-06-17T11:38:15Z")

</div>

I have recently updated a zend project to Laminas and PHP8. It seems it works, but integration test is failed because ini\_set() return false here. \\Laminas\\Session\\Config\\SessionConfig::setStorageOption I saw this warn…

---

## [Problems with instancing a command for laminas-cli](https://discourse.laminas.dev/t/problems-with-instancing-a-command-for-laminas-cli/2905)

<div class="topic-metadata">

**Author:** [@Issinia](https://discourse.laminas.dev/u/Issinia)\
**Replies:** 4\
**Last updated:** [June 3, 2022, 11:40am UTC](https://discourse.laminas.dev/t/problems-with-instancing-a-command-for-laminas-cli/2905 "2022-06-03T11:40:11Z")

</div>

Hi there, I’m pretty new on PHP/Laminas. I joined a nice team and we try to migrate an old project to PHP 8. We were using Laminas/Console and now we try to use Symfony. We have a service to update currencies into DB. …

---

## [Simple creation of pdo db connection within model](https://discourse.laminas.dev/t/simple-creation-of-pdo-db-connection-within-model/2898)

<div class="topic-metadata">

**Author:** [@iwidgit](https://discourse.laminas.dev/u/iwidgit)\
**Replies:** 1\
**Last updated:** [May 31, 2022, 7:10am UTC](https://discourse.laminas.dev/t/simple-creation-of-pdo-db-connection-within-model/2898 "2022-05-31T07:10:26Z")

</div>

Is it possible to instantiate a db adapter inside a model using laminas\\db. I’m using the pdo driver with mysql. I have tried using laminas\\db\\adapter supplying dns username and password but not connecting. I must be mis…

---

## [Laminas migration from ZF 3 (with conversion Zend installation via Composer)](https://discourse.laminas.dev/t/laminas-migration-from-zf-3-with-conversion-zend-installation-via-composer/2894)

<div class="topic-metadata">

**Author:** [@Sergei](https://discourse.laminas.dev/u/Sergei)\
**Replies:** 1\
**Last updated:** [May 27, 2022, 2:31pm UTC](https://discourse.laminas.dev/t/laminas-migration-from-zf-3-with-conversion-zend-installation-via-composer/2894 "2022-05-27T14:31:21Z")

</div>

Hi everyone, I try to migrate to Laminas from ZF 3.3.33 , but Zend framework wasn’t installed via Composer on the project. What is a way for update project Zend framework installation via Composer? Maybe exists some spe…

---

## [Upgrading from ZF3 to Laminas with PHP 8.1 PDO Exception could not find driver when using \\PDO()](https://discourse.laminas.dev/t/upgrading-from-zf3-to-laminas-with-php-8-1-pdo-exception-could-not-find-driver-when-using-pdo/2884)

<div class="topic-metadata">

**Author:** [@iwidgit](https://discourse.laminas.dev/u/iwidgit)\
**Replies:** 8\
**Last updated:** [May 20, 2022, 7:56am UTC](https://discourse.laminas.dev/t/upgrading-from-zf3-to-laminas-with-php-8-1-pdo-exception-could-not-find-driver-when-using-pdo/2884 "2022-05-20T07:56:45Z")

</div>

I have a number of Zend Framework 3 applications (20) running on the same Apache2.4 server. These applications were added to the base skeleton Application so they all run under the same doc root. I’m using Ubuntu-20.04…

---

## [How do you migrate from laminas-code 2 to 4, wrt. annotations?](https://discourse.laminas.dev/t/how-do-you-migrate-from-laminas-code-2-to-4-wrt-annotations/2872)

<div class="topic-metadata">

**Author:** [@engelse](https://discourse.laminas.dev/u/engelse)\
**Replies:** 6\
**Last updated:** [May 5, 2022, 12:57pm UTC](https://discourse.laminas.dev/t/how-do-you-migrate-from-laminas-code-2-to-4-wrt-annotations/2872 "2022-05-05T12:57:26Z")

</div>

Hey, Good day. We currently extend the AnnotationBuilder that exists in laminas-code 2. This however breaks in laminas-code 4 as the AnnotationBuilder class is final. I updated the class to not extend AnnotationBuilder…

---

## [Migrating from ZF 1.12 to Laminas mvc](https://discourse.laminas.dev/t/migrating-from-zf-1-12-to-laminas-mvc/2870)

<div class="topic-metadata">

**Author:** [@Wiiizz](https://discourse.laminas.dev/u/Wiiizz)\
**Replies:** 5\
**Last updated:** [May 5, 2022, 12:24pm UTC](https://discourse.laminas.dev/t/migrating-from-zf-1-12-to-laminas-mvc/2870 "2022-05-05T12:24:06Z")

</div>

Hello, I currently have an application under ZF 1.12 (MVC pattern) with PHP 5.5.11 and I want to migrate to Laminas-mvc with PHP 8.0. I plan to migrate to ZF 2.4.13 then to ZF 3.0 as indicated on the various official t…

---

## [What instead Zend\_Measure?](https://discourse.laminas.dev/t/what-instead-zend-measure/2867)

<div class="topic-metadata">

**Author:** [@ZVanoZ](https://discourse.laminas.dev/u/ZVanoZ)\
**Replies:** 3\
**Last updated:** [May 4, 2022, 7:22am UTC](https://discourse.laminas.dev/t/what-instead-zend-measure/2867 "2022-05-04T07:22:19Z")

</div>

In Zend Framework 1 was usefull component, named “Zend\_Measure”. I can’t find it in Laminas Framework. What instead Zend\_Measure in Laminas Framework? // Example convert Millimeters to Inches $value = 123; // …

[Next page](https://discourse.laminas.dev/c/migration/12.md?page=1)
