Zend Framework 2.0.0beta1 Released!

October 18, 2011

News, Zend Framework

The Zend Framework community is pleased to announce the immediate availability
of Zend Framework 2.0.0beta1. Packages and installation instructions are
available at:


This is the first in a series of planned beta releases. The beta release
cycle will follow the “gmail” style of betas, whereby new features will
be added in each new release, and BC will not be guaranteed; beta
releases will happen no less than every six weeks. The desire is for
developers to adopt and work with new components as they are shipped, and
provide feedback so we can polish the distribution.

Once all code in the proposed standard distribution
has reached maturity and reasonable stability, we will freeze the API and
prepare for Release Candidate status.

Featured components and functionality of 2.0.0beta1 include:

  • New and refactored autoloaders:

    • Zend\Loader\StandardAutoloader
    • Zend\Loader\ClassMapAutoloader
    • Zend\Loader\AutoloaderFactory
  • New plugin broker strategy

    • Zend\Loader\Broker and Zend\Loader\PluginBroker
  • Reworked Exception system

    • Allow catching by specific Exception type
    • Allow catching by component Exception type
    • Allow catching by SPL Exception type
    • Allow catching by base Exception type
  • Rewritten Session component
  • Refactored View component

    • Split helpers into a PluginBroker
    • Split variables into a Variables container
    • Split script paths into a TemplateResolver
    • Renamed base View class “PhpRenderer”
    • Refactored helpers to utilize __invoke() when possible
  • Refactored HTTP component
  • New Zend\Cloud\Infrastructure component
  • New EventManager component
  • New Dependency Injection (Zend\Di) component
  • New Code component

    • Incorporates refactored versions of former Reflection and
      CodeGenerator components.
    • Introduces Scanner component.
    • Introduces annotation system.

The above components provide a solid foundation for Zend Framework 2, and
largely make up the framework “core”. However, the cornerstone feature of beta1
is what they enable: the new MVC layer:

  • Zend\Module, for developing modular application architectures.
  • Zend\Mvc, a completely reworked MVC layer built on top of HTTP,
    EventManager, and Di.

We’ve built a skeleton application and a skeleton module to help get you started, as well as a quick start guide to the MVC; the new MVC is truly flexible, and moreover, simple and

Additionally, for those who haven’t clicked on the packages link above, we are
debuting our new distribution mechanisms for ZF2: the ability to use
Pyrus to install individual components and/or groups of

Since mid-August, we’ve gone from a few dozen pull requests on the
ZF2 git repository to over 500,
originating from both long-time Zend Framework contributors as well as those
brand-new to the project. I’d like to thank each and every one of them, but also
call out several individuals who have made some outstanding and important
contributions during that time frame:

  • Evan Coury, who prototyped and then implemented the new
    module system.
  • Rob Allen, who, because he was doing a tutorial at
    PHPNW on ZF2, provided a lot of early
    feedback, ideas, and advice on the direction of the MVC.
  • Ben Scholzen, who wrote a new router system, in
    spite of a massive injury from a cycling accident.
  • Ralph Schindler, who has had to put up with my
    daily “devil’s advocate” and “think of the user!” rants for the past several
    months, and still managed to provide comprehensive code manipulation tools, a
    Dependency Injection framework, and major contributions to the HTTP
  • Enrico Zimuel, who got tossed requirements for the
    cloud infrastructure component, and then had to rework most of it after
    rewriting the HTTP client from the ground up… and who still managed three
    back-to-back-to-back conferences as we prepared the release.
  • Artur Bodera, who often has played
    devil’s advocate, and persisted pressing his opinions on the direction of the
    framework, often despite heavy opposition. We may not implement all (or many)
    of the features you want, but you’ve definitely influenced the direction of
    the MVC incredibly.
  • Pádraic Brady, who
    started the runaway train rolling with a rant,
    and helped make the project much more transparent, enabling the MVC
    development to occur in the first place.

Welcome to the ZF2 beta cycle!

About Matthew Weier O'Phinney

Matthew is a Principal Engineer at Zend Technologies. He is currently project lead for both Zend Framework and Apigility; a Zend Certified Engineer; and a member of the Zend Education Advisory Board, the group responsible for authoring the Zend Certification Exam. He contributes to a number of open source projects, blogs on PHP-related topics, and presents talks and tutorials related to PHP development and the projects to which he contributes. You can read more of his thoughts on his blog, mwop.net/blog.

View all posts by Matthew Weier O'Phinney

