CakePHP 2.0 released

by lorenzo
The CakePHP core team is very exited to announce a major jump in the version numbering. CakePHP 2.0 stable is out! we have put endless hours into this release and great ideas have made it into the the framework for this version. This is a quick summary of what 2.0 means for you

The CakePHP core team is very exited to announce a major jump in the version numbering. CakePHP 2.0 stable is out! we have put endless hours into this release and great ideas have made it into the the framework for this version. This is a quick summary of what 2.0 means for you:

  • We have dropped PHP 4 support and we have refactored all the code to be strictly compliant with PHP 5.2+.
  • Use of native features like exceptions, PDO, SPL, json_encode and much more.
  • Embraced the PSR-0 recommendation for file naming. Now all your classes map to a file with the same name. Less things to remember!
  • New Error and Exception handlers provide easier to configure, and ease working with errors such as page not found, unauthorized error and lots more.
  • Improved I18n functions for easier multilingual development.
  • Support for injecting your own objects to act as CakePHP libraries, such as component, helpers and behaviors, no more excuses for modifying core files.
  • Console libraries rebuilt from scratch, automatic help generation, parameter checking, and colors!
  • New Request and Response objects for easier handling of HTTP requests.
  • Better session handling for easier custom engines. Put your sessions into storage systems like Memcache with less effort.
  • Completely refactored Auth system. It is now easier to configure and plug in your own implementations for external login services or your permissions system.
  • Brand new email library with support for multiple transports. With easy to use global configuration, logging, and charset support.
  • Dropped SimpleUnit in favor of PHPUnit. PHPUnit is the defacto testing framework for PHP with support for more options, better mock objects, and improved console output [16]
  • Reworked the SecurityComponent to suck less, now you can more easily protect your apps against CSRF and form tampering attacks while having fun.
  • Improved support for PostgreSql, SQLite and SqlServer, they are now first class citizens along with Mysql datasource.
  • HTML 5 form inputs support in form helper.
  • A Sexier default look taking advantage of new CSS 3 features.
  • A lot faster, almost everything is now lazy-loaded, and even on debug mode you will feel your applications flying.

We are probably falling short in describing all the goodness CakePHP 2.0 is bundling, so we invite you to read the excellent new book[1] that we have put together to make this release the best documented version of the framework yet. You're invited to watch this video[2] to get a better idea of all the goodness inside 2.0, we also have slides! [3] Also take some time to check out this video[4] that details the roadmap we followed to bring you today's release. The overall CakePHP ecosystem has also been improved. We took the time to make the complete core test suite run with a single command. This allowed us to measure the health of the core code using the new continuous integration server[5]. We are more confident than ever, that this is a rock solid framework.

For those of you migrating from CakePHP 1.3, please check the very detailed migration guide[6] and make sure you use the new Upgrade shell bundled with this release. A lot of applications have already been migrated and overall opinions on the process is that it is very smooth and straight forward. This version already comes with a complete working ecosystem of well known and new plugins. This is a list of some noteworthy:

  • DebugKit [7]: provides a development toolbar an additional tools to measure performance, get requests history, inspect view variables and other goodies.
  • AclExtras [8]: easy generation and synchronization of Access control objects for you ACL permissions
  • Localized [9]: A set of country specific classes for validation a displaying correct texts for each country in your application
  • Datasources [10]: Additional datasources such as XmlRPC, Ldap, and more
  • Migrations [11]: Easy database schema migrations and history tracking
  • Search [12]: Create complex search queries out from url requests in minutes
  • Entity [13]: Make your models return objects instead of arrays
  • MongoDb [14]: A drop in solution to use MongoDB as a database, you won't even notice you changed the datasource!
  • MongoCake [15]: Compatibility bridge with Doctrine ODM to use MongoDB and return objects in models

Since 2.0.0-RC3 there have been 79 commits and 20 tickets resolved. Some of the changes include:

  • Added support for configuring the body and header charset in CakeEmail, this allows users to send emails in japanese charsets.
  • Updated all internal documentation links.
  • Dropped string syntax for configuring behaviors and helpers. It is not possible to do array('MyBehavior' => 'config string') use the array syntax instead.
  • Using sessions with custom adapters will not throw errors anymore.
  • Unused Exception classes were removed.

