From ea8b46407d8e2996310d5328d13aeb047f05706d Mon Sep 17 00:00:00 2001 From: Mark Scherer Date: Thu, 22 Jan 2026 22:26:39 +0700 Subject: [PATCH 1/6] Add TypeFactory::getMap($type) => getMapped($type) rector rule (#382) * Add TypeFactory::getMap($type) => getMapped($type) rector rule In CakePHP 5.3, calling TypeFactory::getMap() with a type argument is deprecated. Use getMapped() instead for single-type lookups. Fixes #354 * Update CI to use PHP 8.2 (required by CakePHP 5.x) --- .github/workflows/ci.yml | 10 +-- config/rector/sets/cakephp53.php | 2 + .../MethodCall/TypeFactoryGetMappedRector.php | 82 +++++++++++++++++++ .../Fixture/fixture.php.inc | 45 ++++++++++ .../Fixture/skip_no_argument.php.inc | 18 ++++ .../TypeFactoryGetMappedRectorTest.php | 28 +++++++ .../config/configured_rule.php | 9 ++ .../src/SomeTest.php | 5 ++ .../src/SomeTest.php | 5 ++ 9 files changed, 198 insertions(+), 6 deletions(-) create mode 100644 src/Rector/Rector/MethodCall/TypeFactoryGetMappedRector.php create mode 100644 tests/TestCase/Rector/MethodCall/TypeFactoryGetMappedRector/Fixture/fixture.php.inc create mode 100644 tests/TestCase/Rector/MethodCall/TypeFactoryGetMappedRector/Fixture/skip_no_argument.php.inc create mode 100644 tests/TestCase/Rector/MethodCall/TypeFactoryGetMappedRector/TypeFactoryGetMappedRectorTest.php create mode 100644 tests/TestCase/Rector/MethodCall/TypeFactoryGetMappedRector/config/configured_rule.php diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f2e11e7f..a28041ec 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,10 +17,10 @@ jobs: strategy: fail-fast: false matrix: - php-version: ['8.1'] + php-version: ['8.2'] prefer-lowest: [''] include: - - php-version: '8.1' + - php-version: '8.2' prefer-lowest: 'prefer-lowest' steps: @@ -51,14 +51,12 @@ jobs: run: | if ${{ matrix.prefer-lowest == 'prefer-lowest' }}; then make install-dev-lowest - elif ${{ matrix.php-version == '8.1' }}; then - make install-dev-ignore-reqs else make install-dev fi - name: Setup problem matchers for PHPUnit - if: matrix.php-version == '8.1' + if: matrix.php-version == '8.2' run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" - name: Run PHPUnit @@ -74,7 +72,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: '8.1' + php-version: '8.2' extensions: mbstring, intl tools: cs2pr coverage: none diff --git a/config/rector/sets/cakephp53.php b/config/rector/sets/cakephp53.php index 83c1c5d5..407d1815 100644 --- a/config/rector/sets/cakephp53.php +++ b/config/rector/sets/cakephp53.php @@ -6,6 +6,7 @@ use Cake\Upgrade\Rector\Rector\MethodCall\EntityPatchRector; use Cake\Upgrade\Rector\Rector\MethodCall\NewExprToFuncRector; use Cake\Upgrade\Rector\Rector\MethodCall\QueryParamAccessRector; +use Cake\Upgrade\Rector\Rector\MethodCall\TypeFactoryGetMappedRector; use Rector\Config\RectorConfig; use Rector\Renaming\Rector\MethodCall\RenameMethodRector; use Rector\Renaming\Rector\Name\RenameClassRector; @@ -28,4 +29,5 @@ $rectorConfig->rule(EntityPatchRector::class); $rectorConfig->rule(FormExecuteToProcessRector::class); $rectorConfig->rule(QueryParamAccessRector::class); + $rectorConfig->rule(TypeFactoryGetMappedRector::class); }; diff --git a/src/Rector/Rector/MethodCall/TypeFactoryGetMappedRector.php b/src/Rector/Rector/MethodCall/TypeFactoryGetMappedRector.php new file mode 100644 index 00000000..f3f19d4a --- /dev/null +++ b/src/Rector/Rector/MethodCall/TypeFactoryGetMappedRector.php @@ -0,0 +1,82 @@ +name instanceof Identifier || $node->name->toString() !== 'getMap') { + return null; + } + + // Must have at least one argument (the type) + if (count($node->args) < 1) { + return null; + } + + // Check if this is called on TypeFactory + if (!$node->class instanceof Name) { + return null; + } + + $className = $node->class->toString(); + if ($className !== 'Cake\Database\TypeFactory' && $className !== 'TypeFactory') { + return null; + } + + // Rename to getMapped + $node->name = new Identifier('getMapped'); + + return $node; + } +} diff --git a/tests/TestCase/Rector/MethodCall/TypeFactoryGetMappedRector/Fixture/fixture.php.inc b/tests/TestCase/Rector/MethodCall/TypeFactoryGetMappedRector/Fixture/fixture.php.inc new file mode 100644 index 00000000..581f2edf --- /dev/null +++ b/tests/TestCase/Rector/MethodCall/TypeFactoryGetMappedRector/Fixture/fixture.php.inc @@ -0,0 +1,45 @@ + +----- + diff --git a/tests/TestCase/Rector/MethodCall/TypeFactoryGetMappedRector/Fixture/skip_no_argument.php.inc b/tests/TestCase/Rector/MethodCall/TypeFactoryGetMappedRector/Fixture/skip_no_argument.php.inc new file mode 100644 index 00000000..113db4ff --- /dev/null +++ b/tests/TestCase/Rector/MethodCall/TypeFactoryGetMappedRector/Fixture/skip_no_argument.php.inc @@ -0,0 +1,18 @@ + diff --git a/tests/TestCase/Rector/MethodCall/TypeFactoryGetMappedRector/TypeFactoryGetMappedRectorTest.php b/tests/TestCase/Rector/MethodCall/TypeFactoryGetMappedRector/TypeFactoryGetMappedRectorTest.php new file mode 100644 index 00000000..371a0db5 --- /dev/null +++ b/tests/TestCase/Rector/MethodCall/TypeFactoryGetMappedRector/TypeFactoryGetMappedRectorTest.php @@ -0,0 +1,28 @@ +doTestFile($filePath); + } + + public static function provideData(): Iterator + { + return self::yieldFilesFromDirectory(__DIR__ . '/Fixture'); + } + + public function provideConfigFilePath(): string + { + return __DIR__ . '/config/configured_rule.php'; + } +} diff --git a/tests/TestCase/Rector/MethodCall/TypeFactoryGetMappedRector/config/configured_rule.php b/tests/TestCase/Rector/MethodCall/TypeFactoryGetMappedRector/config/configured_rule.php new file mode 100644 index 00000000..a0747f6d --- /dev/null +++ b/tests/TestCase/Rector/MethodCall/TypeFactoryGetMappedRector/config/configured_rule.php @@ -0,0 +1,9 @@ +rule(TypeFactoryGetMappedRector::class); +}; diff --git a/tests/test_apps/original/RectorCommand-testApply53/src/SomeTest.php b/tests/test_apps/original/RectorCommand-testApply53/src/SomeTest.php index e3d9c78b..6c8e855c 100644 --- a/tests/test_apps/original/RectorCommand-testApply53/src/SomeTest.php +++ b/tests/test_apps/original/RectorCommand-testApply53/src/SomeTest.php @@ -3,6 +3,7 @@ namespace MyPlugin; +use Cake\Database\TypeFactory; use Cake\ORM\Entity; use Cake\ORM\Locator\LocatorAwareTrait; use Cake\ORM\Query; @@ -22,6 +23,10 @@ public function testRenames(): void $table = $this->fetchTable('Articles'); $expr = $table->find()->newExpr(); + + // TypeFactory::getMap($type) should be changed to getMapped($type) + $class = TypeFactory::getMap('datetime'); + $allTypes = TypeFactory::getMap(); // This should stay as is } public function findSomething(Query $query, array $options): Query { diff --git a/tests/test_apps/upgraded/RectorCommand-testApply53/src/SomeTest.php b/tests/test_apps/upgraded/RectorCommand-testApply53/src/SomeTest.php index 304c6187..d29afdf9 100644 --- a/tests/test_apps/upgraded/RectorCommand-testApply53/src/SomeTest.php +++ b/tests/test_apps/upgraded/RectorCommand-testApply53/src/SomeTest.php @@ -3,6 +3,7 @@ namespace MyPlugin; +use Cake\Database\TypeFactory; use Cake\ORM\Entity; use Cake\ORM\Locator\LocatorAwareTrait; use Cake\ORM\Query; @@ -22,6 +23,10 @@ public function testRenames(): void $table = $this->fetchTable('Articles'); $expr = $table->find()->expr(); + + // TypeFactory::getMap($type) should be changed to getMapped($type) + $class = TypeFactory::getMapped('datetime'); + $allTypes = TypeFactory::getMap(); // This should stay as is } public function findSomething(\Cake\ORM\Query\SelectQuery $query, array $options): \Cake\ORM\Query\SelectQuery { From b53d7fc3313cf29084e1239ad8ced1cae1644af3 Mon Sep 17 00:00:00 2001 From: Mark Scherer Date: Thu, 22 Jan 2026 22:45:11 +0700 Subject: [PATCH 2/6] Add BreadcrumbsHelper add/prepend => addMany/prependMany rector rule (#383) * Add BreadcrumbsHelper add/prepend => addMany/prependMany rector rule 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. * Update CI to use PHP 8.2 (required by CakePHP 5.x) --------- Co-authored-by: Mark Story --- config/rector/sets/cakephp53.php | 2 + .../BreadcrumbsHelperAddManyRector.php | 142 ++++++++++++++++++ .../BreadcrumbsHelperAddManyRectorTest.php | 28 ++++ .../Fixture/fixture.php.inc | 53 +++++++ .../Fixture/skip_single_crumb.php.inc | 24 +++ .../config/configured_rule.php | 9 ++ .../src/SomeTest.php | 10 ++ .../src/SomeTest.php | 10 ++ 8 files changed, 278 insertions(+) create mode 100644 src/Rector/Rector/MethodCall/BreadcrumbsHelperAddManyRector.php create mode 100644 tests/TestCase/Rector/MethodCall/BreadcrumbsHelperAddManyRector/BreadcrumbsHelperAddManyRectorTest.php create mode 100644 tests/TestCase/Rector/MethodCall/BreadcrumbsHelperAddManyRector/Fixture/fixture.php.inc create mode 100644 tests/TestCase/Rector/MethodCall/BreadcrumbsHelperAddManyRector/Fixture/skip_single_crumb.php.inc create mode 100644 tests/TestCase/Rector/MethodCall/BreadcrumbsHelperAddManyRector/config/configured_rule.php diff --git a/config/rector/sets/cakephp53.php b/config/rector/sets/cakephp53.php index 407d1815..643ec3fe 100644 --- a/config/rector/sets/cakephp53.php +++ b/config/rector/sets/cakephp53.php @@ -2,6 +2,7 @@ declare(strict_types=1); use Cake\Upgrade\Rector\Rector\ClassMethod\FormExecuteToProcessRector; +use Cake\Upgrade\Rector\Rector\MethodCall\BreadcrumbsHelperAddManyRector; use Cake\Upgrade\Rector\Rector\MethodCall\EntityIsEmptyRector; use Cake\Upgrade\Rector\Rector\MethodCall\EntityPatchRector; use Cake\Upgrade\Rector\Rector\MethodCall\NewExprToFuncRector; @@ -25,6 +26,7 @@ 'Cake\TestSuite\Fixture\TransactionFixtureStrategy' => 'Cake\TestSuite\Fixture\TransactionStrategy', 'Cake\TestSuite\Fixture\TruncateFixtureStrategy' => 'Cake\TestSuite\Fixture\TruncateStrategy', ]); + $rectorConfig->rule(BreadcrumbsHelperAddManyRector::class); $rectorConfig->rule(EntityIsEmptyRector::class); $rectorConfig->rule(EntityPatchRector::class); $rectorConfig->rule(FormExecuteToProcessRector::class); diff --git a/src/Rector/Rector/MethodCall/BreadcrumbsHelperAddManyRector.php b/src/Rector/Rector/MethodCall/BreadcrumbsHelperAddManyRector.php new file mode 100644 index 00000000..ecfbc7fb --- /dev/null +++ b/src/Rector/Rector/MethodCall/BreadcrumbsHelperAddManyRector.php @@ -0,0 +1,142 @@ +Breadcrumbs->add([ + ['title' => 'Home', 'url' => '/'], + ['title' => 'Articles', 'url' => '/articles'], +]); +CODE_SAMPLE + , + <<<'CODE_SAMPLE' +$this->Breadcrumbs->addMany([ + ['title' => 'Home', 'url' => '/'], + ['title' => 'Articles', 'url' => '/articles'], +]); +CODE_SAMPLE, + ), + ], + ); + } + + public function getNodeTypes(): array + { + return [MethodCall::class]; + } + + public function refactor(Node $node): ?Node + { + if (!$node instanceof MethodCall) { + return null; + } + + // Must be add or prepend method + if (!$node->name instanceof Identifier) { + return null; + } + + $methodName = $node->name->toString(); + if ($methodName !== 'add' && $methodName !== 'prepend') { + return null; + } + + // Must have at least one argument + if (count($node->args) < 1) { + return null; + } + + // First argument must be an array + $firstArg = $node->args[0]->value; + if (!$firstArg instanceof Array_) { + return null; + } + + // Check if the array looks like an array of crumbs (array of arrays) + // rather than a single crumb with title/url keys + if (!$this->isArrayOfCrumbs($firstArg)) { + return null; + } + + // Check if this is called on BreadcrumbsHelper + $callerType = $this->getType($node->var); + if (!$callerType instanceof ObjectType) { + return null; + } + + if (!$callerType->isInstanceOf('Cake\View\Helper\BreadcrumbsHelper')->yes()) { + return null; + } + + // Rename to addMany or prependMany + $newMethodName = $methodName === 'add' ? 'addMany' : 'prependMany'; + $node->name = new Identifier($newMethodName); + + return $node; + } + + /** + * Determine if an array is an array of crumbs (array of arrays) + * vs a single crumb (array with title/url keys) + */ + private function isArrayOfCrumbs(Array_ $array): bool + { + // An array of crumbs is typically a numerically indexed array of arrays + // e.g. [['title' => 'Home'], ['title' => 'Articles']] + // A single crumb would have string keys like 'title', 'url' + // e.g. ['title' => 'Home', 'url' => '/'] + + if (count($array->items) === 0) { + return false; + } + + foreach ($array->items as $item) { + if (!$item instanceof ArrayItem) { + continue; + } + + // If item has a string key like 'title' or 'url', it's a single crumb + if ($item->key instanceof String_) { + $keyValue = $item->key->value; + if ($keyValue === 'title' || $keyValue === 'url' || $keyValue === 'options') { + return false; + } + } + + // If the item value is an array, it's likely an array of crumbs + if ($item->value instanceof Array_) { + return true; + } + } + + return false; + } +} diff --git a/tests/TestCase/Rector/MethodCall/BreadcrumbsHelperAddManyRector/BreadcrumbsHelperAddManyRectorTest.php b/tests/TestCase/Rector/MethodCall/BreadcrumbsHelperAddManyRector/BreadcrumbsHelperAddManyRectorTest.php new file mode 100644 index 00000000..34412c08 --- /dev/null +++ b/tests/TestCase/Rector/MethodCall/BreadcrumbsHelperAddManyRector/BreadcrumbsHelperAddManyRectorTest.php @@ -0,0 +1,28 @@ +doTestFile($filePath); + } + + public static function provideData(): Iterator + { + return self::yieldFilesFromDirectory(__DIR__ . '/Fixture'); + } + + public function provideConfigFilePath(): string + { + return __DIR__ . '/config/configured_rule.php'; + } +} diff --git a/tests/TestCase/Rector/MethodCall/BreadcrumbsHelperAddManyRector/Fixture/fixture.php.inc b/tests/TestCase/Rector/MethodCall/BreadcrumbsHelperAddManyRector/Fixture/fixture.php.inc new file mode 100644 index 00000000..7705a43b --- /dev/null +++ b/tests/TestCase/Rector/MethodCall/BreadcrumbsHelperAddManyRector/Fixture/fixture.php.inc @@ -0,0 +1,53 @@ +Breadcrumbs->add([ + ['title' => 'Home', 'url' => '/'], + ['title' => 'Articles', 'url' => '/articles'], + ]); + + // Should transform: prepend with array of crumbs + $this->Breadcrumbs->prepend([ + ['title' => 'Dashboard'], + ]); + } +} + +?> +----- +Breadcrumbs->addMany([ + ['title' => 'Home', 'url' => '/'], + ['title' => 'Articles', 'url' => '/articles'], + ]); + + // Should transform: prepend with array of crumbs + $this->Breadcrumbs->prependMany([ + ['title' => 'Dashboard'], + ]); + } +} + +?> diff --git a/tests/TestCase/Rector/MethodCall/BreadcrumbsHelperAddManyRector/Fixture/skip_single_crumb.php.inc b/tests/TestCase/Rector/MethodCall/BreadcrumbsHelperAddManyRector/Fixture/skip_single_crumb.php.inc new file mode 100644 index 00000000..3b98de83 --- /dev/null +++ b/tests/TestCase/Rector/MethodCall/BreadcrumbsHelperAddManyRector/Fixture/skip_single_crumb.php.inc @@ -0,0 +1,24 @@ +Breadcrumbs->add('Home', '/'); + + // Should NOT transform: single crumb as array with title key + $this->Breadcrumbs->add(['title' => 'Home', 'url' => '/']); + + // Should NOT transform: prepend single crumb + $this->Breadcrumbs->prepend('Dashboard'); + } +} + +?> diff --git a/tests/TestCase/Rector/MethodCall/BreadcrumbsHelperAddManyRector/config/configured_rule.php b/tests/TestCase/Rector/MethodCall/BreadcrumbsHelperAddManyRector/config/configured_rule.php new file mode 100644 index 00000000..809158cc --- /dev/null +++ b/tests/TestCase/Rector/MethodCall/BreadcrumbsHelperAddManyRector/config/configured_rule.php @@ -0,0 +1,9 @@ +rule(BreadcrumbsHelperAddManyRector::class); +}; diff --git a/tests/test_apps/original/RectorCommand-testApply53/src/SomeTest.php b/tests/test_apps/original/RectorCommand-testApply53/src/SomeTest.php index 6c8e855c..c89faab0 100644 --- a/tests/test_apps/original/RectorCommand-testApply53/src/SomeTest.php +++ b/tests/test_apps/original/RectorCommand-testApply53/src/SomeTest.php @@ -7,11 +7,14 @@ use Cake\ORM\Entity; use Cake\ORM\Locator\LocatorAwareTrait; use Cake\ORM\Query; +use Cake\View\Helper\BreadcrumbsHelper; class SomeTest { use LocatorAwareTrait; + private BreadcrumbsHelper $Breadcrumbs; + public function testRenames(): void { $entity = new Entity(); @@ -24,6 +27,13 @@ public function testRenames(): void $table = $this->fetchTable('Articles'); $expr = $table->find()->newExpr(); + // BreadcrumbsHelper::add(array) should be changed to addMany() + $this->Breadcrumbs->add([ + ['title' => 'Home', 'url' => '/'], + ]); + // Single crumb should stay as is + $this->Breadcrumbs->add('Articles', '/articles'); + // TypeFactory::getMap($type) should be changed to getMapped($type) $class = TypeFactory::getMap('datetime'); $allTypes = TypeFactory::getMap(); // This should stay as is diff --git a/tests/test_apps/upgraded/RectorCommand-testApply53/src/SomeTest.php b/tests/test_apps/upgraded/RectorCommand-testApply53/src/SomeTest.php index d29afdf9..48bf6b92 100644 --- a/tests/test_apps/upgraded/RectorCommand-testApply53/src/SomeTest.php +++ b/tests/test_apps/upgraded/RectorCommand-testApply53/src/SomeTest.php @@ -7,11 +7,14 @@ use Cake\ORM\Entity; use Cake\ORM\Locator\LocatorAwareTrait; use Cake\ORM\Query; +use Cake\View\Helper\BreadcrumbsHelper; class SomeTest { use LocatorAwareTrait; + private BreadcrumbsHelper $Breadcrumbs; + public function testRenames(): void { $entity = new Entity(); @@ -24,6 +27,13 @@ public function testRenames(): void $table = $this->fetchTable('Articles'); $expr = $table->find()->expr(); + // BreadcrumbsHelper::add(array) should be changed to addMany() + $this->Breadcrumbs->addMany([ + ['title' => 'Home', 'url' => '/'], + ]); + // Single crumb should stay as is + $this->Breadcrumbs->add('Articles', '/articles'); + // TypeFactory::getMap($type) should be changed to getMapped($type) $class = TypeFactory::getMapped('datetime'); $allTypes = TypeFactory::getMap(); // This should stay as is From 280002f7b4c51dff35e8efc8df7f434f77919839 Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Thu, 19 Feb 2026 17:42:10 +0700 Subject: [PATCH 3/6] Fix use of deprecated Expr\ArrayItem --- src/Rector/Rector/MethodCall/BreadcrumbsHelperAddManyRector.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Rector/Rector/MethodCall/BreadcrumbsHelperAddManyRector.php b/src/Rector/Rector/MethodCall/BreadcrumbsHelperAddManyRector.php index ecfbc7fb..547d0b8f 100644 --- a/src/Rector/Rector/MethodCall/BreadcrumbsHelperAddManyRector.php +++ b/src/Rector/Rector/MethodCall/BreadcrumbsHelperAddManyRector.php @@ -5,7 +5,7 @@ use PhpParser\Node; use PhpParser\Node\Expr\Array_; -use PhpParser\Node\Expr\ArrayItem; +use PhpParser\Node\ArrayItem; use PhpParser\Node\Expr\MethodCall; use PhpParser\Node\Identifier; use PhpParser\Node\Scalar\String_; From 4265142af26a4c0fd6078ee44c51eb726ca6222e Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Thu, 19 Feb 2026 17:43:51 +0700 Subject: [PATCH 4/6] fix cs sort use --- src/Rector/Rector/MethodCall/BreadcrumbsHelperAddManyRector.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Rector/Rector/MethodCall/BreadcrumbsHelperAddManyRector.php b/src/Rector/Rector/MethodCall/BreadcrumbsHelperAddManyRector.php index 547d0b8f..89588c5e 100644 --- a/src/Rector/Rector/MethodCall/BreadcrumbsHelperAddManyRector.php +++ b/src/Rector/Rector/MethodCall/BreadcrumbsHelperAddManyRector.php @@ -4,8 +4,8 @@ namespace Cake\Upgrade\Rector\Rector\MethodCall; use PhpParser\Node; -use PhpParser\Node\Expr\Array_; use PhpParser\Node\ArrayItem; +use PhpParser\Node\Expr\Array_; use PhpParser\Node\Expr\MethodCall; use PhpParser\Node\Identifier; use PhpParser\Node\Scalar\String_; From fdaa34339dcd1b27e001388f8307854883445a51 Mon Sep 17 00:00:00 2001 From: mscherer Date: Fri, 27 Mar 2026 10:25:01 +0100 Subject: [PATCH 5/6] Add PHP and License badges to README --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 21be2ab2..8d84b4c1 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ # CakePHP Upgrade tool [![CI](https://github.com/cakephp/upgrade/actions/workflows/ci.yml/badge.svg)](https://github.com/cakephp/upgrade/actions/workflows/ci.yml) +[![Minimum PHP Version](https://img.shields.io/badge/php-%3E%3D%208.1-8892BF.svg)](https://php.net/) +[![License](https://poser.pugx.org/cakephp/upgrade/license.svg)](LICENSE) Upgrade tools for CakePHP meant to facilitate migrating between CakePHP 4.x versions, from CakePHP 4.x to CakePHP 5.x, and between CakePHP 5.x versions. From ca61a8c288378dca34fe7dddd36a673d06f32696 Mon Sep 17 00:00:00 2001 From: Kevin Pfeifer Date: Sat, 4 Apr 2026 10:24:47 +0200 Subject: [PATCH 6/6] merge 5.x => 6.x + Makefile adjustments --- Makefile | 2 +- src/Rector/Cake5/BreadcrumbsHelperAddManyRector.php | 2 +- src/Rector/Cake5/TypeFactoryGetMappedRector.php | 2 +- .../BreadcrumbsHelperAddManyRector/config/configured_rule.php | 2 +- .../TypeFactoryGetMappedRector/config/configured_rule.php | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 16c57f0a..f5050457 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ DEV_DEPENDENCIES = cakephp/cakephp:5.x-dev \ cakephp/cakephp-codesniffer:^5.0 \ mikey179/vfsstream:^1.6.8 \ phpunit/phpunit:^10.5.38 \ - cakephp/migrations:^4.5.0 + cakephp/migrations:^5.0.0 install-dev: composer require --dev $(DEV_DEPENDENCIES) diff --git a/src/Rector/Cake5/BreadcrumbsHelperAddManyRector.php b/src/Rector/Cake5/BreadcrumbsHelperAddManyRector.php index 89588c5e..bcabda55 100644 --- a/src/Rector/Cake5/BreadcrumbsHelperAddManyRector.php +++ b/src/Rector/Cake5/BreadcrumbsHelperAddManyRector.php @@ -1,7 +1,7 @@