<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>cakebaker &#187; update</title>
	<atom:link href="http://cakebaker.42dh.com/tags/update/feed/" rel="self" type="application/rss+xml" />
	<link>http://cakebaker.42dh.com</link>
	<description>baking cakes with CakePHP</description>
	<lastBuildDate>Tue, 20 Dec 2011 15:29:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Migrating from CakePHP 1.2beta to RC1</title>
		<link>http://cakebaker.42dh.com/2008/06/05/migrating-from-cakephp-12beta-to-rc1/</link>
		<comments>http://cakebaker.42dh.com/2008/06/05/migrating-from-cakephp-12beta-to-rc1/#comments</comments>
		<pubDate>Thu, 05 Jun 2008 17:59:33 +0000</pubDate>
		<dc:creator>cakebaker</dc:creator>
				<category><![CDATA[cakephp]]></category>
		<category><![CDATA[release]]></category>
		<category><![CDATA[update]]></category>

		<guid isPermaLink="false">http://cakebaker.42dh.com/?p=610</guid>
		<description><![CDATA[You probably know it already: the first release candidate (RC1) of CakePHP 1.2 has been released today (see the announcement). Here some things I noticed/encountered while migrating from the beta version to RC1. In app/config/core.php the class name for ACL has changed. Instead of Configure::write('Acl.classname', 'DB_ACL'); it is now Configure::write('Acl.classname', 'DbAcl'); The model-based storage engine [...]]]></description>
			<content:encoded><![CDATA[<p>You probably know it already: the first release candidate (RC1) of CakePHP 1.2 has been released today (see the <a href="http://bakery.cakephp.org/articles/view/release-pure-cake-power-in-rc1">announcement</a>).</p>
<p>Here some things I noticed/encountered while migrating from the beta version to RC1.</p>
<p>In app/config/core.php the class name for ACL has changed. Instead of</p>
<pre>
Configure::write('Acl.classname', 'DB_ACL');
</pre>
<p>it is now</p>
<pre>
Configure::write('Acl.classname', 'DbAcl');
</pre>
<p>The model-based storage engine for the cache (cake/libs/cache/model.php) has been removed.</p>
<p>Probably the first thing you notice when you migrate to the new version are the warnings caused by the deprecated &#8220;vendor&#8221; function. This function has been replaced by App::import(). Unfortunately, you can&#8217;t perform a simple search/replace operation as files/directories which don&#8217;t follow the cake conventions have to be treated differently (see also <a href="http://cakebaker.42dh.com/2008/03/26/loading-vendor-files/">Loading vendor files</a>). Examples:</p>
<pre>
App::import('Vendor', 'follows/cake/conventions'); // .php is automatically appended
App::import('Vendor', 'unconventional', array('file' =&gt; 'doesnt/follow/Cake/Conventions.php');
</pre>
<p>Another newly deprecated method you might use is Model::execute(). It has been replaced by Model::query(). This time you can use search/replace.</p>
<p>With Model::find() I encountered a situation, where the method didn&#8217;t return any data. I don&#8217;t know whether it is a bug or simply no longer supported. Here the code I used (simplified):</p>
<pre>
$this-&gt;Location-&gt;find('list', array('fields' =&gt; 'id, name'));
</pre>
<p>It performs the correct SQL statement, but somehow the preparation of the result doesn&#8217;t work. A simple workaround is to use the model alias for the field names:</p>
<pre>
$this-&gt;Location-&gt;find('list', array('fields' =&gt; 'Location.id, Location.name'));
</pre>
<p>Or as mentioned by Xr in a <a href="http://cakebaker.42dh.com/2008/06/05/migrating-from-cakephp-12beta-to-rc1/#comment-93165">comment</a>:</p>
<pre>
$this-&gt;Location-&gt;find('list');
</pre>
<p>A new feature of the FormHelper caused a visual problem in my application: it adds a class with the name of the input type to the respective input field (e.g. &#8220;text&#8221; to a text field, &#8220;password&#8221; to a password field, etc.). As I already used a CSS class with the name &#8220;text&#8221;, my forms looked a bit ugly after the update ;-)</p>
<p>The latest issue I encountered was a blank page (only the performed SQL statements were shown). It was caused by the following snippet which worked with the beta version (don&#8217;t ask me why there was an exit at the end of the method *g*):</p>
<pre>
public function xy() {
    ...
    $this-&gt;render('aview');
    exit;
}
</pre>
<p>After removing the exit, the view was rendered as expected, obviously something changed internally.</p>
<p>All in all, the migration was quite smooth. Thanks to the cake team for this piece of cake :)</p>
]]></content:encoded>
			<wfw:commentRss>http://cakebaker.42dh.com/2008/06/05/migrating-from-cakephp-12beta-to-rc1/feed/</wfw:commentRss>
		<slash:comments>29</slash:comments>
		</item>
		<item>
		<title>Upgrading from CakePHP 1.2 pre-beta to the beta version</title>
		<link>http://cakebaker.42dh.com/2008/01/02/upgrading-from-cakephp-12-pre-beta-to-the-beta-version/</link>
		<comments>http://cakebaker.42dh.com/2008/01/02/upgrading-from-cakephp-12-pre-beta-to-the-beta-version/#comments</comments>
		<pubDate>Wed, 02 Jan 2008 14:44:51 +0000</pubDate>
		<dc:creator>cakebaker</dc:creator>
				<category><![CDATA[cakephp]]></category>
		<category><![CDATA[problem]]></category>
		<category><![CDATA[update]]></category>

		<guid isPermaLink="false">http://cakebaker.42dh.com/2008/01/02/upgrading-from-cakephp-12-pre-beta-to-the-beta-version/</guid>
		<description><![CDATA[Today, the beta version of CakePHP 1.2 has been released (see the announcement) and the website got a new design, which is really nice. Here some things I noticed while upgrading Noserub from pre-beta to beta: The folder &#8220;cake/locale&#8221; has been removed. It contained the template for translating the core. It seems this file has [...]]]></description>
			<content:encoded><![CDATA[<p>Today, the beta version of CakePHP 1.2 has been released (see the <a href="http://bakery.cakephp.org/articles/view/new-year-new-beta">announcement</a>) and the website got a  new design, which is really nice.</p>
<p>Here some things I noticed while upgrading <a href="http://noserub.com">Noserub</a> from pre-beta to beta:</p>
<p>The folder &#8220;cake/locale&#8221; has been removed. It contained the template for translating the core. It seems this file has been moved to the <a href="http://cakeforge.org/projects/translations/">translations project</a> on <a href="http://cakeforge.org">CakeForge</a>.</p>
<p>The files AppController, AppModel, and AppHelper have been moved from &#8220;cake&#8221; to &#8220;cake/libs/controller&#8221;, &#8220;cake/libs/model&#8221;, resp. &#8220;cake/libs/view/helpers&#8221;.</p>
<p>The folder &#8220;cake/libs/view/templates&#8221; has been removed and its subfolders are now direct subfolders of &#8220;cake/libs/view&#8221;.</p>
<p>In &#8220;app/config/sql&#8221; three files have been added: &#8220;db_acl.php&#8221;, &#8220;i18n.php&#8221;, and &#8220;sessions.php&#8221;.</p>
<p>In &#8220;app/config/core.php&#8221; the constant COMPRESS_CSS has been removed. On the other hand three new config entries were added: &#8220;App.encoding&#8221;, &#8220;Asset.filter.css&#8221;, and &#8220;Asset.filter.js&#8221;. The two latter are commented out by default.</p>
<p>While running the application I got some messages that the functions loadModel(), listClasses() and Model::generateList() are now deprecated. Thanks to the help messages it was easy to fix them.</p>
<p>The only bigger issue I encountered up to now was a change in the API for writing custom validation methods. Here some code from my model to illustrate the problem:</p>
<pre>
var $validate = array('passwd2'  =&gt; array('rule' =&gt; 'validatePasswd2'));

function validatePasswd2($value, $params = array()) {
    if ($this-&gt;data['Identity']['passwd'] !== $value) {
        return false;
    } else {
        return true;
    }
}
</pre>
<p>This code worked fine with the pre-beta, but with the beta version the type of $value has been changed, it is now an array instead of a string (see the explanation for <a href="https://trac.cakephp.org/ticket/3797">ticket 3797</a>). And so the code above will always return false. To fix it, the comparison has to be changed to:</p>
<pre>
if ($this-&gt;data['Identity']['passwd'] !== $value['passwd2'])
</pre>
<p>That&#8217;s it, good luck with upgrading :)</p>
]]></content:encoded>
			<wfw:commentRss>http://cakebaker.42dh.com/2008/01/02/upgrading-from-cakephp-12-pre-beta-to-the-beta-version/feed/</wfw:commentRss>
		<slash:comments>32</slash:comments>
		</item>
	</channel>
</rss>

