Skip to content

Commit

Permalink
Load fixtures: fix purge-with-truncate flag (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
vnarek authored Jul 22, 2022
1 parent 56accd2 commit d7ef1be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Command/LoadDataFixturesCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int

$purgeTruncate = $input->getOption('purge-with-truncate');
$purger = new ORMPurger($em);
$purger->setPurgeMode($purgeTruncate !== null && $purgeTruncate !== '' ? ORMPurger::PURGE_MODE_TRUNCATE : ORMPurger::PURGE_MODE_DELETE);
$purger->setPurgeMode($purgeTruncate !== null && $purgeTruncate ? ORMPurger::PURGE_MODE_TRUNCATE : ORMPurger::PURGE_MODE_DELETE);

$executor = new ORMExecutor($em, $purger);
$executor->setLogger(function ($message) use ($output): void {
Expand Down

0 comments on commit d7ef1be

Please sign in to comment.