This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/src/Symfony/Bridge/Doctrine
Fabien Potencier 0de88bbcc1 feature #13864 Entity type: loader caching by query builder instance (dominikzogg)
This PR was merged into the 2.7 branch.

Discussion
----------

Entity type: loader caching by query builder instance

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

Using entity types within a collection, can get very slow, if a query_builder option is set.

Without this option, the doctrine type handles everything itself, and makes it calls against the manager registry, but using this, calls the getLoader method, which ends in build the choice list again for each collection element, which makes more than twice the time for a page load within my energycalculator.

https://github.com/dominikzogg/symfony/blob/2.7/src/Symfony/Bridge/Doctrine/Form/Type/DoctrineType.php#L68

https://github.com/dominikzogg/symfony/blob/2.7/src/Symfony/Bridge/Doctrine/Form/Type/DoctrineType.php#L108

https://github.com/dominikzogg/energycalculator/blob/master/src/Dominikzogg/EnergyCalculator/Form/ComestibleWithinDayType.php

Commits
-------

42b682b allow to cache entity loader based on query builder
2015-03-13 13:38:17 +01:00
..
CacheWarmer Fix docblock in Doctrine Bridge 2012-11-16 12:36:52 -05:00
DataCollector [2.3] Remove most refs uses 2015-03-07 13:18:29 +01:00
DataFixtures [DoctrineBridge] Rename data fixtures loader class 2012-02-11 16:48:09 -05:00
DependencyInjection Merge branch '2.5' into 2.6 2015-01-03 09:01:59 +01:00
ExpressionLanguage unified return null usages 2014-04-18 22:38:54 +02:00
Form allow to cache entity loader based on query builder 2015-03-13 12:48:27 +01:00
HttpFoundation fixed CS 2014-09-22 10:32:35 +02:00
Logger [DoctrineBridge] Fix empty parameter logging in the dbal logger 2014-08-22 12:29:51 +02:00
Security Merge branch '2.3' into 2.5 2015-01-03 09:01:13 +01:00
Test [DoctrineBridge] Improved test coverage of EntityChoiceList 2013-09-10 18:24:34 +02:00
Tests allow to cache entity loader based on query builder 2015-03-13 12:48:27 +01:00
Validator Merge branch '2.6' into 2.7 2015-02-05 07:58:17 +01:00
.gitignore Added missing files .gitignore 2013-07-21 14:12:18 +02:00
CHANGELOG.md Normalized @deprecated annotations. 2015-01-05 16:02:26 +01:00
composer.json Merge branch '2.3' into 2.6 2015-02-24 12:52:21 +01:00
ContainerAwareEventManager.php [2.3] CS And DocBlock Fixes 2014-12-22 16:58:09 +01:00
LICENSE Updated copyright to 2015 2015-01-01 13:56:52 +01:00
ManagerRegistry.php made {@inheritdoc} annotations consistent across the board 2014-04-16 09:04:20 +02:00
phpunit.xml.dist [2.3] require-dev PHPUnit bridge 2015-02-24 11:24:26 +01:00
README.md renamed composer.phar to composer to be consistent with the Symfony docs 2015-02-08 08:41:14 +01:00
RegistryInterface.php Fix phpdoc and coding standards 2014-12-29 23:41:34 +01:00

Doctrine Bridge

Provides integration for Doctrine with various Symfony components.

Resources

You can run the unit tests with the following command:

$ cd path/to/Symfony/Bridge/Doctrine/
$ composer install
$ phpunit