# source: https://book.cakephp.org/4/en/appendices/4-1-migration-guide.html

services:
    Rector\Renaming\Rector\Class_\RenameClassRector:
        $oldToNewClasses:
            'Cake\Routing\Exception\RedirectException': 'Cake\Http\Exception\RedirectException'

    Rector\Renaming\Rector\MethodCall\RenameMethodRector:
        $oldToNewMethodsByClass:
            'Cake\Database\Schema\TableSchema':
                getPrimary: 'getPrimaryKey'
            'Cake\Database\Type\DateTimeType':
                setTimezone: 'setDatabaseTimezone'
            'Cake\Database\Expression\QueryExpression':
                or_: 'or'
                and_: 'and'
            'Cake\View\Form\ContextInterface':
                primaryKey: 'getPrimaryKey'
            'Cake\Http\Middleware\CsrfProtectionMiddleware':
                whitelistCallback: 'skipCheckCallback'

    Rector\CakePHP\Rector\MethodCall\ModalToGetSetRector:
        $methodNamesByTypes:
            'Cake\Form\Form':
                schema:
                    set: 'setSchema'
                    get: 'getSchema'

# source: https://book.cakephp.org/4/en/appendices/4-1-migration-guide.html

services:
    Rector\Renaming\Rector\Class_\RenameClassRector:
        $oldToNewClasses:
            'Cake\Routing\Exception\RedirectException': 'Cake\Http\Exception\RedirectException'
            'Cake\Database\Expression\Comparison': 'Cake\Database\Expression\ComparisonExpression'

    Rector\Renaming\Rector\MethodCall\RenameMethodRector:
        $oldToNewMethodsByClass:
            'Cake\Database\Schema\TableSchema':
                getPrimary: 'getPrimaryKey'
            'Cake\Database\Type\DateTimeType':
                setTimezone: 'setDatabaseTimezone'
            'Cake\Database\Expression\QueryExpression':
                or_: 'or'
                and_: 'and'
            'Cake\View\Form\ContextInterface':
                primaryKey: 'getPrimaryKey'
            'Cake\Http\Middleware\CsrfProtectionMiddleware':
                whitelistCallback: 'skipCheckCallback'

    Rector\CakePHP\Rector\MethodCall\ModalToGetSetRector:
        $methodNamesByTypes:
            'Cake\Form\Form':
                schema:
                    set: 'setSchema'
                    get: 'getSchema'

Add Comparison to ComparisonExpression rename
Add Comparison to ComparisonExpression rename