1 Commits

Author SHA1 Message Date
AUDUL
95124acc26 * Fix compatibility with doctrine 4 (#73)
* Remove some deprecated
2024-10-31 15:38:10 +01:00
8 changed files with 13 additions and 12 deletions

View File

@@ -24,7 +24,7 @@ class CodeRhapsodieDataflowBundle extends Bundle
return new CodeRhapsodieDataflowExtension();
}
public function build(ContainerBuilder $container)
public function build(ContainerBuilder $container): void
{
$container
->addCompilerPass(new DataflowTypeCompilerPass())

View File

@@ -30,7 +30,7 @@ class AddScheduledDataflowCommand extends Command
/**
* {@inheritdoc}
*/
protected function configure()
protected function configure(): void
{
$this
->setHelp('The <info>%command.name%</info> allows you to create a new scheduled dataflow.')

View File

@@ -29,7 +29,7 @@ class ChangeScheduleStatusCommand extends Command
/**
* {@inheritdoc}
*/
protected function configure()
protected function configure(): void
{
$this
->setHelp('The <info>%command.name%</info> command able you to change schedule status.')

View File

@@ -34,7 +34,7 @@ class ExecuteDataflowCommand extends Command implements LoggerAwareInterface
/**
* {@inheritdoc}
*/
protected function configure()
protected function configure(): void
{
$this
->setHelp(<<<'EOF'

View File

@@ -34,7 +34,7 @@ class JobShowCommand extends Command
/**
* {@inheritdoc}
*/
protected function configure()
protected function configure(): void
{
$this
->setHelp('The <info>%command.name%</info> display job details for schedule or specific job.')

View File

@@ -32,7 +32,7 @@ class RunPendingDataflowsCommand extends Command
/**
* {@inheritdoc}
*/
protected function configure()
protected function configure(): void
{
$this
->setHelp(<<<'EOF'

View File

@@ -27,7 +27,7 @@ class ScheduleListCommand extends Command
/**
* {@inheritdoc}
*/
protected function configure()
protected function configure(): void
{
$this
->setHelp('The <info>%command.name%</info> lists all scheduled dataflows.')

View File

@@ -8,6 +8,7 @@ use CodeRhapsodie\DataflowBundle\Factory\ConnectionFactory;
use CodeRhapsodie\DataflowBundle\Repository\JobRepository;
use CodeRhapsodie\DataflowBundle\Repository\ScheduledDataflowRepository;
use CodeRhapsodie\DataflowBundle\SchemaProvider\DataflowSchemaProvider;
use Doctrine\DBAL\Schema\Comparator;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\DBAL\Schema\Table;
use Symfony\Component\Console\Attribute\AsCommand;
@@ -31,7 +32,7 @@ class SchemaCommand extends Command
/**
* {@inheritdoc}
*/
protected function configure()
protected function configure(): void
{
$this
->setHelp('The <info>%command.name%</info> help you to generate SQL Query to create or update your database schema for this bundle')
@@ -57,7 +58,7 @@ class SchemaCommand extends Command
$sqls = $schema->toSql($connection->getDatabasePlatform());
if ($input->getOption('update')) {
$sm = $connection->getSchemaManager();
$sm = $connection->createSchemaManager();
$tableArray = [JobRepository::TABLE_NAME, ScheduledDataflowRepository::TABLE_NAME];
$tables = [];
@@ -71,7 +72,7 @@ class SchemaCommand extends Command
$namespaces = [];
if ($connection->getDatabasePlatform()->supportsSchemas()) {
$namespaces = $sm->listNamespaceNames();
$namespaces = $sm->listSchemaNames();
}
$sequences = [];
@@ -82,7 +83,7 @@ class SchemaCommand extends Command
$oldSchema = new Schema($tables, $sequences, $sm->createSchemaConfig(), $namespaces);
$sqls = $schema->getMigrateFromSql($oldSchema, $connection->getDatabasePlatform());
$sqls = $connection->getDatabasePlatform()->getAlterSchemaSQL((new Comparator($connection->getDatabasePlatform()))->compareSchemas($oldSchema, $schema));
}
$io = new SymfonyStyle($input, $output);
$io->text('Execute these SQL Queries on your database:');
@@ -90,6 +91,6 @@ class SchemaCommand extends Command
$io->text($sql.';');
}
return 0;
return parent::SUCCESS;
}
}