Skip to content

ClassMetadataInfo uses deprecated doctrine/common class #7306

@simonwelsh

Description

@simonwelsh

BC Break Report

Q A
BC Break yes
Version 2.6.2

Summary

After upgrading to 2.6.2, which included an upgrade to doctrine/common:2.9.0, PHPUnit now fails with:
1x: Doctrine\Common\ClassLoader is deprecated.

Previous behavior

No deprecation errors were shown from using non-deprecated methods

Current behavior

Doctrine\Common\ClassLoader is deprecated
/Users/simon/projects/stokl/backend/vendor/doctrine/common/lib/Doctrine/Common/ClassLoader.php:7
/Users/simon/projects/stokl/backend/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php:1028
/Users/simon/projects/stokl/backend/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php:266
/Users/simon/projects/stokl/backend/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php:245
/Users/simon/projects/stokl/backend/vendor/doctrine/persistence/lib/Doctrine/Common/Persistence/Mapping/AbstractClassMetadataFactory.php:305
/Users/simon/projects/stokl/backend/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php:78
/Users/simon/projects/stokl/backend/vendor/doctrine/persistence/lib/Doctrine/Common/Persistence/Mapping/AbstractClassMetadataFactory.php:183
/Users/simon/projects/stokl/backend/vendor/doctrine/persistence/lib/Doctrine/Common/Persistence/Mapping/AbstractClassMetadataFactory.php:89

How to reproduce

This is from in a test case in a Symfony application

    $entityManager =
      $kernel->getContainer()->get('doctrine.orm.entity_manager');

    $metadatas = $entityManager->getMetadataFactory()->getAllMetadata();

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions