adjust cake 6.0 upgrade to current upgrade tooling rectors#8221
adjust cake 6.0 upgrade to current upgrade tooling rectors#8221
Conversation
docs/en/development/routing.md
Outdated
| $routes->scope('/api', function (RouteBuilder $routes) { | ||
| $routes->resources('Articles', function (RouteBuilder $routes) { | ||
| $routes->resources('Comments', ['prefix' => 'Articles']); | ||
| $routes->resources('Comments', options: ['prefix' => 'Articles']); |
There was a problem hiding this comment.
Should we always recommend named params for route building methods or only in certain situations?
There was a problem hiding this comment.
Always using named params in e.g. code keeps things consistent and more readable.
There was a problem hiding this comment.
does this mean we should also add named params for 1st and 2nd param calls on all RouteBuilder calls in the docs?
docs/en/development/routing.md
Outdated
| $routes->scope('/api', function (RouteBuilder $routes) { | ||
| $routes->resources('Articles', function (RouteBuilder $routes) { | ||
| $routes->resources('Comments', ['prefix' => 'Articles']); | ||
| $routes->resources('Comments', options: ['prefix' => 'Articles']); |
There was a problem hiding this comment.
Always using named params in e.g. code keeps things consistent and more readable.
|
@ADmad this what you had in mind? |
Co-authored-by: ADmad <admad.coder@gmail.com>
f5086be to
3d03290
Compare
Don't like the use of named arg for the 1st argument :) Sorry for not being clear earlier, I meant to use them for 2nd/3rd args because of the swapping of the args done in 6.x. Your changes do highlight an inconsistency though. For
|
|
We are already BC breaking here for the RouteBuilder, so adjusting the arg names to make them more unified is a good idea. |
|
Is the PR what you had in mind? |
|
will clean this PR up after your PR has been merged. @ADmad I'd say its more of a "only use named params if they are optional" So e.g. |
Closes #8188