Skip to content

Commit 99c96b4

Browse files
authored
Merge pull request #12242 from doctrine/2.20.x-merge-up-into-2.21.x_urr9kua6
Merge release 2.20.7 into 2.21.x
2 parents 18d07a1 + 59938ca commit 99c96b4

File tree

62 files changed

+694
-277
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+694
-277
lines changed

.github/workflows/coding-standards.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ on:
2424

2525
jobs:
2626
coding-standards:
27-
uses: "doctrine/.github/.github/workflows/coding-standards.yml@8.0.0"
27+
uses: "doctrine/.github/.github/workflows/coding-standards.yml@12.1.0"

.github/workflows/continuous-integration.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ jobs:
4141
- "8.2"
4242
- "8.3"
4343
- "8.4"
44+
- "8.5"
4445
dbal-version:
4546
- "default"
4647
extension:
@@ -98,7 +99,7 @@ jobs:
9899
ORM_PROXY_IMPLEMENTATION: "${{ matrix.proxy }}"
99100

100101
- name: "Upload coverage file"
101-
uses: "actions/upload-artifact@v4"
102+
uses: "actions/upload-artifact@v5"
102103
with:
103104
name: "phpunit-${{ matrix.extension }}-${{ matrix.php-version }}-${{ matrix.dbal-version }}-${{ matrix.proxy }}-coverage"
104105
path: "coverage*.xml"
@@ -115,6 +116,7 @@ jobs:
115116
- "8.2"
116117
- "8.3"
117118
- "8.4"
119+
- "8.5"
118120
dbal-version:
119121
- "default"
120122
- "3@dev"
@@ -172,7 +174,7 @@ jobs:
172174
run: "vendor/bin/phpunit -c ci/github/phpunit/pdo_pgsql.xml --coverage-clover=coverage.xml"
173175

174176
- name: "Upload coverage file"
175-
uses: "actions/upload-artifact@v4"
177+
uses: "actions/upload-artifact@v5"
176178
with:
177179
name: "${{ github.job }}-${{ matrix.postgres-version }}-${{ matrix.php-version }}-${{ matrix.dbal-version }}-${{ matrix.extension }}-coverage"
178180
path: "coverage.xml"
@@ -189,6 +191,7 @@ jobs:
189191
- "8.2"
190192
- "8.3"
191193
- "8.4"
194+
- "8.5"
192195
dbal-version:
193196
- "default"
194197
- "3@dev"
@@ -243,7 +246,7 @@ jobs:
243246
run: "vendor/bin/phpunit -c ci/github/phpunit/${{ matrix.extension }}.xml --coverage-clover=coverage.xml"
244247

245248
- name: "Upload coverage file"
246-
uses: "actions/upload-artifact@v4"
249+
uses: "actions/upload-artifact@v5"
247250
with:
248251
name: "${{ github.job }}-${{ matrix.mariadb-version }}-${{ matrix.extension }}-${{ matrix.php-version }}-${{ matrix.dbal-version }}-coverage"
249252
path: "coverage.xml"
@@ -260,6 +263,7 @@ jobs:
260263
- "8.2"
261264
- "8.3"
262265
- "8.4"
266+
- "8.5"
263267
dbal-version:
264268
- "default"
265269
- "3@dev"
@@ -321,7 +325,7 @@ jobs:
321325
ENABLE_SECOND_LEVEL_CACHE: 1
322326

323327
- name: "Upload coverage files"
324-
uses: "actions/upload-artifact@v4"
328+
uses: "actions/upload-artifact@v5"
325329
with:
326330
name: "${{ github.job }}-${{ matrix.mysql-version }}-${{ matrix.extension }}-${{ matrix.php-version }}-${{ matrix.dbal-version }}-coverage"
327331
path: "coverage*.xml"
@@ -378,7 +382,7 @@ jobs:
378382
fetch-depth: 2
379383

380384
- name: "Download coverage files"
381-
uses: "actions/download-artifact@v5"
385+
uses: "actions/download-artifact@v6"
382386
with:
383387
path: "reports"
384388

