Remove containerAwareInterface, no longer supported in sf72

This commit is contained in:
2025-05-27 14:06:36 +02:00
parent e3b2b7c6d1
commit 6cd17a8e36
9 changed files with 23 additions and 67 deletions

View File

@@ -14,16 +14,12 @@ namespace Chill\Migrations\Report;
use Chill\MainBundle\Entity\Scope;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
* Add a scope to report.
*/
class Version20150622233319 extends AbstractMigration implements ContainerAwareInterface
class Version20150622233319 extends AbstractMigration
{
private ?ContainerInterface $container = null;
public function down(Schema $schema): void
{
$this->abortIf(
@@ -37,15 +33,6 @@ class Version20150622233319 extends AbstractMigration implements ContainerAwareI
$this->addSql('ALTER TABLE Report DROP scope_id');
}
public function setContainer(?ContainerInterface $container = null): void
{
if (null === $container) {
throw new \RuntimeException('Container is not provided. This migration need container to set a default center');
}
$this->container = $container;
}
public function up(Schema $schema): void
{
$this->abortIf(