Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Do not use deprecated Doctrine\ORM\Tools\Setup #1295

Merged
merged 1 commit into from
Feb 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading