CakePHP - The point of upgrade

  • Published on
    24-May-2015

  • View
    1.595

  • Download
    1

Embed Size (px)

Transcript

<ul><li> 1. CakePHPThe Point of Upgradefrom 1.3 to 2.x and for 3.x @slywalker (Yasuo Harada)</li></ul> <p> 2. about me 3. @slywalker 4. follo @slywalker w me! 5. github.com/slywalker 6. forkgithub.com/slywalker me! 7. TwitterBootstrap Plugingithub.com/slywalker/TwitterBootstrap 8. TwitterBootstrap Plugingithub.com/slywalker/TwitterBootstrap r s s t a8 2 1 9. CakePHP1.3 2.x 3.x ... 10. ok book.cakephp.org/2.0/ja/ kb o appendices.htmlCo o 11. Cookbook 12. 13. 14. 1.3 2.x __() echo __()$html-&gt;link() $this-&gt;Html-&gt;link() cakeError $this-&gt;data $this-&gt;request-&gt;data Component Object Component Configure::read() Configure::debug(debug) 15. CakePHP 16. 17. Upgrad e shl el 18. CakePHP 19. Usage:Console/cake upgrade -hcake upgrade [subcommand] [-h] [-v] [-q]Subcommands:allRun all upgrade commands.testsUpdate tests class names to FooTest rather than FooTestCase.locationsMove files and folders to their new homes.i18n Update the i18n translation method calls.helpersUpdate calls to helpers.basics Update removed basics functions to PHP native functions.requestUpdate removed request access, and replace with $this-&gt;request.configureUpdate Configure::read() to Configure::read(debug)constantsReplace Obsolete constantscomponents Update components to extend Component class.exceptions Replace use of cakeError with exceptions. 20. Upgrade u pgra de a ll shellke /can sole@ichikawayCo! 21. 22. Upgradeshell? 23. .htaccess core.phpbootstrap.phpindex.php 24. 25. Upgrade shell 26. 27. SecurityComponentAuthComponent 28. Upgrade shellCookbookAPI 29. 30. Up grade 31. 1.3? 32. 33. 34. find$articles = $this-&gt;Article-&gt;find( all, array( conditions =&gt; array( Article.status =&gt; enable )1.3 2.x )); 35. Model::find($conditions = null,1.3$fields = array(),$order = null,$recursive = null) 36. null,null 37. Model::find(2.x$type = first,$query = array()) 38. 39. Folder::mkdir()Folder::mv()Folder::ls() 1.3 Folder::cp()Folder::rm()Set::isEqual()String::getInstance()CakeSession::del() 40. 41. 42. 1.3! 43. 44. te d ae c r e p 45. 2.2.3 PHP 46. 1.x2.x 47. 2.0 48. EmailComponent CakeEmail 49. CakeEmail</p>