.github/workflows/documentation.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ on:
1717
jobs:
1818
documentation:
1919
name: "Documentation"
20-
uses: "doctrine/.github/.github/workflows/documentation.yml@8.0.0"
20+
uses: "doctrine/.github/.github/workflows/documentation.yml@12.1.0"

.github/workflows/release-on-milestone-closed.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77

88
jobs:
99
release:
10-
uses: "doctrine/.github/.github/workflows/release-on-milestone-closed.yml@8.0.0"
10+
uses: "doctrine/.github/.github/workflows/release-on-milestone-closed.yml@12.1.0"
1111
secrets:
1212
GIT_AUTHOR_EMAIL: ${{ secrets.GIT_AUTHOR_EMAIL }}
1313
GIT_AUTHOR_NAME: ${{ secrets.GIT_AUTHOR_NAME }}

composer.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
{"name": "Jonathan Wage", "email": "[email protected]"},
1313
{"name": "Marco Pivetta", "email": "[email protected]"}
1414
],
15+
"scripts": {
16+
"docs": "composer --working-dir docs update && ./docs/vendor/bin/build-docs.sh @additional_args"
17+
},
1518
"config": {
1619
"allow-plugins": {
1720
"composer/package-versions-deprecated": true,

docs/.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
composer.lock
22
vendor/
3-
build/
3+
output/

docs/Makefile

Lines changed: 0 additions & 24 deletions
This file was deleted.

docs/README.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,15 @@ The documentation is written in [ReStructured Text](https://docutils.sourceforge
44

55
## How to Generate:
66

7-
In the `docs/` folder, run
7+
In the project root, run
88

9-
composer update
9+
composer docs
1010

11-
Then compile the documentation with:
12-
13-
make html
14-
15-
This will generate the documentation into the `build` subdirectory.
11+
This will generate the documentation into the `docs/output` subdirectory.
1612

1713
To browse the documentation, you need to run a webserver:
1814

19-
cd build/html
15+
cd docs/output
2016
php -S localhost:8000
2117

2218
Now the documentation is available at [http://localhost:8000](http://localhost:8000).

docs/composer.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
"description": "Documentation for the Object-Relational Mapper\"",
44
"type": "library",
55
"license": "MIT",
6-
"require": {
7-
"phpdocumentor/guides-cli": "1.7.1",
8-
"phpdocumentor/filesystem": "1.7.1"
6+
"require-dev": {
7+
"doctrine/docs-builder": "^1.0"
98
}
109
}

docs/en/cookbook/dql-custom-walkers.rst

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,16 @@ The ``Paginate::count(Query $query)`` looks like:
101101
{
102102
static public function count(Query $query)
103103
{
104-
/** @var Query $countQuery */
105-
$countQuery = clone $query;
104+
/*
105+
To avoid changing the $query passed into the method and to make sure a possibly existing
106+
ResultSetMapping is discarded, we create a new query object any copy relevant data over.
107+
*/
108+
$countQuery = new Query($query->getEntityManager());
109+
$countQuery->setDQL($query->getDQL());
110+
$countQuery->setParameters(clone $query->getParameters());
111+
foreach ($query->getHints() as $name => $value) {
112+
$countQuery->setHint($name, $value);
113+
}
106114
107115
$countQuery->setHint(Query::HINT_CUSTOM_TREE_WALKERS, array('DoctrineExtensions\Paginate\CountSqlWalker'));
108116
$countQuery->setFirstResult(null)->setMaxResults(null);
@@ -111,7 +119,7 @@ The ``Paginate::count(Query $query)`` looks like:
111119
}
112120
}
113121
114-
It clones the query, resets the limit clause first and max results
122+
This resets the limit clause first and max results
115123
and registers the ``CountSqlWalker`` custom tree walker which
116124
will modify the AST to execute a count query. The walkers
117125
implementation is:

0 commit comments

Comments
 (0)