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,13 +14,9 @@ namespace Chill\Migrations\Budget;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\DBAL\Types\Types;
use Doctrine\Migrations\AbstractMigration;
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
final class Version20221207105407 extends AbstractMigration implements ContainerAwareInterface
final class Version20221207105407 extends AbstractMigration
{
public ContainerInterface $container;
public function down(Schema $schema): void
{
$this->addSql('DELETE FROM chill_budget.resource_type;');
@@ -32,14 +28,9 @@ final class Version20221207105407 extends AbstractMigration implements Container
return 'Use new budget admin entities';
}
public function setContainer(?ContainerInterface $container = null): void
{
$this->container = $container;
}
public function up(Schema $schema): void
{
$resources = $this->container->getParameter('chill_budget.resources');
/* $resources = $this->container->getParameter('chill_budget.resources');
$charges = $this->container->getParameter('chill_budget.charges');
foreach ($resources as $value) {
@@ -76,6 +67,6 @@ final class Version20221207105407 extends AbstractMigration implements Container
['kind' => $kind],
['kind' => Types::STRING]
);
}
}*/
}
}