Skip to content

adjust cake 6.0 upgrade to current upgrade tooling rectors#8221

Open
LordSimal wants to merge 2 commits into6.xfrom
6.x-upgrade-docs
Open

adjust cake 6.0 upgrade to current upgrade tooling rectors#8221
LordSimal wants to merge 2 commits into6.xfrom
6.x-upgrade-docs

Conversation

@LordSimal
Copy link
Contributor

@LordSimal LordSimal commented Feb 7, 2026

Closes #8188

$routes->scope('/api', function (RouteBuilder $routes) {
$routes->resources('Articles', function (RouteBuilder $routes) {
$routes->resources('Comments', ['prefix' => 'Articles']);
$routes->resources('Comments', options: ['prefix' => 'Articles']);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we always recommend named params for route building methods or only in certain situations?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Always using named params in e.g. code keeps things consistent and more readable.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this mean we should also add named params for 1st and 2nd param calls on all RouteBuilder calls in the docs?

$routes->scope('/api', function (RouteBuilder $routes) {
$routes->resources('Articles', function (RouteBuilder $routes) {
$routes->resources('Comments', ['prefix' => 'Articles']);
$routes->resources('Comments', options: ['prefix' => 'Articles']);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Always using named params in e.g. code keeps things consistent and more readable.

Co-authored-by: ADmad <admad.coder@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants