Skip to content
Mark Scherer edited this page Jan 19, 2024 · 1 revision

CakePHP 3 upgrade to latest

config/cake3.php:

use Rector\Config\RectorConfig;

return static function (RectorConfig $rectorConfig): void {
    $rectorConfig->sets([
        \Cake\Upgrade\Rector\Set\CakePHPSetList::CAKEPHP_30,
        \Cake\Upgrade\Rector\Set\CakePHPSetList::CAKEPHP_34,
        \Cake\Upgrade\Rector\Set\CakePHPSetList::CAKEPHP_35,
        \Cake\Upgrade\Rector\Set\CakePHPSetList::CAKEPHP_36,
        \Cake\Upgrade\Rector\Set\CakePHPSetList::CAKEPHP_37,
        \Cake\Upgrade\Rector\Set\CakePHPSetList::CAKEPHP_38,
    ]);
};

and

vendor/bin/rector process --config config/cake3.php /path/to/app/src
vendor/bin/rector process --config config/cake3.php /path/to/app/tests
vendor/bin/rector process --config config/cake3.php /path/to/app/config
Clone this wiki locally