github cakephp/migrations 4.3.0
CakePHP Migrations 4.3.0

latest release: 4.3.1
15 days ago

New Backend

As of migrations 4.3. there is a new migrations backend that uses CakePHP's database abstractions and ORM. Longer term this will allow for phinx to be removed as a dependency. Reducing the dependencies of migrations helps keep your applications dependencies smaller. Migrations can also benefit from improvements in the ORM with less lag time as they no longer need to be re-implemented in phinx. Lastly, it streamlines the number of APIs you have to learn. Migrations included APIs that are very different from CakePHPs, and we can now align querying and data manipulation APIs so that you don't have to remember two different APIs depending on the context.

What is the same?

Your migrations shouldn't have to change much to adapt to the new backend. The migrations backend implements all of the phinx interfaces and can run migrations based on phinx classes. If your migrations fail for a reason not outlined below please open an issue.

What is different?

If your migrations are using the AdapterInterface to fetch rows or update rows you will need to update your code. If you use Adapter::query() to execute queries, the return of this method is now Cake\Database\StatementInterface instead. This impacts fetchAll(), and fetch().

Enabling the new backend

The new backend can be enabled through application configuration. Add the following to your config/app.php::

    return [
        // Other configuration.
        'Migrations' => ['backend' => 'builtin'],
    ];

If your migrations have problems running with the builtin backend, removing this configuration option will revert to using phinx.

Summary of pull requests

Full Changelog: 4.2.0...4.3.0

Don't miss a new migrations release

NewReleases is sending notifications on new releases.