Skip to content

Commit

Permalink
Fix: Do not use deprecated Doctrine\ORM\Tools\Setup
Browse files Browse the repository at this point in the history
  • Loading branch information
localheinz committed Feb 7, 2024
1 parent dafbab1 commit be5c5c1
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 24 deletions.
2 changes: 1 addition & 1 deletion example/test/Unit/AbstractTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ abstract class AbstractTestCase extends Framework\TestCase
{
final protected static function entityManager(): ORM\EntityManagerInterface
{
$configuration = ORM\Tools\Setup::createConfiguration(true);
$configuration = ORM\ORMSetup::createConfiguration(true);

$configuration->setMetadataDriverImpl(new ORM\Mapping\Driver\AttributeDriver([
__DIR__ . '/../../src/Entity',
Expand Down
16 changes: 0 additions & 16 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -136,14 +136,6 @@ parameters:
count: 1
path: example/test/Unit/AbstractTestCase.php

-
message: """
#^Call to method createConfiguration\\(\\) of deprecated class Doctrine\\\\ORM\\\\Tools\\\\Setup\\:
Use \\{@see ORMSetup\\} instead\\.$#
"""
count: 1
path: example/test/Unit/AbstractTestCase.php

-
message: "#^Instanceof between Ergebnis\\\\FactoryBot\\\\FieldDefinition\\\\Resolvable and Ergebnis\\\\FactoryBot\\\\FieldDefinition\\\\Resolvable will always evaluate to true\\.$#"
count: 1
Expand Down Expand Up @@ -567,11 +559,3 @@ parameters:
count: 1
path: test/Util/Doctrine/ORM/EntityManagerFactory.php

-
message: """
#^Call to method createConfiguration\\(\\) of deprecated class Doctrine\\\\ORM\\\\Tools\\\\Setup\\:
Use \\{@see ORMSetup\\} instead\\.$#
"""
count: 1
path: test/Util/Doctrine/ORM/EntityManagerFactory.php

6 changes: 0 additions & 6 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,6 @@
</UnusedClass>
</file>
<file src="example/test/Unit/AbstractTestCase.php">
<DeprecatedClass>
<code>ORM\Tools\Setup::createConfiguration(true)</code>
</DeprecatedClass>
<DeprecatedMethod>
<code><![CDATA[ORM\EntityManager::create(
[
Expand Down Expand Up @@ -448,9 +445,6 @@
</MixedAssignment>
</file>
<file src="test/Util/Doctrine/ORM/EntityManagerFactory.php">
<DeprecatedClass>
<code>ORM\Tools\Setup::createConfiguration(true)</code>
</DeprecatedClass>
<DeprecatedMethod>
<code><![CDATA[ORM\EntityManager::create(
[
Expand Down
2 changes: 1 addition & 1 deletion test/Util/Doctrine/ORM/EntityManagerFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ final class EntityManagerFactory
{
public static function create(): ORM\EntityManagerInterface
{
$configuration = ORM\Tools\Setup::createConfiguration(true);
$configuration = ORM\ORMSetup::createConfiguration(true);

$configuration->setMetadataDriverImpl(new ORM\Mapping\Driver\AttributeDriver([
__DIR__ . '/../../../../example/src/Entity',
Expand Down

0 comments on commit be5c5c1

Please sign in to comment.