Repository navigation
Releases
Releases · patricknelson/silverstripe-migrations
1.0.0
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\Migrationsnamespace - Replaced
MIGRATION_PATHwith YAML configuration for the generation path and optional namespace. New migrations remain global by default and always keep theMigration_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
boolreturn type toMigrationInterface->isObsolete(), however: Consider usingprotected $obsoleteinstead. - 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 withConvert::raw2sql(). Remove manual identifier quoting passed to methods, such as backticks around column names passed toaddColumnsToTable(), e.g.addColumnsToTable('MyObject', ['`FooBar`' => 'INT'])should be cleaned up. - Unit testing now implemented via GitHub Actions (see workflows); removed Travis CI and Scrutinizer.
- Moved to
- PR #12: Output current migration immediately
- Moved the default branch from
mastertomain- Note: The prior instructions to use
composer require "patricknelson/silverstripe-migrations:dev-master"will now fail, however runningcomposer installin existing projects with acomposer.lockwill continue operating normally.
- Note: The prior instructions to use