Skip to content

Commit 2d5d129

Browse files
committed
Merge branch '3.6.x' into 4.0.x
* 3.6.x: Fix missing import Remove calls to getMockForAbstractClass() (doctrine#12003) Add a CI job that fails on deprecations (doctrine#12188) use the empty string instead of null as an array offset (doctrine#12181) Upgrade to doctrine/coding-standard 14 Bump doctrine/.github from 7.3.0 to 8.0.0 do not call setAccessible() on PHP >= 8.1 (doctrine#12182) Fix docs on final entities (doctrine#12176) Remove Database and Model First chapters that said little of value. Switch to IgnoreDeprecations Fix php doc for getPropertyAccessors method (doctrine#12159) docs: consistent PostgreSQL's name case docs: generation strategies differences between DBAL 3 and 4 Check extra condition to decide if a test was skipped Use PHPUnit 11 when possible Migrate away from annotations in tests Migrate away from assertStringNotMatchesFormat() Migrate to willReturn() Migrate away from getMockForAbstractClass() Fix `IN`/`NOT IN` expression handling and support enums when matching on to-many-collections
2 parents cdc52b2 + 28dd327 commit 2d5d129

Some content is hidden

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

44 files changed

+536
-295
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@7.3.0"
27+
uses: "doctrine/.github/.github/workflows/coding-standards.yml@8.0.0"

.github/workflows/continuous-integration.yml

Lines changed: 68 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,24 @@ jobs:
103103
env:
104104
ENABLE_SECOND_LEVEL_CACHE: 0
105105

106-
- name: "Run PHPUnit with Second Level Cache"
107-
run: "vendor/bin/phpunit -c ci/github/phpunit/${{ matrix.extension }}.xml --exclude-group performance,non-cacheable,locking_functional --coverage-clover=coverage-cache.xml"
106+
- name: "Run PHPUnit with Second Level Cache and PHPUnit 10"
107+
run: |
108+
vendor/bin/phpunit -c ci/github/phpunit/${{ matrix.extension }}.xml \
109+
--exclude-group=performance,non-cacheable,locking_functional \
110+
--coverage-clover=coverage-cache.xml
111+
if: "${{ matrix.php-version == '8.1' }}"
112+
env:
113+
ENABLE_SECOND_LEVEL_CACHE: 1
114+
ENABLE_NATIVE_LAZY_OBJECTS: ${{ matrix.native_lazy }}
115+
116+
- name: "Run PHPUnit with Second Level Cache and PHPUnit 11+"
117+
run: |
118+
vendor/bin/phpunit -c ci/github/phpunit/${{ matrix.extension }}.xml \
119+
--exclude-group=performance \
120+
--exclude-group=non-cacheable \
121+
--exclude-group=locking_functional \
122+
--coverage-clover=coverage-cache.xml
123+
if: "${{ matrix.php-version != '8.1' }}"
108124
env:
109125
ENABLE_SECOND_LEVEL_CACHE: 1
110126

@@ -115,6 +131,40 @@ jobs:
115131
path: "coverage*.xml"
116132

117133

134+
phpunit-deprecations:
135+
name: "PHPUnit (fail on deprecations)"
136+
runs-on: "ubuntu-24.04"
137+
138+
steps:
139+
- name: "Checkout"
140+
uses: "actions/checkout@v5"
141+
with:
142+
fetch-depth: 2
143+
144+
- name: "Install PHP"
145+
uses: "shivammathur/setup-php@v2"
146+
with:
147+
php-version: "8.5"
148+
extensions: "apcu, pdo, sqlite3"
149+
coverage: "pcov"
150+
ini-values: "zend.assertions=1, apc.enable_cli=1"
151+
152+
- name: "Allow dev dependencies"
153+
run: composer config minimum-stability dev
154+
155+
- name: "Install dependencies with Composer"
156+
uses: "ramsey/composer-install@v3"
157+
with:
158+
composer-options: "--ignore-platform-req=php+"
159+
dependency-versions: "highest"
160+
161+
- name: "Run PHPUnit"
162+
run: "vendor/bin/phpunit -c ci/github/phpunit/sqlite3.xml --fail-on-deprecation"
163+
env:
164+
ENABLE_SECOND_LEVEL_CACHE: 0
165+
ENABLE_NATIVE_LAZY_OBJECTS: 1
166+
167+
118168
phpunit-postgres:
119169
name: "PHPUnit with PostgreSQL"
120170
runs-on: "ubuntu-22.04"
@@ -317,8 +367,22 @@ jobs:
317367
env:
318368
ENABLE_SECOND_LEVEL_CACHE: 0
319369

320-
- name: "Run PHPUnit with Second Level Cache"
321-
run: "vendor/bin/phpunit -c ci/github/phpunit/${{ matrix.extension }}.xml --exclude-group performance,non-cacheable,locking_functional --coverage-clover=coverage-no-cache.xml"
370+
- name: "Run PHPUnit with Second Level Cache and PHPUnit 10"
371+
run: |
372+
vendor/bin/phpunit -c ci/github/phpunit/${{ matrix.extension }}.xml \
373+
--exclude-group=performance,non-cacheable,locking_functional \
374+
--coverage-clover=coverage-no-cache.xml"
375+
if: "${{ matrix.php-version == '8.1' }}"
376+
env:
377+
ENABLE_SECOND_LEVEL_CACHE: 1
378+
- name: "Run PHPUnit with Second Level Cache and PHPUnit 11+"
379+
run: |
380+
vendor/bin/phpunit -c ci/github/phpunit/${{ matrix.extension }}.xml \
381+
--exclude-group=performance \
382+
--exclude-group=non-cacheable \
383+
--exclude-group=locking_functional \
384+
--coverage-clover=coverage-no-cache.xml
385+
if: "${{ matrix.php-version != '8.1' }}"
322386
env:
323387
ENABLE_SECOND_LEVEL_CACHE: 1
324388

.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@7.3.0"
20+
uses: "doctrine/.github/.github/workflows/documentation.yml@8.0.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@7.3.0"
10+
uses: "doctrine/.github/.github/workflows/release-on-milestone-closed.yml@8.0.0"
1111
secrets:
1212
GIT_AUTHOR_EMAIL: ${{ secrets.GIT_AUTHOR_EMAIL }}
1313
GIT_AUTHOR_NAME: ${{ secrets.GIT_AUTHOR_NAME }}

composer.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,14 @@
3636
"symfony/console": "^5.4 || ^6.0 || ^7.0 || ^8.0"
3737
},
3838
"require-dev": {
39-
"doctrine/coding-standard": "^13.0",
39+
"doctrine/coding-standard": "^14.0",
4040
"phpbench/phpbench": "^1.0",
4141
"phpdocumentor/guides-cli": "^1.4",
4242
"phpstan/extension-installer": "^1.4",
4343
"phpstan/phpstan": "2.1.22",
4444
"phpstan/phpstan-deprecation-rules": "^2",
45-
"phpunit/phpunit": "^10.4.0",
45+
"phpunit/phpunit": "^10.5.0 || ^11.5",
4646
"psr/log": "^1 || ^2 || ^3",
47-
"squizlabs/php_codesniffer": "3.13.2",
4847
"symfony/cache": "^5.4 || ^6.2 || ^7.0 || ^8.0",
4948
"symfony/var-exporter": "^6.3.9 || ^7.0 || ^8.0"
5049
},