A huge thanks to all involved in terms of both contributions through commits, tickets, documentation edits, and otherwise contribute to the framework. Without you there would be no CakePHP.

Download a packaged release [17] View the changelog [18]



More on News



  • kizoyun posted on 11/15/11 12:45:06 AM
    very good job,thanks
  • celsowm posted on 10/25/11 08:00:01 PM
    in talk about "Data Mapper Pattern in 2.X", how this works?
  • jchasefinch posted on 10/21/11 02:25:23 PM
    It all looks great, except for that "CakePHP Training" graphic that's included with the default page.

    I don't think I'd mind it so much if it didn't have that nasty-large drop shadow under the black text, but I'm not looking forward to seeing that with each new application I build. Oh well, small price to pay, the framework looks great!
    • lorenzo posted on 10/21/11 02:53:05 PM
      [quote] It all looks great, except for that "CakePHP Training" graphic that's included with the default page.
      [end quote]
      Just remember that you can remove the default layout with your own, and of course change the code for the default homepage. :)
  • KoPanda posted on 10/21/11 11:29:55 AM
    Thank you so much! I'm baking another cake now!
  • webdesigndude posted on 10/21/11 08:41:36 AM
    It feels great when you see something realy good growing!
    The Migration Guide between 1.3 and 2.0 is also good described.

    Have Fun with 2.0!
  • kicaj posted on 10/20/11 06:54:31 PM
    Is writed: "Improved I18n functions for easier multilingual development." what do You mine?

    Greate job, guys!
  • supratux posted on 10/20/11 02:52:40 PM
    Muchas gracias por este maravilloso framework.

    Thank you!!
  • chaicsxmx2 posted on 10/19/11 06:36:59 PM
    Thank you very much.
    I love CakePHP.
  • clsolorzano posted on 10/18/11 10:08:11 PM
    saludos cordiales desde ecuador. muchos esperábamos Este lanzamiento. Y aunque Soy nuevo en Este campo me ha gustado mucho Este framework. Felicitaciones al equipo de desarrollo
  • edap posted on 10/18/11 03:23:21 PM
    Thank you for the cakes
  • mariayone posted on 10/18/11 01:39:23 PM
    Hello friends, I need the article in Spanish please. Thanks
  • internetlab posted on 10/18/11 04:19:02 AM
    Congratulations CakePHP team, you've been doing an awesome job. Seems new release has lot of cool features. Can't wait to taste new Cake..
  • sachy posted on 10/18/11 02:55:29 AM
    Hi lorenzo,
    thank you for your great article.
    I found this is very useful and let Japanese CakeBaker know about this.
    Google's auto translation seems broken, so I made Japanese translation on my blog.
    And also, could you please check the link [12]? It seems duplicated of [13] .
  • binarydigital posted on 10/18/11 02:11:43 AM
    Hey Guys,
    Congratulations and thanks for the awesome upgrade, I have been using 2.0 for a little while now and it is a massive upgrade on 1.3
  • zhaff posted on 10/17/11 11:51:18 PM
    thank you guys. cant wait to try the latest version. I have been working with cakephp almost 2 months now, really like the way the framework works. thanks again.
  • Brade posted on 10/17/11 07:31:54 PM
    can't wait to give it a whirl!
  • creatix posted on 10/17/11 05:47:06 PM
    Great news and thank for this awesome framework
  • Korowiov posted on 10/17/11 05:09:39 PM
    I am going to give it a go, sounds promising. Actually this release made me rethink my plans towards a website I plan to rebuild...
  • NOSLOW posted on 10/17/11 01:08:28 PM
    Congratulations on reaching such a huge milestone for the project! I know it's been a lot of hard work for a long time. Thanks for keeping it going stronger than ever!
  • sasquall posted on 10/17/11 09:31:50 AM
    Good job guys, and thank you!

    Im all exited to use it!
  • loki_racer posted on 10/17/11 08:40:21 AM
    "Reworked the SecurityComponent to not suck less" I think should read "Reworked the SecurityComponent to now suck less"
  • tpuglia posted on 10/17/11 04:14:30 AM
    Awesome. Great work guys....
  • thedilab posted on 10/17/11 01:39:05 AM
    Thanks, team, for this awesome framework.
  • HeathNail posted on 10/17/11 01:31:12 AM
    I really like the direction the framework is heading. Keep up the good work! :)
login to post a comment.