Skip to content

Generate controller routing attributes by default - #1115

Open
josbeir wants to merge 3 commits into
4.xfrom
feature/attribute-routing
Open

josbeir wants to merge 3 commits into
4.xfrom
feature/attribute-routing

Conversation

@josbeir

@josbeir josbeir commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Generate CakePHP 6 controller routing attributes by default, including conventional CRUD paths, plugin paths, and nested prefixes.

Add Bake.attributeRouting and --attribute-routing / --no-attribute-routing overrides for controller, bulk, and plugin generation. Plugin skeletons omit fallback routes when attributes are enabled. Existing form links continue to work without extra routing hints.

Validation:

  • PHPUnit: 394 tests, 1,301 assertions; no failures (7 skipped, 4 incomplete).
  • Snapshot assertions cover generated controller actions; focused source assertions cover prefixed plugin attributes and conflicting command options.
  • PHPCS, PHPStan, and documentation build pass.

@josbeir
josbeir added this pull request to stack #1117 October 18, 2026 08:01
@markstory markstory added this to the 4.x (CakePHP 6) milestone Oct 18, 2026
Comment thread docs/en/development.md
Comment thread docs/en/usage.md Outdated
Comment thread docs/en/usage.md Outdated
Comment thread docs/en/usage.md Outdated
Comment thread tests/TestCase/Command/AttributeRoutingTest.php Outdated
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