Skip to content

Commit

Permalink
[make:crud] Make sensio/framework-extra-bundle an optional dependency (
Browse files Browse the repository at this point in the history
  • Loading branch information
acrobat authored Jan 3, 2023
1 parent a858481 commit 7fe9fc1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Maker/MakeCrud.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\EntityRepository;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
use Symfony\Bridge\Doctrine\ArgumentResolver\EntityValueResolver;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Bundle\FrameworkBundle\KernelBrowser;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
Expand Down Expand Up @@ -317,9 +318,11 @@ public function configureDependencies(DependencyBuilder $dependencies): void
'security-csrf'
);

// @legacy - Remove dependency when support for Symfony <6.2 is dropped
$dependencies->addClassDependency(
ParamConverter::class,
'annotations'
'annotations',
!class_exists(EntityValueResolver::class) // sensio/framework-extra-bundle dependency is not required when using symfony 6.2+
);
}
}

0 comments on commit 7fe9fc1

Please sign in to comment.