diff --git a/src/AbstractMigration.php b/src/AbstractMigration.php index 61a85922..3f3a39ed 100644 --- a/src/AbstractMigration.php +++ b/src/AbstractMigration.php @@ -13,7 +13,10 @@ */ namespace Migrations; +use Phinx\Db\Adapter\AdapterInterface; use Phinx\Migration\AbstractMigration as BaseAbstractMigration; +use Phinx\Migration\MigrationInterface; +use function Cake\Core\deprecationWarning; /** * @deprecated 4.5.0 You should use Migrations\BaseMigration for new migrations. @@ -32,6 +35,19 @@ class AbstractMigration extends BaseAbstractMigration */ public bool $autoId = true; + /** + * @inheritDoc + */ + public function setAdapter(AdapterInterface $adapter): MigrationInterface + { + deprecationWarning( + '4.5.0', + 'Migrations\AbstractMigration is deprecated. Use Migrations\BaseMigration instead.', + ); + + return parent::setAdapter($adapter); + } + /** * Hook method to decide if this migration should use transactions * diff --git a/src/AbstractSeed.php b/src/AbstractSeed.php index 2e51b926..86c6addf 100644 --- a/src/AbstractSeed.php +++ b/src/AbstractSeed.php @@ -17,6 +17,7 @@ use Phinx\Seed\AbstractSeed as BaseAbstractSeed; use Symfony\Component\Console\Input\ArgvInput; use Symfony\Component\Console\Input\InputInterface; +use function Cake\Core\deprecationWarning; use function Cake\Core\pluginSplit; /** @@ -35,6 +36,17 @@ abstract class AbstractSeed extends BaseAbstractSeed */ protected InputInterface $input; + /** + * Constructor + */ + public function __construct() + { + deprecationWarning( + '4.5.0', + 'Migrations\AbstractSeed is deprecated. Use Migrations\BaseSeed instead.', + ); + } + /** * Gives the ability to a seeder to call another seeder. * This is particularly useful if you need to run the seeders of your applications in a specific sequences,