Yesterday I got asked by Beth in a comment whether there is a list of deprecated stuff. As I am not aware of such a list I compiled one by searching for the term “deprecated” in the cake folder of CakePHP 1.2beta. You find the results below. Most of the deprecated stuff still works, but some of it will show you a notice when used during development (when debug > 0). It is recommended to no longer use the deprecated stuff, as it is possible it will be removed in future releases. Ok, here we go:
On the console the command
cake acl initdb
has been replaced by
cake schema run create DbAcl
In basics.php all load functions have been replaced by App::import(): loadView(), loadModel(), loadController(), loadHelper(), loadPluginHelper(), loadComponent(), loadPluginComponent(), loadBehavior(), loadModels(), loadPluginModels(), and loadControllers().
The function listClasses() has been replaced by Configure::listObjects(), and the implementations of setUri() and setUrl() have been moved to the dispacher and are now called uri() resp. getUrl().
The initialization of the cookie component has changed, it should be configured in the beforeFilter of the controller and therefore the initialize() method should no longer be used.
The implementation of cleanUpFields() has been moved from the controller to Model::deconstruct().
In the model two methods are deprecated: loadInfo() has been replaced by Model::schema() and generateList() by Model::find(‘list’). Also the parameter usage of validates() and invalidFields() has been deprecated, you have to set the $data property instead.
In the form helper the method submitImage() should no longer be used, instead the submit() method can be used.
As there is the form helper for creating form elements, all form-related methods in the HTML helper are deprecated: radio(), password(), textarea(), checkbox(), hidden(), input(), tagValue(), validate(), validateErrors(), and tagErrorMsg().
In the helper class the method setFormTag() has been replaced by setEntity().
The properties $themeElement, $themeLayout, and $themePath are no longer needed in the theme class.
In the file class many methods have been renamed, and therefore the old names are deprecated: getFullPath(), getName(), fileName(), getExt(), getMd5(), getSize(), getOwner(), getGroup(), getChmod(), and getFolder().
The functionality of chmodr() and mkdirr() from the folder class is now handled by chmod() resp. mkdir().
In the router the routes for web services are deprecated: “/rest/”, “/rss/”, “/soap/”, “/xml/”, and “/xmlrpc/”. The same is true for the routes “/bare/” and “/ajax/”.
Last, but not least, the validation constants VALID_NOT_EMPTY, VALID_NUMBER, VALID_EMAIL, and VALID_YEAR are deprecated.