Migration from CakePHP 1.2 RC3 to RC4

Published on and tagged with cakephp  release

Today, release candidate 4 (RC4) of CakePHP 1.2 has been released (see the announcement). I don’t know why there is an additional release candidate, because RC3 was already announced as “the final release before the final release of CakePHP 1.2″…

Anyway, the update from RC3 to RC4 was smooth, and I didn’t encounter any problems so far. Besides replacing the “cake” folder I also had to replace “app/webroot/css.php”, as it had been slightly modified since RC3.

There were some changes in the core which could cause problems in some (rare) cases:

  • ClassRegistry::_duplicate() is now private (i.e. it is now ClassRegistry::__duplicate())
  • Router::matchRoute() is now private (i.e. it is now Router::__matchRoute())
  • the parameter of XmlNode::toArray() (in cake/libs/xml.php) has been changed from “$object = null” to “$camelize = true”
  • in the AclComponent the methods setAro(), setAco(), getAro() and getAco() have been removed
  • Model::normalizeFindParams() has been removed
  • the deprecated $safe parameter has been removed from JavascriptHelper::codeBlock()

Additionally, the method Model::getDisplayField() has been deprecated. Now you have to access the $displayField property directly (though the method still works).

Happy updating :)

14 comments baked

  • rafaelbandeira3

    -1 for getters deprecation : https://trac.cakephp.org/ticket/5700

    anyway, well noticed, although I think cited methods visibility changes won’t affect devs, nor even the framework itself, as those classes are not extensible, in an architectural point of view.


  • anuar

    i have this code that is not working with the new release.

    Model permiso.php
    var $useTable = 'emko_permisos';

    but i get this error

    Missing Database Table
    Error: Database table permisos for model Permiso was not found.

    its not using the useTable property i guess. Regards.

  • cakebaker

    @Rafael, anuar: Thanks for your comments!

    @Rafael: Yes, I would also like to see the usage of getter/setter-methods in the core as I’m not a big fan of all those public properties…

    Regarding the visibility changes: I think it is rather unlikely someone is affected by those changes, however, you never know how people use framework classes.

    @anuar: Hm, I can’t reproduce this issue. Did you clear the cache?

  • 7 cambios a considerar al migrar de CakePHP 1.2 RC3 a RC4

    […] Via: cakebaker […]

  • Brandon P

    I just did a checkout of the svn and WHOAH… whats up with all these core tests? There are SO many … why are they even included in the official release? IMO, the tests should be on a separate repository … possibly a part of a larger test-suite that is not integrated within the core cake directory.

    FYI, my ./cake/tests folder has 349 files, 149 folders totaling 4.05 MB. EEEEK!! Did cake eat too much at the code buffet?

  • cakebaker

    @Brandon: Thanks for your comment!

    In the past the tests (and the testsuite) were in a separate project on cakeforge, but I think it makes sense to have the tests in the same repository as the tested code, as they belong together. A class and its test build one unit, and so they should be stored in the same repository in my opinion. However, I agree with you that it would make sense to remove the tests from the releases (or better to offer packages with and without tests), as you don’t need them if you just want to use the framework.

  • CakePHP 1.2 RC4 - The most important thing « Something on Everything

    […] 2008 · No Comments CakePHP 1.2 RC4 is out, we all know. Chris, Joel, Mark, and, of course, Daniel – who also did an overview about what changed since RC3, posted about it, but everyone missed the […]

  • Corey

    I think it’s crazy that SOO much stuff is included in the cakePHP download. I’d love it if they had a “base” package you could download that just had what you absolutely need for it to work, like a minimal installation without all the bulk.

  • cakebaker

    @Corey: Thanks for your comment!

    At least the current packages are relatively lightweight (the tar.gz file is around ~400 KB) and so I think you cannot remove much to create a “base” package. What would you remove from the default package?

  • Corey

    I’d like to take out the console, tests, and cake/config/unicode
    That would remove 980KB from the package, which doesn’t seem like much, but when you are trying to FTP it somewhere after unzipping it (like to a hosting company) it can make somewhat of a difference.
    corey@DHServer:/var/www/New Folder$ du -hc –max-depth=1 cake_1.2.1.8004/cake
    132K cake_1.2.1.8004/cake/tests
    216K cake_1.2.1.8004/cake/config
    1.8M cake_1.2.1.8004/cake/libs
    684K cake_1.2.1.8004/cake/console
    2.9M cake_1.2.1.8004/cake
    2.9M total
    corey@DHServer:/var/www/New Folder$ du -hc –max-depth=1 cake_1.2.1.8004/cake/config
    200K cake_1.2.1.8004/cake/config/unicode
    216K cake_1.2.1.8004/cake/config
    216K total

    While i am complaining, and maybe you know…
    Why do the controllers have to have _controller.php on them? but models don’t have _model.php and likewise with the views.. seems kind of dumb to me.

  • Corey

    Made those modifications and have a few stats to throw back. The one i removed those files from has .min at the end:

    Number of files:
    cake_1.2.1.8004 1,142
    cake_1.2.1.8004.min 261

    cake_1.2.1.8004 3.2MB
    cake_1.2.1.8004.min 2.2MB

    Zipped Size:
    cake_1.2.1.8004 427KB
    cake_1.2.1.8004.min 328KB

  • cakebaker

    @Corey: Publish your minimized cake distro somewhere, maybe there are others who are also interested in such a distro ;-)

    And regarding your question: see the discussion on ticket #121.

  • Corey

    @cakebaker RE ticket #121: Wow, way for them not to care about what people want eh?
    Ha, i should register a cakephp-min.org and publish it there lol

  • cakebaker

    @Corey: Ah, yes, the core devs have their own mind :|

    Regarding the domain: a good idea, however, I would inquire whether you can use “cakephp” in the domain name as it is a trademark by the cake software foundation.

    To minimize the size of your min version further you could also remove most core data sources.

© daniel hofstetter. Licensed under a Creative Commons License