From 52e4aa29af78aa3691f6368d8e6eb951af120c94 Mon Sep 17 00:00:00 2001 From: Nicolas Potier Date: Thu, 6 Feb 2025 17:01:10 +0100 Subject: [PATCH] feature: support symfony/dependency-injection 7.x (#1127) (#1130) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: François-Xavier de Guillebon --- Grid/Export/ContainerAwareInterface.php | 17 +++++++++++++++++ Grid/Export/Export.php | 1 - Grid/Grid.php | 2 +- ...umnTitleAnnotationTranslationExtractor.php | 19 ++----------------- composer.json | 2 +- 5 files changed, 21 insertions(+), 20 deletions(-) create mode 100644 Grid/Export/ContainerAwareInterface.php diff --git a/Grid/Export/ContainerAwareInterface.php b/Grid/Export/ContainerAwareInterface.php new file mode 100644 index 00000000..767ee968 --- /dev/null +++ b/Grid/Export/ContainerAwareInterface.php @@ -0,0 +1,17 @@ +annotated = false; @@ -68,7 +61,7 @@ public function visitPhpFile(\SplFileInfo $file, MessageCatalogue $catalogue, ar if ($this->annotated) { // Get annotations for the class $annotationDriver = new Annotation(new DoctrineAnnotationReader()); - $manager = new Manager($this->container); + $manager = new Manager(); $manager->addDriver($annotationDriver, -1); $metadata = $manager->getMetadata($this->parsedClassName); @@ -87,12 +80,4 @@ public function visitPhpFile(\SplFileInfo $file, MessageCatalogue $catalogue, ar public function visitTwigFile(\SplFileInfo $file, MessageCatalogue $catalogue, \Twig_Node $node) { } - - /** - * {@inheritdoc} - */ - public function setContainer(ContainerInterface $container = null) - { - $this->container = $container; - } } diff --git a/composer.json b/composer.json index 276cb56f..8a887307 100644 --- a/composer.json +++ b/composer.json @@ -26,7 +26,7 @@ "require": { "php": "^7.4 || ^8.0", "symfony/form": "^3.0 || ^4.0 || ^5.0 || ^6.0", - "symfony/dependency-injection": "^3.0 || ^4.0 || ^5.0 || ^6.0", + "symfony/dependency-injection": "^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0", "symfony/config": "^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0", "symfony/http-foundation": "^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0", "symfony/http-kernel": "^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0",