Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions src/AbstractMigration.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
*
Expand Down
12 changes: 12 additions & 0 deletions src/AbstractSeed.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
Expand All @@ -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,
Expand Down