UPGRADE FROM 1.x to 2.0 ======================= PHP and Symfony version support ------------------------------- * Support for PHP 5.5, 5.6 and 7.0 was dropped * Support for unsupported Symfony versions was dropped. The bundle now supports Symfony 3.4 LTS and 4.1 or newer. * Support for Twig 1.34 and below as well as 2.4 and below (for 2.x) releases was dropped. Commands -------- * `Doctrine\Bundle\DoctrineBundle\Command` requires a `ManagerRegistry` instance when instantiating. * Dropped `setContainer` and `getContainer` in `Doctrine\Bundle\DoctrineBundle\Command`. * `Doctrine\Bundle\DoctrineBundle\Command` no longer implements `ContainerAwareInterface`. Deprecation of DoctrineCacheBundle ---------------------------------- Configuring caches through DoctrineCacheBundle is no longer possible. Please use symfony/cache through the `pool` type or configure your cache services manually and use the `service` type. Mapping ------- * Dropped `ContainerAwareEntityListenerResolver`, use `ContainerEntityListenerResolver` instead. Types ----- * Marking types as commented in the configuration is no longer supported. Instead, mark them commented using the `requiresSQLCommentHint()` method of the type. * The `commented` configuration option for types will be dropped in a future release. You should not use it. UnitOfWork cleared between each request --------------------------------------- If all of these are true: * You call `Symfony\Bundle\FrameworkBundle\Client::disableReboot()` in your test case * Trigger multiple HTTP requests (via `Symfony\Bundle\FrameworkBundle\Client::request()` etc.) within your test case * Your test case relies on Doctrine ORM keeping references to old entities between requests (this is most obvious when calling `Doctrine\Persistence\ObjectManager::refresh`) Your test case will fail since `DoctrineBundle` 2.0.3, as identity map is now cleared between each request to better simulate real requests and avoid memory leaks. You have two options to solve this: 1. Change your test cases with new behaviour in mind. In a lot of cases this just means to replace `ObjectManager::refresh($entity)` with `$entity = ObjectManager::find($entity->getId())`. This is the recommended solution. 2. Write a compiler pass which restores old behaviour, e.g. by adding the following to your `Kernel` class: ```php protected function build(\Symfony\Component\DependencyInjection\ContainerBuilder $container) { parent::build($container); if ($this->environment === 'test') { $container->addCompilerPass(new class implements \Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface { public function process(\Symfony\Component\DependencyInjection\ContainerBuilder $container) { $container->getDefinition('doctrine')->clearTag('kernel.reset'); } }, \Symfony\Component\DependencyInjection\Compiler\PassConfig::TYPE_BEFORE_OPTIMIZATION, 1); } } ```
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
.github | Folder | 0755 |
|
|
Command | Folder | 0755 |
|
|
Controller | Folder | 0755 |
|
|
DataCollector | Folder | 0755 |
|
|
Dbal | Folder | 0755 |
|
|
DependencyInjection | Folder | 0755 |
|
|
Mapping | Folder | 0755 |
|
|
Repository | Folder | 0755 |
|
|
Resources | Folder | 0755 |
|
|
Twig | Folder | 0755 |
|
|
.doctrine-project.json | File | 1.92 KB | 0644 |
|
ConnectionFactory.php | File | 6.09 KB | 0644 |
|
DoctrineBundle.php | File | 5.05 KB | 0644 |
|
LICENSE | File | 1.05 KB | 0644 |
|
ManagerConfigurator.php | File | 1.84 KB | 0644 |
|
README.md | File | 1.31 KB | 0644 |
|
Registry.php | File | 5.78 KB | 0644 |
|
UPGRADE-1.11.md | File | 1.07 KB | 0644 |
|
UPGRADE-1.12.md | File | 2.44 KB | 0644 |
|
UPGRADE-2.0.md | File | 2.94 KB | 0644 |
|
composer.json | File | 2.46 KB | 0644 |
|
phpcs.xml.dist | File | 2.82 KB | 0644 |
|