From 86be1a780b27c9d2ea25a136e1c41c12d3b00910 Mon Sep 17 00:00:00 2001 From: Dave Gudgeon Date: Mon, 16 Jan 2023 16:52:13 +0000 Subject: [PATCH] Added upgrade notes --- UPGRADE-4.0.md | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 UPGRADE-4.0.md diff --git a/UPGRADE-4.0.md b/UPGRADE-4.0.md new file mode 100644 index 00000000..960dd30a --- /dev/null +++ b/UPGRADE-4.0.md @@ -0,0 +1,34 @@ +# Upgrade from 3.x to 4.0 + +## Migration update + +4.0 introduces a newer version of Doctrine which includes a change to the namespacing of the AbstractMigration class. + +If you have any migrations in your project that reference this class, the namespace reference will need to be updated. + +Change from: + + +``` +Doctrine\DBAL\Migrations\AbstractMigration +``` + +to: + +``` +Doctrine\Migrations\AbstractMigration +``` + +The method signatures for many methods within this class have also changed. Migrations extending this abstract will therefore also need to be updated, for example changing from: + +``` +public function up(Schema $schema) +``` + +to: + +``` +public function up(Schema $schema): void +``` + +[A script is available to apply these changes to all migrations within a project.](https://gist.github.com/DenisYaschuk/d3ade2d88d058cf9c971cf9d1f580a0f)