update composer packages (#3502)

drop full database schema in test
This commit is contained in:
Kevin Papst
2022-09-25 17:06:49 +02:00
committed by GitHub
parent bfab6f42d0
commit 96d0d4943b
4 changed files with 356 additions and 376 deletions

View File

@@ -16,8 +16,11 @@ use App\Entity\Team;
use App\Entity\User;
use App\Entity\UserPreference;
use Doctrine\ORM\EntityManagerInterface;
use Exception;
use Symfony\Component\Console\Input\ArrayInput;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Style\SymfonyStyle;
/**
* Command used to execute all the basic application bootstrapping AFTER "composer install" was executed.
@@ -143,4 +146,18 @@ class ResetTestCommand extends AbstractResetCommand
$this->entityManager->flush();
}
protected function dropSchema(SymfonyStyle $io, OutputInterface $output): int
{
try {
$command = $this->getApplication()->find('doctrine:schema:drop');
$command->run(new ArrayInput(['--force' => true, '--full-database' => true]), $output);
} catch (Exception $ex) {
$io->error('Failed to drop database schema: ' . $ex->getMessage());
return 2;
}
return 0;
}
}