Skip to content

Commit 38eafed

Browse files
nacorpjrushlow
authored andcommitted
fix: using Kernel::VERSION
1 parent 0cdc688 commit 38eafed

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Maker/MakeCrud.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
use Symfony\Component\Form\AbstractType;
3939
use Symfony\Component\HttpFoundation\Request;
4040
use Symfony\Component\HttpFoundation\Response;
41+
use Symfony\Component\HttpKernel\Kernel;
4142
use Symfony\Component\Routing\Annotation\Route;
4243
use Symfony\Component\Security\Csrf\CsrfTokenManager;
4344
use Symfony\Component\Validator\Validation;
@@ -179,8 +180,8 @@ public function generate(InputInterface $input, ConsoleStyle $io, Generator $gen
179180
'entity_var_singular' => $entityVarSingular,
180181
'entity_twig_var_singular' => $entityTwigVarSingular,
181182
'entity_identifier' => $entityDoctrineDetails->getIdentifier(),
182-
// @legacy - Remove when support for Symfony <6 is dropped - hack to determine version
183-
'use_render_form' => method_exists(AbstractController::class, 'getDoctrine'),
183+
// @legacy - Remove when support for Symfony <6 is dropped
184+
'use_render_form' => Kernel::VERSION_ID < 60000,
184185
],
185186
$repositoryVars
186187
)

0 commit comments

Comments
 (0)