Skip to content

Commit

Permalink
Merge branch '2.14.x' into 2.15.x
Browse files Browse the repository at this point in the history
  • Loading branch information
ostrolucky committed Mar 19, 2023
2 parents 04573fc + a50a611 commit 25bd41a
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 23 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@
"doctrine/annotations": "^1.13 || ^2",
"doctrine/coding-standard": "^9.0.2 || ^11.0",
"phpbench/phpbench": "^0.16.10 || ^1.0",
"phpstan/phpstan": "~1.4.10 || 1.10.3",
"phpstan/phpstan": "~1.4.10 || 1.10.6",
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.6",
"psr/log": "^1 || ^2 || ^3",
"squizlabs/php_codesniffer": "3.7.2",
"symfony/cache": "^4.4 || ^5.4 || ^6.0",
"symfony/var-exporter": "^4.4 || ^5.4 || ^6.2",
"symfony/yaml": "^3.4 || ^4.0 || ^5.0 || ^6.0",
"vimeo/psalm": "4.30.0 || 5.7.7"
"vimeo/psalm": "4.30.0 || 5.8.0"
},
"conflict": {
"doctrine/annotations": "<1.13 || >= 3.0"
Expand Down
2 changes: 0 additions & 2 deletions docs/en/reference/basic-mapping.rst
Original file line number Diff line number Diff line change
Expand Up @@ -534,8 +534,6 @@ the above example with ``allocationSize=100`` Doctrine ORM would only
need to access the sequence once to generate the identifiers for
100 new entities.

*The default allocationSize for a @SequenceGenerator is currently 10.*

.. caution::

The allocationSize is detected by SchemaTool and
Expand Down
6 changes: 4 additions & 2 deletions docs/en/reference/batch-processing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@ especially what the strategies presented here provide help with.
.. note::

Having an SQL logger enabled when processing batches can have a serious impact on performance and resource usage.
To avoid that you should disable it in the DBAL configuration:
To avoid that you should remove the corresponding middleware.
To remove all middlewares, you can use this line:
.. code-block:: php
<?php
$em->getConnection()->getConfiguration()->setSQLLogger(null);
$em->getConnection()->getConfiguration()->setMiddlewares([]); // DBAL 3
$em->getConnection()->getConfiguration()->setSQLLogger(null); // DBAL 2
Bulk Inserts
------------
Expand Down
28 changes: 14 additions & 14 deletions docs/en/reference/inheritance-mapping.rst
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,20 @@ lowercase short name of each class as key.
to see if they are part of it. The resulting map, however, can be kept
in the metadata cache.

Performance impact on to-one associations
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

There is a general performance consideration when using entity inheritance:
If the target-entity of a many-to-one or one-to-one association is part of
an inheritance hierarchy, it is preferable for performance reasons that it
be a leaf entity (ie. have no subclasses).

Otherwise, the ORM is currently unable to tell beforehand which entity class
will have to be used, and so no appropriate proxy instance can be created.
That means the referred-to entities will *always* be loaded eagerly, which
might even propagate to relationships of these entities (in the case of
self-referencing associations).

Single Table Inheritance
------------------------

Expand Down Expand Up @@ -255,13 +269,6 @@ only a ``WHERE`` clause listing the type identifiers. In particular,
relationships involving types that employ this mapping strategy are
very performing.

There is a general performance consideration with Single Table
Inheritance: If the target-entity of a many-to-one or one-to-one
association is an STI entity, it is preferable for performance reasons that it
be a leaf entity in the inheritance hierarchy, (ie. have no subclasses).
Otherwise Doctrine *cannot* create proxy instances
of this entity and will *always* load the entity eagerly.

SQL Schema considerations
~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down Expand Up @@ -345,13 +352,6 @@ performance but the resulting partial objects will not fully load
themselves on access of any subtype fields, so accessing fields of
subtypes after such a query is not safe.
There is a general performance consideration with Class Table
Inheritance: If the target-entity of a many-to-one or one-to-one
association is a CTI entity, it is preferable for performance reasons that it
be a leaf entity in the inheritance hierarchy, ie. have no subclasses.
Otherwise Doctrine *cannot* create proxy instances
of this entity and will *always* load the entity eagerly.
There is also another important performance consideration that it is *not possible*
to query for the base entity without any ``LEFT JOIN``s to the sub-types.
Expand Down
4 changes: 2 additions & 2 deletions lib/Doctrine/ORM/Mapping/Driver/SimplifiedXmlDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ class SimplifiedXmlDriver extends XmlDriver
/**
* {@inheritDoc}
*/
public function __construct($prefixes, $fileExtension = self::DEFAULT_FILE_EXTENSION)
public function __construct($prefixes, $fileExtension = self::DEFAULT_FILE_EXTENSION, bool $isXsdValidationEnabled = false)
{
$locator = new SymfonyFileLocator((array) $prefixes, $fileExtension);

parent::__construct($locator, $fileExtension);
parent::__construct($locator, $fileExtension, $isXsdValidationEnabled);
}
}
2 changes: 1 addition & 1 deletion psalm-baseline.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<files psalm-version="5.7.7@e028ba46ba0d7f9a78bc3201c251e137383e145f">
<files psalm-version="5.8.0@9cf4f60a333f779ad3bc704a555920e81d4fdcda">
<file src="lib/Doctrine/ORM/AbstractQuery.php">
<DeprecatedClass>
<code>IterableResult</code>
Expand Down

0 comments on commit 25bd41a

Please sign in to comment.