Permalink
Browse files

Merge remote-tracking branch 'origin/master'

  • Loading branch information...
2 parents 8d04bc2 + d190c43 commit ecd2b544ac005eea8c502c85158552d8c4445aea @lorenzo lorenzo committed Nov 25, 2012
Showing with 17,004 additions and 12,826 deletions.
  1. +2 −1 .gitignore
  2. +1 −1 Makefile
  3. +7 −1 config/all.py
  4. BIN en/_static/.DS_Store
  5. +0 −26 en/appendices/2-0-migration-guide.rst
  6. +0 −2 en/appendices/2-1-migration-guide.rst
  7. +4 −6 en/appendices/2-2-migration-guide.rst
  8. +98 −6 en/appendices/2-3-migration-guide.rst
  9. +1 −1 en/appendices/cakephp-development-process.rst
  10. +0 −2 en/appendices/glossary.rst
  11. +14 −35 en/appendices/migrating-from-cakephp-1-2-to-1-3.rst
  12. +15 −60 en/appendices/new-features-in-cakephp-1-3.rst
  13. +6 −24 en/appendices/new-features-in-cakephp-2-0.rst
  14. +5 −12 en/appendices/new-features-in-cakephp-2-1.rst
  15. +1 −2 en/appendices/phpunit-migration-hints.rst
  16. +1 −1 en/cakephp-overview.rst
  17. +1 −1 en/cakephp-overview/understanding-model-view-controller.rst
  18. +1 −1 en/cakephp-overview/where-to-get-help.rst
  19. +1 −31 en/console-and-shells.rst
  20. +1 −1 en/console-and-shells/acl-shell.rst
  21. +1 −1 en/console-and-shells/code-generation-with-bake.rst
  22. +2 −2 en/console-and-shells/cron-jobs.rst
  23. +0 −2 en/console-and-shells/schema-management-and-migrations.rst
  24. +1 −1 en/console-and-shells/testsuite-shell.rst
  25. +1 −1 en/contributing.rst
  26. +0 −18 en/contributing/cakephp-coding-conventions.rst
  27. +21 −2 en/contributing/code.rst
  28. +1 −1 en/contributing/tickets.rst
  29. +0 −30 en/controllers.rst
  30. +0 −14 en/controllers/components.rst
  31. +1 −1 en/controllers/pages-controller.rst
  32. +74 −75 en/controllers/request-response.rst
  33. +3 −9 en/controllers/scaffolding.rst
  34. +24 −62 en/core-libraries.rst
  35. +1 −10 en/core-libraries/behaviors/acl.rst
  36. +1 −15 en/core-libraries/behaviors/containable.rst
  37. +23 −49 en/core-libraries/behaviors/translate.rst
  38. +51 −72 en/core-libraries/behaviors/tree.rst
  39. +2 −11 en/core-libraries/caching.rst
  40. +3 −15 en/core-libraries/collections.rst
  41. +1 −11 en/core-libraries/components/access-control-lists.rst
  42. +10 −27 en/core-libraries/components/authentication.rst
  43. +9 −8 en/core-libraries/components/cookie.rst
  44. +1 −1 en/core-libraries/components/email.rst
  45. +1 −21 en/core-libraries/components/pagination.rst
  46. +0 −7 en/core-libraries/components/request-handling.rst
  47. +1 −8 en/core-libraries/components/security-component.rst
  48. +1 −14 en/core-libraries/components/sessions.rst
  49. +0 −14 en/core-libraries/events.rst
  50. +1 −2 en/core-libraries/global-constants-and-functions.rst
  51. +4 −6 en/core-libraries/helpers/cache.rst
  52. +172 −142 en/core-libraries/helpers/form.rst
  53. +151 −86 en/core-libraries/helpers/html.rst
  54. +14 −37 en/core-libraries/helpers/js.rst
  55. +1 −1 en/core-libraries/helpers/number.rst
  56. +91 −67 en/core-libraries/helpers/paginator.rst
  57. +0 −7 en/core-libraries/helpers/rss.rst
  58. +6 −7 en/core-libraries/helpers/session.rst
  59. +0 −1 en/core-libraries/helpers/text.rst
  60. +3 −4 en/core-libraries/helpers/time.rst
  61. +0 −9 en/core-libraries/internationalization-and-localization.rst
  62. +54 −45 en/core-libraries/logging.rst
  63. +10 −0 en/core-libraries/toc-behaviors.rst
  64. +14 −0 en/core-libraries/toc-components.rst
  65. +10 −0 en/core-libraries/toc-general-purpose.rst
  66. +16 −0 en/core-libraries/toc-helpers.rst
  67. +22 −0 en/core-libraries/toc-utilities.rst
  68. +0 −18 en/core-utility-libraries/app.rst
  69. +16 −19 en/core-utility-libraries/email.rst
  70. +16 −1 en/core-utility-libraries/file-folder.rst
  71. +0 −21 en/core-utility-libraries/hash.rst
  72. +37 −12 en/core-utility-libraries/httpsocket.rst
  73. +1 −1 en/core-utility-libraries/inflector.rst
  74. +70 −15 en/core-utility-libraries/number.rst
  75. +1 −1 en/core-utility-libraries/router.rst
  76. +0 −4 en/core-utility-libraries/sanitize.rst
  77. +0 −6 en/core-utility-libraries/security.rst
  78. +1 −28 en/core-utility-libraries/set.rst
  79. +1 −12 en/core-utility-libraries/string.rst
  80. +0 −14 en/core-utility-libraries/time.rst
  81. +1 −19 en/core-utility-libraries/xml.rst
  82. +1 −1 en/deployment.rst
  83. +10 −19 en/development/configuration.rst
  84. +0 −5 en/development/debugging.rst
  85. +0 −8 en/development/dispatch-filters.rst
  86. +0 −4 en/development/errors.rst
  87. +178 −169 en/development/exceptions.rst
  88. +0 −5 en/development/rest.rst
  89. +13 −53 en/development/routing.rst
  90. +0 −13 en/development/sessions.rst
  91. +27 −41 en/development/testing.rst
  92. +1 −1 en/development/vendor-packages.rst
  93. +0 −1 en/getting-started/cakephp-conventions.rst
  94. +1 −1 en/getting-started/cakephp-folder-structure.rst
  95. +2 −2 en/getting-started/cakephp-structure.rst
  96. +0 −1 en/installation.rst
  97. +0 −1 en/installation/advanced-installation.rst
  98. +0 −3 en/models.rst
  99. +1 −5 en/models/additional-methods-and-properties.rst
  100. +81 −101 en/models/associations-linking-models-together.rst
  101. +0 −22 en/models/behaviors.rst
  102. +1 −6 en/models/callback-methods.rst
  103. +105 −71 en/models/data-validation.rst
  104. +1 −7 en/models/data-validation/validating-data-from-the-controller.rst
  105. +23 −32 en/models/datasources.rst
  106. +1 −3 en/models/deleting-data.rst
  107. +0 −10 en/models/model-attributes.rst
  108. +15 −35 en/models/retrieving-your-data.rst
  109. +12 −33 en/models/saving-your-data.rst
  110. +0 −3 en/models/transactions.rst
  111. +0 −12 en/models/virtual-fields.rst
  112. +1 −1 en/pdf-contents.rst
  113. +1 −16 en/plugins.rst
  114. +1 −1 en/tutorials-and-examples.rst
  115. BIN en/tutorials-and-examples/.DS_Store
  116. +23 −30 en/tutorials-and-examples/blog-auth-example/auth.rst
  117. +7 −18 en/tutorials-and-examples/blog/blog.rst
  118. +39 −39 en/tutorials-and-examples/blog/part-two.rst
  119. +4 −9 en/tutorials-and-examples/simple-acl-controlled-application/part-two.rst
  120. +12 −16 en/tutorials-and-examples/simple-acl-controlled-application/simple-acl-controlled-application.rst
  121. +89 −38 en/views.rst
  122. +0 −13 en/views/helpers.rst
  123. +12 −8 en/views/json-and-xml-views.rst
  124. +3 −2 en/views/media-view.rst
  125. +4 −5 en/views/themes.rst
  126. +1 −1 es/cakephp-overview.rst
  127. +1 −1 es/cakephp-overview/understanding-model-view-controller.rst
  128. +1 −1 es/cakephp-overview/what-is-cakephp-why-use-it.rst
  129. +1 −1 es/cakephp-overview/where-to-get-help.rst
  130. +0 −1 es/getting-started/cakephp-conventions.rst
  131. +0 −1 es/installation.rst
  132. +0 −5 es/tutorials-and-examples/blog/blog.rst
  133. +17 −33 es/tutorials-and-examples/blog/part-two.rst
  134. +24 −5 fr/appendices.rst
  135. +48 −72 fr/appendices/2-0-migration-guide.rst
  136. +13 −20 fr/appendices/2-1-migration-guide.rst
  137. +358 −0 fr/appendices/2-2-migration-guide.rst
  138. +249 −0 fr/appendices/2-3-migration-guide.rst
  139. +1 −1 fr/appendices/cakephp-development-process.rst
  140. +1 −3 fr/appendices/glossary.rst
  141. +58 −58 fr/appendices/migrating-from-cakephp-1-2-to-1-3.rst
  142. +21 −21 fr/appendices/new-features-in-cakephp-1-3.rst
  143. +153 −139 fr/appendices/new-features-in-cakephp-2-0.rst
  144. +79 −62 fr/appendices/new-features-in-cakephp-2-1.rst
  145. +2 −3 fr/appendices/phpunit-migration-hints.rst
  146. +24 −24 fr/cakephp-overview/understanding-model-view-controller.rst
  147. +14 −10 fr/cakephp-overview/what-is-cakephp-why-use-it.rst
  148. +7 −7 fr/cakephp-overview/where-to-get-help.rst
  149. +274 −270 fr/console-and-shells.rst
  150. +1 −2 fr/console-and-shells/acl-shell.rst
  151. +14 −14 fr/console-and-shells/code-generation-with-bake.rst
  152. +2 −2 fr/console-and-shells/cron-jobs.rst
  153. +1 −1 fr/console-and-shells/i18n-shell.rst
  154. +1 −0 fr/console-and-shells/schema-management-and-migrations.rst
  155. +1 −1 fr/console-and-shells/testsuite-shell.rst
  156. +5 −1 fr/contents.rst
  157. +1 −1 fr/contributing.rst
  158. +1 −13 fr/contributing/cakephp-coding-conventions.rst
  159. +1 −1 fr/contributing/tickets.rst
  160. +404 −408 fr/controllers.rst
  161. +59 −69 fr/controllers/components.rst
  162. +11 −11 fr/controllers/pages-controller.rst
  163. +28 −54 fr/controllers/request-response.rst
  164. +20 −25 fr/controllers/scaffolding.rst
  165. +8 −7 fr/core-libraries.rst
  166. +53 −46 fr/core-libraries/behaviors/acl.rst
  167. +110 −82 fr/core-libraries/behaviors/containable.rst
  168. +85 −84 fr/core-libraries/behaviors/translate.rst
  169. +163 −205 fr/core-libraries/behaviors/tree.rst
  170. +26 −47 fr/core-libraries/caching.rst
  171. +59 −62 fr/core-libraries/collections.rst
  172. +124 −165 fr/core-libraries/components/access-control-lists.rst
  173. +270 −307 fr/core-libraries/components/authentication.rst
  174. +4 −13 fr/core-libraries/components/cookie.rst
  175. +18 −20 fr/core-libraries/components/email.rst
  176. +24 −62 fr/core-libraries/components/pagination.rst
  177. +13 −36 fr/core-libraries/components/request-handling.rst
  178. +25 −62 fr/core-libraries/components/security-component.rst
  179. +9 −35 fr/core-libraries/components/sessions.rst
  180. +229 −226 fr/core-libraries/events.rst
  181. +24 −36 fr/core-libraries/global-constants-and-functions.rst
  182. +24 −43 fr/core-libraries/helpers/cache.rst
  183. +368 −388 fr/core-libraries/helpers/form.rst
  184. +142 −137 fr/core-libraries/helpers/html.rst
  185. +19 −54 fr/core-libraries/helpers/js.rst
  186. +12 −11 fr/core-libraries/helpers/number.rst
  187. +150 −143 fr/core-libraries/helpers/paginator.rst
  188. +99 −102 fr/core-libraries/helpers/rss.rst
  189. +51 −53 fr/core-libraries/helpers/session.rst
  190. +41 −38 fr/core-libraries/helpers/text.rst
  191. +32 −30 fr/core-libraries/helpers/time.rst
  192. +8 −14 fr/core-libraries/internationalization-and-localization.rst
  193. +8 −28 fr/core-libraries/logging.rst
  194. +192 −190 fr/core-utility-libraries/app.rst
  195. +205 −195 fr/core-utility-libraries/email.rst
  196. +128 −119 fr/core-utility-libraries/file-folder.rst
  197. +889 −0 fr/core-utility-libraries/hash.rst
  198. +125 −126 fr/core-utility-libraries/httpsocket.rst
  199. +13 −12 fr/core-utility-libraries/inflector.rst
  200. +137 −137 fr/core-utility-libraries/number.rst
  201. +9 −8 fr/core-utility-libraries/router.rst
  202. +60 −59 fr/core-utility-libraries/sanitize.rst
  203. +23 −23 fr/core-utility-libraries/security.rst
  204. +231 −248 fr/core-utility-libraries/set.rst
  205. +92 −94 fr/core-utility-libraries/string.rst
  206. +79 −89 fr/core-utility-libraries/time.rst
  207. +120 −123 fr/core-utility-libraries/xml.rst
  208. +2 −2 fr/deployment.rst
  209. +4 −5 fr/development.rst
  210. +427 −394 fr/development/configuration.rst
  211. +101 −101 fr/development/debugging.rst
  212. +249 −0 fr/development/dispatch-filters.rst
  213. +59 −54 fr/development/errors.rst
  214. +214 −202 fr/development/exceptions.rst
  215. +111 −111 fr/development/rest.rst
  216. +570 −564 fr/development/routing.rst
  217. +182 −164 fr/development/sessions.rst
  218. +569 −545 fr/development/testing.rst
  219. +8 −9 fr/development/vendor-packages.rst
  220. +27 −24 fr/getting-started/a-typical-cakephp-request.rst
  221. +48 −54 fr/getting-started/cakephp-conventions.rst
  222. +7 −7 fr/getting-started/cakephp-folder-structure.rst
  223. +38 −38 fr/getting-started/cakephp-structure.rst
  224. +16 −9 fr/index.rst
  225. +16 −18 fr/installation.rst
  226. +24 −24 fr/installation/advanced-installation.rst
  227. +35 −38 fr/models.rst
  228. +15 −18 fr/models/additional-methods-and-properties.rst
  229. +404 −391 fr/models/associations-linking-models-together.rst
  230. +195 −201 fr/models/behaviors.rst
  231. +82 −81 fr/models/callback-methods.rst
  232. +439 −473 fr/models/data-validation.rst
  233. +8 −14 fr/models/data-validation/validating-data-from-the-controller.rst
  234. +53 −57 fr/models/datasources.rst
  235. +42 −39 fr/models/deleting-data.rst
  236. +20 −27 fr/models/model-attributes.rst
  237. +435 −446 fr/models/retrieving-your-data.rst
  238. +339 −336 fr/models/saving-your-data.rst
  239. +3 −5 fr/models/transactions.rst
  240. +24 −35 fr/models/virtual-fields.rst
  241. +2 −2 fr/pdf-contents.rst
  242. +219 −224 fr/plugins.rst
  243. +3 −4 fr/tutorials-and-examples.rst
  244. +90 −97 fr/tutorials-and-examples/blog-auth-example/auth.rst
  245. +12 −15 fr/tutorials-and-examples/blog/blog.rst
  246. +81 −79 fr/tutorials-and-examples/blog/part-two.rst
  247. +23 −28 fr/tutorials-and-examples/simple-acl-controlled-application/part-two.rst
  248. +56 −65 fr/tutorials-and-examples/simple-acl-controlled-application/simple-acl-controlled-application.rst
  249. +15 −38 fr/views.rst
  250. +20 −33 fr/views/helpers.rst
  251. +4 −7 fr/views/json-and-xml-views.rst
  252. +3 −5 fr/views/media-view.rst
  253. +13 −16 fr/views/themes.rst
  254. +6 −6 ja/appendices/2-0-migration-guide.rst
  255. +9 −8 ja/appendices/migrating-from-cakephp-1-2-to-1-3.rst
  256. +12 −0 ja/console-and-shells/testsuite-shell.rst
  257. +15 −0 ja/contributing/code.rst
  258. +6 −5 ja/controllers/components.rst
  259. +7 −7 ja/controllers/request-response.rst
  260. +1 −1 ja/core-utility-libraries/set.rst
  261. +310 −0 ja/development/debugging.rst
  262. +192 −0 ja/development/errors.rst
  263. +755 −0 ja/development/exceptions.rst
  264. +234 −0 ja/development/rest.rst
  265. +2 −1 ja/getting-started/cakephp-structure.rst
  266. +38 −15 ja/models/associations-linking-models-together.rst
  267. +1 −1 ja/models/retrieving-your-data.rst
  268. +872 −0 ja/models/saving-your-data.rst
  269. +1 −0 ja/plugins.rst
  270. +6 −0 ja/tutorials-and-examples/simple-acl-controlled-application/simple-acl-controlled-application.rst
  271. +3 −0 ja/views/media-view.rst
  272. +7 −4 ja/views/themes.rst
  273. +0 −5 pt/appendices/2-1-migration-guide.rst
  274. +0 −12 pt/contributing/cakephp-coding-conventions.rst
  275. +0 −28 pt/controllers.rst
  276. +0 −10 pt/controllers/components.rst
  277. +0 −20 pt/controllers/request-response.rst
  278. +0 −3 pt/controllers/scaffolding.rst
  279. +0 −1 pt/getting-started/cakephp-conventions.rst
  280. +0 −1 pt/installation.rst
  281. +0 −1 pt/installation/advanced-installation.rst
  282. +1 −14 pt/plugins.rst
  283. +8 −15 pt/tutorials-and-examples/blog-auth-example/auth.rst
  284. +0 −2 pt/tutorials-and-examples/blog/blog.rst
  285. +22 −18 pt/tutorials-and-examples/blog/part-two.rst
  286. +23 −40 pt/views.rst
  287. +705 −0 ru/controllers.rst
  288. +260 −0 ru/controllers/components.rst
  289. +0 −1 ru/installation.rst
  290. +0 −3 ru/models.rst
  291. +0 −13 ru/plugins.rst
  292. +10 −18 ru/views.rst
  293. +2 −5 themes/cakephp/layout.html
  294. +1 −1 themes/cakephp/search.html
  295. +1 −1 themes/cakephp/searchbox.html
  296. +1 −1 themes/cakephp/static/default.css
  297. +13 −0 themes/cakephp/static/opensearchdescription-book-2-x.xml
