Skip to content

Add BreadcrumbsHelper add/prepend => addMany/prependMany rector rule#383

Merged
markstory merged 3 commits into5.xfrom
feature/breadcrumbs-helper-add-many-rector
Jan 22, 2026
Merged

Add BreadcrumbsHelper add/prepend => addMany/prependMany rector rule#383
markstory merged 3 commits into5.xfrom
feature/breadcrumbs-helper-add-many-rector

Conversation

@dereuromark
Copy link
Member

Summary

  • Adds rector rule for BreadcrumbsHelper::add(array)addMany() and prepend(array)prependMany() transformations
  • Only applies when the first argument is an array of crumbs (array containing nested arrays), not a single crumb with title/url keys
  • Includes unit tests and updates integration test fixtures

dereuromark and others added 3 commits January 22, 2026 08:34
In CakePHP 5.3, passing an array of crumbs to BreadcrumbsHelper::add()
or prepend() is deprecated. Use addMany() or prependMany() instead.

The rector detects when the first argument is an array containing
nested arrays (array of crumbs) vs a single crumb with title/url keys.
@markstory markstory merged commit b53d7fc into 5.x Jan 22, 2026
3 checks passed
@markstory markstory deleted the feature/breadcrumbs-helper-add-many-rector branch January 22, 2026 15:45
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