Skip to content

Commit 4338ebb

Browse files
committed
bug #290 Fix make:user dependency: more precise to get the recipe (weaverryan)
This PR was merged into the 1.0-dev branch. Discussion ---------- Fix make:user dependency: more precise to get the recipe We fully need SecurityBundle so the recipe has been executed. Discovered at a workshop - if you installed `security-csrf` first, and then ran this command, it would allow you to continue, though the `security.yaml` file would be missing. Commits ------- 76d57c5 We fully need SecurityBundle so the recipe has been executed
2 parents 832c370 + 76d57c5 commit 4338ebb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Maker/MakeUser.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@
2626
use Symfony\Bundle\MakerBundle\Util\ClassSourceManipulator;
2727
use Symfony\Bundle\MakerBundle\Util\YamlManipulationFailedException;
2828
use Symfony\Bundle\MakerBundle\Validator;
29+
use Symfony\Bundle\SecurityBundle\SecurityBundle;
2930
use Symfony\Component\Console\Command\Command;
3031
use Symfony\Component\Console\Input\InputArgument;
3132
use Symfony\Component\Console\Input\InputInterface;
3233
use Symfony\Component\Console\Input\InputOption;
3334
use Symfony\Component\Security\Core\Encoder\Argon2iPasswordEncoder;
34-
use Symfony\Component\Security\Core\User\UserInterface;
3535
use Symfony\Component\Yaml\Yaml;
3636

3737
/**
@@ -223,8 +223,9 @@ public function configureDependencies(DependencyBuilder $dependencies, InputInte
223223
{
224224
$dependencies->requirePHP71();
225225

226+
// checking for SecurityBundle guarantees security.yaml is present
226227
$dependencies->addClassDependency(
227-
UserInterface::class,
228+
SecurityBundle::class,
228229
'security'
229230
);
230231

0 commit comments

Comments
 (0)