View
@@ -1,4 +1,5 @@
*.pyc
build/*
*/_build/*
-.DS_Store
+.DS_Store
+.project
View
@@ -69,7 +69,7 @@ website-dirs:
website: website-dirs html populate-index epub pdf
# Move HTML
$(foreach lang, $(LANGS), cp -r build/html/$(lang) $(DEST)/$(lang);)
-
+
# Move EPUB files
$(foreach lang, $(LANGS), cp -r build/epub/$(lang)/*.epub $(DEST)/_downloads/$(lang) || true;)
View
@@ -71,7 +71,7 @@
# A list of ignored prefixes for module index sorting.
#modindex_common_prefix = []
-highlight_language = 'php'
+highlight_language = 'phpinline'
# -- Options for HTML output ---------------------------------------------------
@@ -281,3 +281,9 @@
# Languages available.
languages = ['en', 'pt', 'es', 'ja', 'ru', 'fr']
+
+# Hack to render the php source code without the <?php tag
+from sphinx.highlighting import lexers
+from pygments.lexers.web import PhpLexer
+
+lexers['phpinline'] = PhpLexer(startinline=True)
View
Binary file not shown.
@@ -111,7 +111,6 @@ Internationalization / Localization
If you want to echo the result of the translation, use::
- <?php
echo __('My Message');
This change includes all shortcut translation methods::
@@ -128,7 +127,6 @@ Alongside this, if you pass additional parameters, the translation will call
`sprintf <http://php.net/manual/en/function.sprintf.php>`_ with these
parameters before returning. For example::
- <?php
// Will return something like "Called: MyClass:myMethod"
echo __('Called: %s:%s', $className, $methodName);
@@ -215,7 +213,6 @@ Components
Component is now the required base class for all components. You should update
your components and their constructors, as both have changed::
- <?php
class PrgComponent extends Component {
function __construct(ComponentCollection $collection, $settings = array()) {
parent::__construct($collection, $settings);
@@ -245,7 +242,6 @@ All the deprecated callbacks in Component have not been transferred to
ComponentCollection. Instead you should use the `trigger()` method to interact
with callbacks. If you need to trigger a callback you could do so by calling::
- <?php
$this->Components->trigger('someCallback', array(&$this));
Changes in disabling components
@@ -429,7 +425,6 @@ Although there has been a huge refactoring in how the classes are loaded, in ver
few occasions you will need to change your application code to respect the way you were
used to doing it. The biggest change is the introduction of a new method::
- <?php
App::uses('AuthComponent', 'Controller/Component');
We decided the function name should emulate PHP 5.3's ``use`` keyword, just as a way
@@ -443,7 +438,6 @@ is used for the first time it will be located.
Some examples on using :php:meth:`App::uses()` when migrating from
:php:meth:`App::import()`::
- <?php
App::import('Controller', 'Pages');
// becomes
App::uses('PagesController', 'Controller');
@@ -468,7 +462,6 @@ All classes that were loaded in the past using ``App::import('Core', $class);``
will need to be loaded using ``App::uses()`` referring to the correct package.
See the api to locate the classes in their new folders. Some examples::
- <?php
App::import('Core', 'CakeRoute');
// becomes
App::uses('CakeRoute', 'Routing/Route');
@@ -494,7 +487,6 @@ App::build() and core paths
Examples::
- <?php
App::build(array('controllers' => array('/full/path/to/controllers')));
//becomes
App::build(array('Controller' => array('/full/path/to/Controller')));
@@ -526,7 +518,6 @@ Cache
::
- <?php
Cache::config('something');
Cache::write('key', $value);
@@ -557,14 +548,12 @@ Router
``index`` action is given a short route. If you wish to continue using short
routes, you can add a route like::
- <?php
Router::connect('/users/:action', array('controller' => 'users', 'plugin' => 'users'));
To your routes file for each plugin you need short routes on.
Your app/Config/routes.php file needs to be updated adding this line at the bottom of the file::
- <?php
require CAKE . 'Config' . DS . 'routes.php';
This is needed in order to generate the default routes for your application. If you do not wish to have such routes,
@@ -663,7 +652,6 @@ In order to accommodate View being removed from the ClassRegistry, the signature
of Helper::__construct() was changed. You should update any subclasses to use
the following::
- <?php
function __construct(View $View, $settings = array())
When overriding the constructor you should always call `parent::__construct` as
@@ -803,13 +791,11 @@ this, just change ``$_minimizedAttributeFormat`` in your AppHelper to ``%s``.
To use with Html/Form helpers and others, you can write::
- <?php
$this->Form->checkbox('field', array('checked' => true, 'value' => 'some_value'));
Other facility is that minimized attributes can be passed as item and not as
key. For example::
- <?php
$this->Form->checkbox('field', array('checked', 'value' => 'some_value'));
Note that ``checked`` have a numeric key.
@@ -938,7 +924,6 @@ afterRender it is the view file being rendered. For beforeLayout and afterLayout
it is the layout file being rendered. Your helpers function signatures should
look like::
- <?php
function beforeRender($viewFile) {
}
@@ -1030,20 +1015,17 @@ Models
Model relationships are now lazy loaded. You can run into a situation where
assigning a value to a nonexistent model property will throw errors::
- <?php
$Post->inexistentProperty[] = 'value';
will throw the error "Notice: Indirect modification of overloaded property
$inexistentProperty has no effect". Assigning an initial value to the property
solves the issue::
- <?php
$Post->nonexistentProperty = array();
$Post->nonexistentProperty[] = 'value';
Or just declare the property in the model class::
- <?php
class Post {
public $nonexistentProperty = array();
}
@@ -1087,12 +1069,10 @@ List of Changes
* API for DboSource::execute has changed, it will now take an array of query
values as second parameter::
- <?php
public function execute($sql, $params = array(), $options = array())
became::
- <?php
public function execute($sql, $options = array(), $params = array())
third parameter is meant to receive options for logging, currently it only
@@ -1102,7 +1082,6 @@ List of Changes
* DboSource::fetchAll() now accepts an array as second parameter, to pass values
to be bound to the query, third parameter was dropped. Example::
- <?php
$db->fetchAll('SELECT * from users where username = ? AND password = ?', array('jhon', '12345'));
$db->fetchAll('SELECT * from users where username = :username AND password = :password', array('username' => 'jhon', 'password' => '12345'));
@@ -1145,15 +1124,13 @@ AclBehavior and TreeBehavior
- No longer supports strings as configuration. Example::
- <?php
public $actsAs = array(
'Acl' => 'Controlled',
'Tree' => 'nested'
);
became::
- <?php
public $actsAs = array(
'Acl' => array('type' => 'Controlled'),
'Tree' => array('type' => 'nested')
@@ -1167,14 +1144,12 @@ Plugins no longer magically append their plugin prefix to components, helpers
and models used within them. You must be explicit with the components, models,
and helpers you wish to use. In the past::
- <?php
public $components = array('Session', 'Comments');
Would look in the controller's plugin before checking app/core components. It
will now only look in the app/core components. If you wish to use objects from a
plugin you must put the plugin name::
- <?php
public $components = array('Session', 'Comment.Comments');
This was done to reduce hard to debug issues caused by magic misfiring. It also
@@ -1272,7 +1247,6 @@ the key "driver" is not accepted anymore, only "datasource", in order to make it
more consistent. Also, as the datasources have been moved to packages you will
need to pass the package they are located in. Example::
- <?php
public $default = array(
'datasource' => 'Database/Mysql',
'persistent' => false,
@@ -12,7 +12,6 @@ removed from the CakePHP core. If you do not already have these classes, you
can use the following while upgrading::
// app/View/Helper/AppHelper.php
- <?php
App::uses('Helper', 'View');
class AppHelper extends Helper {
}
@@ -262,7 +261,6 @@ View
instead.
- ``$scripts_for_layout`` is deprecated. Use the following instead::
- <?php
echo $this->fetch('meta');
echo $this->fetch('css');
echo $this->fetch('script');
@@ -13,7 +13,6 @@ When upgrading to CakePHP 2.2 its important to add a few new configuration
values to ``app/Config/bootstrap.php``. Adding these will ensure consistent
behavior with 2.1.x::
- <?php
// Enable the Dispatcher filters for plugin assets, and
// CacheHelper.
Configure::write('Dispatcher.filters', array(
@@ -36,13 +35,12 @@ behavior with 2.1.x::
You will also need to modify ``app/Config/core.php``. Change the value of
:php:const:`LOG_ERROR` to :php:const:`LOG_ERR`::
- <?php
define('LOG_ERROR', LOG_ERR);
When using ``Model::validateAssociated()`` or ``Model::saveAssociated()`` and
primary model validation fails, the validation errors of associated models are no longer wiped out.
``Model::$validationErrors`` will now always show all the errors.
-You might need to update your testcases to reflect this change.
+You might need to update your test cases to reflect this change.
Console
=======
@@ -58,13 +56,14 @@ I18N extract shell
Models
======
-- ``Model::_findCount()`` will now call the custom find methods with
+- ``Model::find('count')`` will now call the custom find methods with
``$state = 'before'`` and ``$queryData['operation'] = 'count'``.
In many cases custom finds already return correct counts for pagination,
but ``'operation'`` key allows more flexibility to build other queries,
or drop joins which are required for the custom finder itself.
As the pagination of custom find methods never worked quite well it required
- workarounds for this in the model level, which are now no longer needed
+ workarounds for this in the model level, which are now no longer needed.
+- ``Model::find('first')`` will now return an empty array when no records are found.
Datasources
===========
@@ -273,7 +272,6 @@ It is now possible to tag or label cache keys under groups. This makes it
simpler to mass-delete cache entries associated to the same label. Groups are
declared at configuration time when creating the cache engine::
- <?php
Cache::config(array(
'engine' => 'Redis',
...
Oops, something went wrong.

0 comments on commit ecd2b54

Please sign in to comment.