zawiszaty /
symfony-prooph-example
| 1 | <?php |
||
| 2 | |||
| 3 | declare(strict_types=1); |
||
| 4 | |||
| 5 | require __DIR__.'./../vendor/autoload.php'; |
||
| 6 | |||
| 7 | use App\Kernel; |
||
| 8 | use Doctrine\ORM\Tools\SchemaTool; |
||
|
0 ignored issues
–
show
|
|||
| 9 | |||
| 10 | $kernel = new Kernel('test', true); |
||
| 11 | $kernel->boot(); |
||
| 12 | $container = $kernel->getContainer(); |
||
| 13 | |||
| 14 | $manager = $container->get('doctrine')->getManager(); |
||
| 15 | $metadatas = $manager->getMetadataFactory()->getAllMetadata(); |
||
| 16 | $schemaTool = new SchemaTool($manager); |
||
| 17 | $sqls = $schemaTool->getCreateSchemaSql($metadatas); |
||
| 18 | echo "Schema droping.... \n"; |
||
| 19 | $schemaTool->dropSchema($metadatas); |
||
| 20 | /** @var \Doctrine\DBAL\Connection $connection */ |
||
| 21 | $connection = $container->get('doctrine')->getConnection(); |
||
| 22 | $connection->beginTransaction(); |
||
| 23 | $connection->query('DROP TABLE `event_streams`;'); |
||
| 24 | $connection->commit(); |
||
| 25 | $connection->close(); |
||
| 26 | if (empty($sqls)) { |
||
| 27 | echo "Nothing to Drop \n"; |
||
| 28 | |||
| 29 | return 0; |
||
| 30 | } |
||
| 31 | echo "Schema Drop \n"; |
||
| 32 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths