Skip to content

Commit

Permalink
Remove schema visitors (#11001)
Browse files Browse the repository at this point in the history
  • Loading branch information
derrabus authored Oct 12, 2023
1 parent 03148b1 commit e997c66
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 16 deletions.
11 changes: 0 additions & 11 deletions lib/Doctrine/ORM/Tools/SchemaTool.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
use Doctrine\DBAL\Schema\Index;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\DBAL\Schema\Table;
use Doctrine\DBAL\Schema\Visitor\RemoveNamespacedAssets;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\Mapping\AssociationMapping;
use Doctrine\ORM\Mapping\ClassMetadata;
Expand All @@ -33,13 +32,11 @@
use function array_flip;
use function array_intersect_key;
use function assert;
use function class_exists;
use function count;
use function current;
use function implode;
use function in_array;
use function is_numeric;
use function method_exists;
use function strtolower;

/**
Expand Down Expand Up @@ -381,14 +378,6 @@ public function getSchemaFromMetadata(array $classes): Schema
}
}

if (
! $this->platform->supportsSchemas()
&& class_exists(RemoveNamespacedAssets::class)
&& method_exists($schema, 'visit')
) {
$schema->visit(new RemoveNamespacedAssets());
}

if ($eventManager->hasListeners(ToolEvents::postGenerateSchema)) {
$eventManager->dispatchEvent(
ToolEvents::postGenerateSchema,
Expand Down
5 changes: 0 additions & 5 deletions psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
<!-- We wire the command as long as DBAL ships it -->
<referencedClass name="Doctrine\DBAL\Tools\Console\Command\ReservedWordsCommand" />
<!-- Remove on 3.0.x -->
<referencedClass name="Doctrine\DBAL\Schema\Visitor\RemoveNamespacedAssets"/>
<referencedClass name="Doctrine\ORM\Event\LifecycleEventArgs"/>
<referencedClass name="Doctrine\ORM\Exception\UnknownEntityNamespace"/>
<referencedClass name="Doctrine\ORM\Mapping\Driver\AnnotationDriver"/>
Expand All @@ -47,7 +46,6 @@
<!-- Remove on 3.0.x -->
<!-- Compatibility with DBAL 3 -->
<referencedMethod name="Doctrine\DBAL\Connection::getEventManager"/>
<referencedMethod name="Doctrine\DBAL\Schema\Schema::visit"/>
<file name="lib/Doctrine/ORM/Query/TreeWalkerChain.php"/>
</errorLevel>
</DeprecatedMethod>
Expand Down Expand Up @@ -196,9 +194,6 @@
<errorLevel type="suppress">
<!-- Persistence 2 compatibility -->
<referencedClass name="Doctrine\Persistence\ObjectManagerAware"/>

<!-- See https://github.com/doctrine/dbal/pull/5432 -->
<referencedClass name="Doctrine\DBAL\Schema\Visitor\RemoveNamespacedAssets"/>
</errorLevel>
</UndefinedClass>
<UndefinedMethod>
Expand Down

0 comments on commit e997c66

Please sign in to comment.