Article
Zend Framework Versions Overview: ZF1 vs ZF2 vs ZF3 vs Laminas
Identify which Zend Framework generation you inherited, what PHP/Composer assumptions it carries, and which migration path is legitimate.
Misidentifying the major version is the most expensive early mistake in Zend Framework modernization. “Upgrade to Laminas” is correct for many ZF2/ZF3 apps and wrong as a one-command plan for ZF1. Use this overview as a decision tree, then open the version-specific centers.
Quick identification table
| Signal | Likely generation | Primary next step |
|---|---|---|
Zend_Application, Zend_Controller_Action, library/Zend | ZF1 | ZF1 center |
Zend\Mvc, module/, ServiceManager, Composer ZF 2.x | ZF2 | ZF2 center → laminas-migration |
Component zendframework/zend-* 3.x, slim skeleton | ZF3 | ZF3 center → laminas-migration |
laminas/laminas-*, Laminas\ namespaces | Laminas | Laminas hub — maintain/upgrade |
ZF1 — pre-Composer-era architecture
Front-controller MVC, application.ini, and class names with underscores. PHP upgrades collide with removed extensions and old language behavior. Laminas’s migrate tool does not treat ZF1 like ZF2/ZF3. Plan containment, Composer for your code, and strangler extraction—see ZF1 and PHP 8.
// LEGACY ZF1 class naming
class Default_Model_User extends Zend_Db_Table_Abstract {}
ZF2 — modules and DI container
Composer-supported, eventful MVC, ServiceManager factories. Migration to Laminas is documented and tooling-assisted when you meet Composer ≥1.7 and backup requirements.
// LEGACY ZF2 namespace
namespace Application\Controller;
use Zend\Mvc\Controller\AbstractActionController;
// MODERN Laminas namespace
namespace Application\Controller;
use Laminas\Mvc\Controller\AbstractActionController;
ZF3 — explicit components
Dependencies shrink to what you use. READMEs that say “ZF3” may already be mid-migration—trust composer.lock package names over marketing labels.
Laminas — continuation, not a rumor
Per official docs, Laminas is the open-source continuation / official fork after ZF was archived and abandoned. New work should target Laminas packages. Deep guide: Migrating Zend Framework to Laminas.
Practical inventory steps
- Open
composer.json/ lock —zendframeworkvslaminas - Open the web entry script —
Zend_ApplicationvsApplication::init - List modules and custom authentication/DB layers
- Note PHP version ceiling implied by dependencies
- Scan code with compatibility checker
History context: Zend Framework history. PHP runtime ladder: PHP 5 to modern PHP.
Related reading
- Migrating Zend Framework to Laminas (Complete Guide) Deep, verified migration from ZF2/ZF3 (and Apigility/Expressive) to Laminas using laminas-migration: Composer…
- Zend Framework 1 and PHP 8: Compatibility Reality Check ZF1 is not covered by laminas-migration like ZF2/ZF3. Unverified “PHP 8 compatible” claims, typical breakages…
- Zend Framework History: ZF1, ZF2, ZF3, and Laminas A maintainer-focused timeline of Zend Framework major generations and why Laminas is the official open-source…
- Zend Framework 3 Components Inventory List the zendframework/zend-* components you actually use so Laminas migration and PHP upgrades stay proporti…
- Composer Practices for Zend Framework 3 Apps Lockfiles, platform config, abandoned zendframework packages, and safe preparation for laminas-migration.