Skip to content

Releases

1.0.0

Choose a tag to compare

@patricknelson patricknelson released this 11 Nov 04:33
a337da6

Adds support for Silverstripe 4.

Changelog

This documents user-facing and breaking changes. See linked PRs for more details.

  • PR #24: Add support for Silverstripe 4
    • Moved to PatrickNelson\Migrations namespace
    • Replaced MIGRATION_PATH with YAML configuration for the generation path and optional namespace. New migrations remain global by default and always keep the Migration_ prefix.
    • The Migration::publish() method will no longer force publishing by default if a page has a pending draft version. You can still force publishing however via ::publish($page, true).
    • Removed support for Migration::loginAsAdmin() and ::whileAdmin() helper methods. They are no longer required in SS4 for supporting the core ::publish() and ::unpublish() methods.
    • Removed MigrationInterface
    • Added bool return type to MigrationInterface->isObsolete(), however: Consider using protected $obsolete instead.
    • Added compatibility for PHP 7.4 to PHP 8.5
    • Added strict parameter and return types to all migration helpers
    • Moved library classes to src/ with PSR-4 autoloading
    • Table and column names are now quoted as identifiers via Convert::symbol2sql() instead of escaped with Convert::raw2sql(). Remove manual identifier quoting passed to methods, such as backticks around column names passed to addColumnsToTable(), e.g. addColumnsToTable('MyObject', ['`FooBar`' => 'INT']) should be cleaned up.
    • Unit testing now implemented via GitHub Actions (see workflows); removed Travis CI and Scrutinizer.
  • PR #12: Output current migration immediately
  • Moved the default branch from master to main
    • Note: The prior instructions to use composer require "patricknelson/silverstripe-migrations:dev-master" will now fail, however running composer install in existing projects with a composer.lock will continue operating normally.