Skip to content

Commit

Permalink
Merge branch '3.0.x' into 2.16.x-update-order-of-mapping-attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
soltmar authored Oct 10, 2023
2 parents 9e564c6 + 2aaec3a commit 2b77579
Show file tree
Hide file tree
Showing 24 changed files with 83 additions and 431 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ jobs:
php-version:
- "8.1"
- "8.2"
- "8.3"
dbal-version:
- "default"
extension:
Expand All @@ -58,7 +59,7 @@ jobs:

steps:
- name: "Checkout"
uses: "actions/checkout@v3"
uses: "actions/checkout@v4"
with:
fetch-depth: 2

Expand Down Expand Up @@ -106,6 +107,7 @@ jobs:
matrix:
php-version:
- "8.2"
- "8.3"
dbal-version:
- "default"
- "3@dev"
Expand Down Expand Up @@ -138,7 +140,7 @@ jobs:

steps:
- name: "Checkout"
uses: "actions/checkout@v3"
uses: "actions/checkout@v4"
with:
fetch-depth: 2

Expand Down Expand Up @@ -178,6 +180,7 @@ jobs:
matrix:
php-version:
- "8.2"
- "8.3"
dbal-version:
- "default"
- "3@dev"
Expand All @@ -203,7 +206,7 @@ jobs:

steps:
- name: "Checkout"
uses: "actions/checkout@v3"
uses: "actions/checkout@v4"
with:
fetch-depth: 2

Expand Down Expand Up @@ -243,6 +246,7 @@ jobs:
matrix:
php-version:
- "8.2"
- "8.3"
dbal-version:
- "default"
- "3@dev"
Expand Down Expand Up @@ -276,7 +280,7 @@ jobs:

steps:
- name: "Checkout"
uses: "actions/checkout@v3"
uses: "actions/checkout@v4"
with:
fetch-depth: 2

Expand Down Expand Up @@ -324,7 +328,7 @@ jobs:

steps:
- name: "Checkout"
uses: "actions/checkout@v3"
uses: "actions/checkout@v4"
with:
fetch-depth: 2

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:

steps:
- name: "Checkout code"
uses: "actions/checkout@v3"
uses: "actions/checkout@v4"

- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/phpbench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:

steps:
- name: "Checkout"
uses: "actions/checkout@v3"
uses: "actions/checkout@v4"
with:
fetch-depth: 2

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ jobs:
config: phpstan-dbal4.neon

steps:
- name: Checkout code
uses: actions/checkout@v3
- name: "Checkout code"
uses: "actions/checkout@v4"

- name: Install PHP
uses: shivammathur/setup-php@v2
Expand Down Expand Up @@ -68,8 +68,8 @@ jobs:
- 4@dev

steps:
- name: Checkout code
uses: actions/checkout@v3
- name: "Checkout code"
uses: "actions/checkout@v4"

- name: Install PHP
uses: shivammathur/setup-php@v2
Expand Down
15 changes: 15 additions & 0 deletions docs/en/tutorials/pagination.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,18 @@ the future.
.. note::

``fetchJoinCollection`` argument set to ``true`` might affect results if you use aggregations in your query.

By using the ``Paginator::HINT_ENABLE_DISTINCT`` you can instruct doctrine that the query to be executed
will not produce "duplicate" rows (only to-one relations are joined), thus the SQL limit will work as expected.
In this way the `DISTINCT` keyword will be omitted and can bring important performance improvements.

.. code-block:: php
<?php
use Doctrine\ORM\Tools\Pagination\Paginator;
$dql = "SELECT u, p FROM User u JOIN u.mainPicture p";
$query = $entityManager->createQuery($dql)
->setHint(Paginator::HINT_ENABLE_DISTINCT, false)
->setFirstResult(0)
->setMaxResults(100);
Original file line number Diff line number Diff line change
Expand Up @@ -268,10 +268,7 @@ public function getOwningTable(string $fieldName): string
return $this->persister->getOwningTable($fieldName);
}

/**
* {@inheritDoc}
*/
public function executeInserts()
public function executeInserts(): void
{
// The commit order/foreign key relationships may make it necessary that multiple calls to executeInsert()
// are performed, so collect all the new entities.
Expand All @@ -281,7 +278,7 @@ public function executeInserts()
$this->queuedCache['insert'] = array_merge($this->queuedCache['insert'] ?? [], $newInserts);
}

return $this->persister->executeInserts();
$this->persister->executeInserts();
}

/**
Expand Down
27 changes: 0 additions & 27 deletions lib/Doctrine/ORM/Internal/CommitOrder/Edge.php

This file was deleted.

32 changes: 0 additions & 32 deletions lib/Doctrine/ORM/Internal/CommitOrder/Vertex.php

This file was deleted.

16 changes: 0 additions & 16 deletions lib/Doctrine/ORM/Internal/CommitOrder/VertexState.php

This file was deleted.

153 changes: 0 additions & 153 deletions lib/Doctrine/ORM/Internal/CommitOrderCalculator.php

This file was deleted.

Loading

0 comments on commit 2b77579

Please sign in to comment.