- Tutorials
- Blog_tutorial_-_1
- Migration
- Blog_tutorial_-_2
- Book_titles
- Pagination
- Debugging_your_code
- Extending_cake
- Multiple_applications
- Sending_email
- Scaffolding_a_blog
- Sample_layout
- Image_gallery
- Dynamic-image
- Online_editor-fckeditor
- Using_cake_with_drupal
- Cake_with_smarty
- Testing_cake_apps
- Howto_use_rdauth
- Dynamic-menu
- Your_tutorial
- Creating_pdfs
- Creating_pdfs_easy
- Cake_on_ubuntu
- Hello_world
- Complex_model_validation_routines
- User_permissions
- Cake_under_iis
- Advanced_validation
- Sending_email_with_phpmailer
- Change_database_config
- Alternative_installation_locations
- Css_in_ajax
- Css_menus
- Flashing
- Alternate_advanced_validation
- Deep_cakephp
- I18n_v2
- Building_a_cakephp_site_part_-_1
- Loading_sql_with_prefixes
- Building_a_cakephp_site_part_-_2
- Creating_a_dragglable_element
- I18n
- Online_editor-xinha
- Image_gallery_2
- Cake_migrations
- Beginners_only
- Cake_under_iis_without_rewrite
- Acl-access-checking
- Simple_pagination_helper
- Ajax_sortable_list
- Building_a_web_wizard
- Url_rewrite_without_apache
- Duplicate_record_validation
- Litte_german_example
- Authentication_with_rdsimpleauth
- Simple_contextual_help
- Passing_named_parameters
- Advanced_validation
- Calendar_pagination
- Config_in_database
- How_to_toggle_expand-collapse_with_javascript
- Xampp_vhost_config_on_windows
- Time_helper_other_languages
- Routing_for_multilanguage
- How_to_implement_single_table_inheritance
- Thumbnails_with_phpthumb
- Syncronised_session_using_cakeamfphp
- Secure_logins_with_challenge_response
- Config_in_database_2
- Installing_on_macosx
- Tinymce_with_cake
- Persistent_data
- Functional_testing_cake_apps
- Getting_paths_right
Migrating Cake from 0.9 to 0.10
Cake 0.9 has another folder structure, which sometimes made it hard to keep up with trunk (changes to be made to your application’s libs folders and so forth). This has all changed in 0.10, and with the new folder structure, the separation between your app and Cake’s internals will be clearer. More help can be found in 0.10_dev_gotchas.
What you need to start:
- your old app
- a 0.10.0 Cake release
Where to start
Backups... OK, done? Let’s go.
Moving files
The config/ folder:
Move the config/ files to app/config/.
Move your controllers into app/controllers.
Move your models into app/models.
Move your views into app/views.
Move any extra files you have in /public into app/webroot. Do not overwrite any files you are moving.
If there have been API changes to Views, make them first, then work your way backwards.
Cake Core Changes
First, your controllers need to extend your AppController rather than any helpers they may be extending. For example:
class PaymentsController extends PaymentsHelper
needs to be changed to:
class PaymentsController extends AppController
As such, you’ll need to move your vars out of your helpers and into your main controller. Any helper functions can be follow helpers usage.
Corrections to libs files
Some libs files are moved. This is what the new structure was about, after all:
uses(”dbo/dbo_mysql”, “inflector”);
has become:
uses(”model/dbo/dbo_mysql”, “inflector”);
The vendors folder is also moved:
include_once(”../vendors/dropshadow/class.dropshadow.php”);
has become:
include_once(ROOT.”vendors” .DS.”dropshadow”.DS.”class.dropshadow.php”);
Alternatively, you can use
vendors(’dropshadow.DS.class.dropshadow.php’);
Javascript in vendors/javascript goes to /app/webroot/js/
Yep. I kept some files in vendors/javascript/ - it seemed crazy. The new regime seems fine.
Move all your libs hacks
All your edits to libs files need a new home. Can you move it? Are they really not supported by the framework? Examine the methods, how they’re called, and make your changes accordingly. Some of your libs hacks can perhaps be moved to app_controller.php. Also, think about making components and helpers as this is the preferred method and can be shared more easily with the rest of the community.
more
checkout 0.10_dev_gotchas.