Skip to content

Commit 3ae6e8d

Browse files
committed
Merge branch '2.14.x' into 2.15.x
* 2.14.x: Ignore the cache dir of PHPUnit 10 (doctrine#10546) Make data providers static (doctrine#10544) Bump dev tools (doctrine#10541) Mark SqlWalker methods as not deprecated (doctrine#10540) docs: consistency order for docblock in association mapping (doctrine#10534) Correct use of PHP attribute fix typo in faq.rst (doctrine#10526) fix: use executeStatement in SchemaTool (doctrine#10516) Write a test in a more specific way Put up a warning sign that mapping may not be inherited from transient classes (doctrine#10392) Avoid unnecessary information in query hints to improve query cache hit ratio
2 parents fa4b945 + a28e2d8 commit 3ae6e8d

16 files changed

+825
-678
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,6 @@ vendor/
1515
/tests/Doctrine/Performance/history.db
1616
/.phpcs-cache
1717
composer.lock
18+
.phpunit.cache
1819
.phpunit.result.cache
1920
/*.phpunit.xml

composer.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,14 @@
4242
"doctrine/annotations": "^1.13 || ^2",
4343
"doctrine/coding-standard": "^9.0.2 || ^11.0",
4444
"phpbench/phpbench": "^0.16.10 || ^1.0",
45-
"phpstan/phpstan": "~1.4.10 || 1.9.14",
46-
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.5.28",
45+
"phpstan/phpstan": "~1.4.10 || 1.10.3",
46+
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.6",
4747
"psr/log": "^1 || ^2 || ^3",
48-
"squizlabs/php_codesniffer": "3.7.1",
48+
"squizlabs/php_codesniffer": "3.7.2",
4949
"symfony/cache": "^4.4 || ^5.4 || ^6.0",
5050
"symfony/var-exporter": "^4.4 || ^5.4 || ^6.2",
5151
"symfony/yaml": "^3.4 || ^4.0 || ^5.0 || ^6.0",
52-
"vimeo/psalm": "4.30.0 || 5.6.0"
52+
"vimeo/psalm": "4.30.0 || 5.7.7"
5353
},
5454
"conflict": {
5555
"doctrine/annotations": "<1.13 || >= 3.0"

docs/en/cookbook/working-with-datetime.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ these comparisons are always made **BY REFERENCE**. That means the following cha
2121
#[Entity]
2222
class Article
2323
{
24-
#[Column(type='datetime')]
24+
#[Column(type: 'datetime')]
2525
private DateTime $updated;
2626
2727
public function setUpdated(): void

docs/en/reference/association-mapping.rst

+8-8
Original file line numberDiff line numberDiff line change
@@ -1386,6 +1386,14 @@ Is essentially the same as following:
13861386

13871387
.. configuration-block::
13881388

1389+
.. code-block:: attribute
1390+
1391+
<?php
1392+
/** One Product has One Shipment. */
1393+
#[OneToOne(targetEntity: Shipment::class)]
1394+
#[JoinColumn(name: 'shipment_id', referencedColumnName: 'id', nullable: false)]
1395+
private Shipment $shipment;
1396+
13891397
.. code-block:: annotation
13901398
13911399
<?php
@@ -1396,14 +1404,6 @@ Is essentially the same as following:
13961404
*/
13971405
private Shipment $shipment;
13981406
1399-
.. code-block:: attribute
1400-
1401-
<?php
1402-
/** One Product has One Shipment. */
1403-
#[OneToOne(targetEntity: Shipment::class)]
1404-
#[JoinColumn(name: 'shipment_id', referencedColumnName: 'id', nullable: false)]
1405-
private Shipment $shipment;
1406-
14071407
.. code-block:: xml
14081408
14091409
<doctrine-mapping>

docs/en/reference/faq.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ upon insert:
3838
3939
private string $algorithm = "sha1";
4040
/** @var self::STATUS_* */
41-
private int $status = self:STATUS_DISABLED;
41+
private int $status = self::STATUS_DISABLED;
4242
}
4343
4444
.

docs/en/reference/inheritance-mapping.rst

+13
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,19 @@ need not have an ``#[Id]`` property.
3232
For further support of inheritance, the single or
3333
joined table inheritance features have to be used.
3434

35+
.. warning::
36+
37+
At least when using attributes or annotations to specify your mapping,
38+
it _seems_ as if you could inherit from a base class that is neither
39+
an entity nor a mapped superclass, but has properties with mapping configuration
40+
on them that would also be used in the inheriting class.
41+
42+
This, however, is due to how the corresponding mapping
43+
drivers work and what the PHP reflection API reports for inherited fields.
44+
45+
Such a configuration is explicitly not supported. To give just one example,
46+
it will break for ``private`` properties.
47+
3548
.. note::
3649

3750
You may be tempted to use traits to mix mapped fields or relationships

0 commit comments

Comments
 (0)