23 Responses to “Zend Framework 2.0.0beta1 Released!”

  1. rquadling Says:

    I believe that the removal of the require_once for loading classes and the use of an autoloader was the way to go.

    Are there outstanding issues with this?

  2. emanueledeserti Says:

    Hi, I’m playing with ZF2 in an environment where my application was contained in a subfolder of apache htdocs… where’s the best place and what’s the best practice for setting the Base URL?

  3. mfsilva Says:

    Does Zend Framework 2.0 has a good/strong/correct integration with code sniffer, copy & paste detector, phpunit and php depend?

  4. weierophinney Says:

    The packages have been updated to include Zend\Form, Zend\Cloud\Infrastructure, Zend\Debug, Zend\Registry, and Zend\Version. Additionally, I’ve added links for downloading the API and End-User documentation. If you’ve had issues previously, please try again now!

  5. weierophinney Says:

    We evidently missed this when packaging; I’ll be re-issuing packages today to correct this and the other missing components.

  6. dragonos Says:

    I can’t find Zend Form in the packages.
    Should it be part of beta1?

  7. weierophinney Says:

    Thanks for the report; I’m opening an issue in our tracker to ensure these are included in our next release. Zend_Loader is deprecated, and we’ve removed usage of it throughout the framework. However, the others should definitely be included, and we’ll make sure it happens. In the meantime, you can always grab them from our git repo (and download them singly from github).

  8. weierophinney Says:

    jlzend1: the three files are mainly for consumption of a module _outside_ Zend\Module\Manager. autoload_classmap.php can be used to seed a class-map based autoloader (and, in fact, this is the recommended usage within Module classes). autoload_function.php could be used when registering directly with spl_autoload_register, but when you want to specify additional options (such as "throw" and "prepend"). autoload_register.php takes the callback returned by autoload_function.php and registers it with default options to spl_autoload_register.

    Again, though: the main point is to provide flexible options for consuming the module outside the module manager.

  9. jlzend1 Says:

    Thanks for this beta and especially! the skeleton example modules. Question: not knowing better and just coming up to speed on the design theories behind ZF2, does it make sense to try to consolidate the module autoload (register,function,classmap) files somehow ?

  10. arsenso Says:

    It looks like some files are missing in the http://packages.zendframework.com/ version. I can’t find the following files in the Zend directory:

  11. rukavina Says:

    Great news!

    I’m getting this error in apache log:

    [Sat Oct 22 09:15:53 2011] [error] [client] PHP Fatal error: Class ‘Zend\\Registry’ not found in /data/projects/zf2/beta1/library/ZendFramework/library/Zend/View/Helper/Placeholder/Registry.php on line 68

    I copied 2.0.0beta1 Standard Distribution — Full — zip in library folder.


  12. zfstudy Says:

    What a great & long waited news! First CakePHP 2 was released just a few days ago and now we got ZF2 beta! I will dive deep into that masterpiece. So thanks for the release & congrats!

  13. poisa Says:

    Congrats to everybody! The wait is over!

  14. mjehanzeb Says:

    Congrats team. We’d been waiting for this.

  15. chuckreed Says:

    Went through the quick start guide tonight, zf2 is proving to be very interesting so far.

    Had a few issues of note that may help others trying this out:

    1. In your new module’s module.config.php, the definition of Zend\Mvc\Router\Http\Literal is not properly quoted and will cause the class load to fail.

    2. The view script uses the variable $foo instead of the variable we actually set up, $message.

    3. No view/layouts/layout.phtml file exists in the skeleton module. I used the Application module’s layout as a basis for creating one.

    4. The namespace imported in the controller is incorrect and will have your controller class "extending" an interface object, which throws an error. The correct namespace to import (it appears) would be Zend\Mvc\Controller\ActionController

    Again, looking very good! Thanks guys.

  16. weierophinney Says:

    The package links have been fixed at this time; sorry for the inconvenience!

  17. flammon404 Says:

    I can’t wait to start converting some of my homebrew to use the RestfulController. ZF2 is looking really good. Thank you.

  18. tananina Says:

    Can’t wait for the RC. Downloading the package(s) now and starting to play with them. Looks quite interesting. Good job to the whole team!

  19. rafadohms Says:

    I think we should also note everyone who was present in the various irc meetings, giving us feedback and bouncing ideias around.

    Congratz to the team the the actual coders, looks like we are on a very good path.

  20. funkyfly Says:

    I mean the start guide

  21. funkyfly Says:

    Shouldn’t in the view instead of $foo be $message?

  22. mmagnet Says:

    Congratulations on reaching this important milestone!

  23. pidikun Says:

    "The requested URL /releases/ZendFramework-2.0.0beta1.tgz was not found on this server."

    Can’t wait to put my hands on.