Skip to content

Commit 1220edf

Browse files
authored
Merge pull request #12241 from greg0ire/3.5.x
Merge 2.20.x up into 3.5.x
2 parents 4f36f01 + 7e4693d commit 1220edf

53 files changed

Lines changed: 521 additions & 215 deletions

Some content is hidden

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

.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@10.1.0"
27+
uses: "doctrine/.github/.github/workflows/coding-standards.yml@12.1.0"

.github/workflows/continuous-integration.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ jobs:
119119
ENABLE_NATIVE_LAZY_OBJECTS: ${{ matrix.native_lazy }}
120120

121121
- name: "Upload coverage file"
122-
uses: "actions/upload-artifact@v4"
122+
uses: "actions/upload-artifact@v5"
123123
with:
124124
name: "phpunit-${{ matrix.extension }}-${{ matrix.php-version }}-${{ matrix.dbal-version }}-${{ matrix.deps }}-${{ matrix.native_lazy }}-coverage"
125125
path: "coverage*.xml"
@@ -228,7 +228,7 @@ jobs:
228228
run: "vendor/bin/phpunit -c ci/github/phpunit/pdo_pgsql.xml --coverage-clover=coverage.xml"
229229

230230
- name: "Upload coverage file"
231-
uses: "actions/upload-artifact@v4"
231+
uses: "actions/upload-artifact@v5"
232232
with:
233233
name: "${{ github.job }}-${{ matrix.postgres-version }}-${{ matrix.php-version }}-${{ matrix.dbal-version }}-${{ matrix.extension }}-coverage"
234234
path: "coverage.xml"
@@ -296,7 +296,7 @@ jobs:
296296
run: "vendor/bin/phpunit -c ci/github/phpunit/${{ matrix.extension }}.xml --coverage-clover=coverage.xml"
297297

298298
- name: "Upload coverage file"
299-
uses: "actions/upload-artifact@v4"
299+
uses: "actions/upload-artifact@v5"
300300
with:
301301
name: "${{ github.job }}-${{ matrix.mariadb-version }}-${{ matrix.extension }}-${{ matrix.php-version }}-${{ matrix.dbal-version }}-coverage"
302302
path: "coverage.xml"
@@ -393,7 +393,7 @@ jobs:
393393
ENABLE_SECOND_LEVEL_CACHE: 1
394394

395395
- name: "Upload coverage files"
396-
uses: "actions/upload-artifact@v4"
396+
uses: "actions/upload-artifact@v5"
397397
with:
398398
name: "${{ github.job }}-${{ matrix.mysql-version }}-${{ matrix.extension }}-${{ matrix.php-version }}-${{ matrix.dbal-version }}-coverage"
399399
path: "coverage*.xml"
@@ -416,7 +416,7 @@ jobs:
416416
fetch-depth: 2
417417

418418
- name: "Download coverage files"
419-
uses: "actions/download-artifact@v5"
419+
uses: "actions/download-artifact@v6"
420420
with:
421421
path: "reports"
422422

.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@10.1.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@10.1.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": "jonwage@gmail.com"},
1313
{"name": "Marco Pivetta", "email": "ocramius@gmail.com"}
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)