Skip to content

Prepare Migrations 6.x for CakePHP 6 - #1121

Open
josbeir wants to merge 2 commits into
6.xfrom
fix/6.x-cakephp-compatibility
Open

josbeir wants to merge 2 commits into
6.xfrom
fix/6.x-cakephp-compatibility

Conversation

@josbeir

@josbeir josbeir commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

The 6.x branch still requires CakePHP 5 components and uses the old command/Bake APIs, so a CakePHP 6 application cannot install and use it. These two commits add CakePHP 6 compatibility and apply its code standards. The branch sync is already in 6.x and is not part of this PR.

Commands and Bake commands use inherited argument/IO properties and updated method signatures. Migration managers, environments, seeds and adapters accept ConsoleIoInterface, with a regression test verifying that an interface implementation reaches the adapter. Schema setters match CakePHP 6's fluent return types. MySQL preserves the existing BINARY/VARBINARY fixed option behavior under CakePHP 6 schema types. SQL Server maps CakePHP 6's VARBINARY schema type to the existing Migrations BINARY type; two isolated regression tests cover both BINARY and VARBINARY metadata.

Dependencies and CI move to PHP 8.4+, CakePHP 6, Bake 4, CodeSniffer 6 and PHPUnit 12/13. Serialized schema comparison fixtures are refreshed for CakePHP 6's renamed properties; upgrading applications are instructed to regenerate schema dumps before baking diffs. Rector's existing PHP 8.2 language rules are retained explicitly to keep unrelated language modernization out of this upgrade.

Validation on PHP 8.5.11:

  • Full SQLite suite, highest dependencies/PHPUnit 13: 1,787 tests, 3,162 assertions, no failures.
  • Full SQLite suite, lowest dependencies resolved with PHP 8.4 platform/PHPUnit 12: 1,787 tests, 3,162 assertions, no failures.
  • Full PHPStan 2.3 analysis, PHPCS, Rector dry run and Composer validation pass; the PHPStan baseline is unchanged.

All 18 GitHub checks pass, including the PHP 8.4/8.5 Linux matrix for SQLite, MySQL, MariaDB and PostgreSQL, lowest dependencies, Windows PHP 8.4/SQL Server, coding standards/static analysis and documentation checks. Existing test warnings/deprecations/notices and database-specific skips remain.

@josbeir josbeir closed this Oct 7, 2026
@josbeir josbeir reopened this Oct 7, 2026
@josbeir
josbeir force-pushed the fix/6.x-cakephp-compatibility branch from e486468 to aab7b74 Compare October 7, 2026 07:17
@josbeir
josbeir changed the base branch from 6.x to sync/6.x-5.next October 7, 2026 07:17
@josbeir
josbeir marked this pull request as draft October 7, 2026 07:17
@josbeir
josbeir changed the base branch from sync/6.x-5.next to 6.x October 7, 2026 07:23
@josbeir
josbeir marked this pull request as ready for review October 7, 2026 07:25
@josbeir
josbeir force-pushed the fix/6.x-cakephp-compatibility branch from aab7b74 to 71e6ab0 Compare October 7, 2026 07:27
@josbeir
josbeir force-pushed the fix/6.x-cakephp-compatibility branch from 71e6ab0 to 194100b Compare October 7, 2026 07:41
@LordSimal

Copy link
Copy Markdown
Member

Took a quick skim through it and it looks fine.
We will do extensive testing anyways before doing a beta release of Cake6.

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