Note about upgrading: Doctrine uses static and runtime mechanisms to raise awareness about deprecated code.
- Use of
@deprecateddocblock that is detected by IDEs (like PHPStorm) or Static Analysis tools (like Psalm, phpstan) - Use of our low-overhead runtime deprecation API, details: https://github.com/doctrine/deprecations/
You need PHP 8.1 or newer to use this library.
All types defined in phpdoc annotations are now defined natively, they must be added to your code if you extend the classes or implement the interfaces.
- Passing a callable to
AbstractExecutor::setLogger()is not possible anymore, pass a PSR-3 logger instead. - The method
AbstractExecutor::log()has been removed without replacement.
For the following method, the class param is now mandatory:
AbstractFixture::getReferenceAbstractFixture::hasReferenceReferenceRepository::setReferenceIdentityReferenceRepository::hasIdentityReferenceRepository::getReferenceReferenceRepository::setReference
The following method was removed:
ReferenceRepository::getReferences
The following classes are now final, each of them has an interface you can implement:
Doctrine\Common\DataFixtures\Executor\MongoDBExecutorDoctrine\Common\DataFixtures\Executor\ORMExecutorDoctrine\Common\DataFixtures\Executor\PHPCSExecutorDoctrine\Common\DataFixtures\Purger\MongoDBPurgerDoctrine\Common\DataFixtures\Purger\ORMPurgerDoctrine\Common\DataFixtures\Purger\PHPCSPurger
- Passing a callable to
AbstractExecutor::setLogger()is deprecated, pass a PSR-3 logger instead. - The method
AbstractExecutor::log()is deprecated without replacement.
Executor and Purger classes are final, they cannot be extended.
AbstractExecutor is internal. It cannot be extended or used as typehint.
We don't think anyone catches this exception in a catch (CommonException) statement.
If you rely on types from doctrine/common, you should require that package, regardless of whether other packages require it.
The FixtureInterface was changed from
interface FixtureInterface
{
load($manager);
}
to
use Doctrine\Common\Persistence\ObjectManager;
interface FixtureInterface
{
load(ObjectManager $manager);
}