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

simple Hello world command. In your application's **src/Command** directory create
**HelloCommand.php**. Put the following code inside it:

``` php
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@josbeir is there maybe a markdown linting rule which enforces no space here?
My Editor - PHPStorm - does not recognise the code style otherwise. Or is this a bug in PHPStorm? 😁

$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.

2 participants