Migrate Laminas MVC to Dotkernel

Laminas MVC is going through its final stage of life. It's no longer being actively developed, but is still supported to allow ample time for developers to plan a migration path. This is the perfect time to look at pure and simple modernization, while also planning for long-term security and maintainability.

Why You Shouldn’t Wait

The longer you wait, the more likely you are to spend even more time and effort to implement a stable solution for the next 10+ years.

The ever-changing PHP ecosystem will create a wider and wider gap with legacy systems. Everything moves forward at whirlwind speed, from fixes for security vulnerabilities, to new versions of PHP and new dependency releases that create backward incompatibilities.

You only get the full security and functional benefits on new versions of packages.

Using discontinued packages or not upgrading them might leave gaping holes in your security. Old versions of dependencies are often unreliable on the long run, partly because of limited functionality and their incompatibility with newer systems.

Similarly, upgrading one, vital dependency might prove difficult or even impossible due to limits dictated by the installable set of packages.

Developers who may steer clear of your project or may not be familiar with its coding standards.

Developers will be pushed to move onto more modern architectures, which will make it more unlikely for you to find willing employees and collaborators.

  • Experienced developers are already looking to the future and are likely to outright reject legacy projects because of high developement and maintenance costs.
  • Young developers will avoid learning coding on an obsolete platform.

Money, Money, Money... and Time

Developer costs will increase when handling legacy systems, since the higher number of developers using actively-maintained platforms may be willing to work for less out of sheer competition. This idea doesn't even broach on the fact that legacy systems often need more work to implement new features compared to their more modern counterparts.

Even when you do build your team and start working on the legacy platform, you may find yourself hard-pressed to keep them on your payroll. Developers may be attracted to that newer platform that everyone keeps talking about and may leave you high and dry.

Migrating Your Platform from Laminas MVC to Dotkernel

One of the best migration paths is to move from Laminas MVC to Dotkernel, given several benefits:

  • Both Laminas MVC and Dotkernel are built on Laminas components, so handling dependencies should be familiar for existing Laminas developers.
  • Dotkernel implements several PHP standards recommended by the PHP Framework Interop Group, including PSR-7 (HTTP messages) and PSR-15 (middleware). Developers with experience in using other components that implement these standards will feel right at home.
  • Dotkernel is based on the Mezzio microframework, with some bells and whistles added for easier adoption, which makes it more opinionated, but also easier to pick up and go.
  • The main target for Dotkernel has always been implementing design elements recommended by the PHP community, like separation of concerns, dependency injection and clean architecture.
Alternate Migration Paths

While Dotkernel is the smoothest migration path, there are, of course, alternatives:

  • The Mezzio microframework is the direct successor within the Laminas ecosystem. Its middleware roots make it flexible, while also being PRS-compliant.
  • Symfony is a modern, enterprise-grade framework with a strong ecosystem and longevity. It implements score of features like DI, routing, templating, but may prove to have a steep learning curve for Laminas developers, due to its different conventions.
  • Laravel has grown into the most popular PHP framework today, thanks to its huge, dedicated community and its tons of packages. Unfortunately, for our particular use case, migrating to their different philosophy would result in a costly and laborious full rewrite.
Working on Your Migration Strategy and Checklist

You mustn't look at your migration lightly. It's a good idea to outline a proper strategy with well-defined stages to make sure that your migration proceeds smoothly. The basic list below should help you monitor each vital item to stay on the right track.

Phase 1: Audit and Prep

  • Identify all custom modules, dependencies, services
  • Separate business logic from controllers
  • Document routes, forms, validation, and view logic

Phase 2: Choose Your Target

  • For minimum friction: DotKernel (preserves familiarity)
  • For modern PSR-based architecture: Mezzio or DotKernel
  • For rebuild or new features: Laravel or Symfony

Phase 3: Incremental Migration

  • Convert modules to middleware (if using Mezzio or DotKernel)
  • Migrate services to PSR-compliant containers (like Laminas ServiceManager or PHP-DI)
  • Replace outdated view helpers or filters with newer components
  • Migrate templates (e.g., from PHP views to Twig or Laminas\View)
Need Help with Your Migration Efforts?

We at Apidemia have dealt with migrations in the past, so we fully understand the challenges. We've counseled companies during their modernization of legacy Zend/Laminas applications toward clean, maintainable DotKernel or Mezzio platforms. This is exactly the kind of project we specialize in, so drop us a line and let's talk business.