docs/en/reference/architecture.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,9 @@ Entities
7979
An entity is a lightweight, persistent domain object. An entity can
8080
be any regular PHP class observing the following restrictions:
8181

82-
- An entity class must not be final nor read-only but
83-
it may contain final methods or read-only properties.
82+
- An entity class can be final or read-only when
83+
you use :ref:`native lazy objects <reference-native-lazy-objects>`.
84+
It may contain final methods or read-only properties too.
8485
- Any two entity classes in a class hierarchy that inherit
8586
directly or indirectly from one another must not have a mapped
8687
property with the same name. That is, if B inherits from A then B

docs/en/reference/basic-mapping.rst

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -389,17 +389,19 @@ Here is the list of possible generation strategies:
389389

390390
- ``AUTO`` (default): Tells Doctrine to pick the strategy that is
391391
preferred by the used database platform. The preferred strategies
392-
are ``IDENTITY`` for MySQL, SQLite, MsSQL and SQL Anywhere and, for
393-
historical reasons, ``SEQUENCE`` for Oracle and PostgreSQL. This
394-
strategy provides full portability.
392+
are ``IDENTITY`` for MySQL, SQLite, MsSQL, SQL Anywhere and
393+
PostgreSQL (on DBAL 4) and, for historical reasons, ``SEQUENCE``
394+
for Oracle and PostgreSQL (on DBAL 3). This strategy provides
395+
full portability.
395396
- ``IDENTITY``: Tells Doctrine to use special identity columns in
396397
the database that generate a value on insertion of a row. This
397398
strategy does currently not provide full portability and is
398399
supported by the following platforms: MySQL/SQLite/SQL Anywhere
399-
(``AUTO_INCREMENT``), MSSQL (``IDENTITY``) and PostgreSQL (``SERIAL``).
400+
(``AUTO_INCREMENT``), MSSQL (``IDENTITY``) and PostgreSQL (``SERIAL``
401+
on DBAL 3, ``GENERATED BY DEFAULT AS IDENTITY`` on DBAL 4).
400402
- ``SEQUENCE``: Tells Doctrine to use a database sequence for ID
401403
generation. This strategy does currently not provide full
402-
portability. Sequences are supported by Oracle, PostgreSql and
404+
portability. Sequences are supported by Oracle, PostgreSQL and
403405
SQL Anywhere.
404406
- ``NONE``: Tells Doctrine that the identifiers are assigned (and
405407
thus generated) by your code. The assignment must take place before

docs/en/sidebar.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
:depth: 3
66

77
tutorials/getting-started
8-
tutorials/getting-started-database
9-
tutorials/getting-started-models
108
tutorials/working-with-indexed-associations
119
tutorials/extra-lazy-associations
1210
tutorials/composite-primary-keys

docs/en/tutorials/getting-started-database.rst

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

docs/en/tutorials/getting-started-models.rst

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

0 commit comments

Comments
 (0)