Skip to content

Commit

Permalink
Merge branch '2.14.x' into 2.15.x
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
derrabus committed Feb 28, 2023
2 parents fa4b945 + a28e2d8 commit 3ae6e8d
Show file tree
Hide file tree
Showing 16 changed files with 825 additions and 678 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ vendor/
/tests/Doctrine/Performance/history.db
/.phpcs-cache
composer.lock
.phpunit.cache
.phpunit.result.cache
/*.phpunit.xml
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@
"doctrine/annotations": "^1.13 || ^2",
"doctrine/coding-standard": "^9.0.2 || ^11.0",
"phpbench/phpbench": "^0.16.10 || ^1.0",
"phpstan/phpstan": "~1.4.10 || 1.9.14",
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.5.28",
"phpstan/phpstan": "~1.4.10 || 1.10.3",
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.6",
"psr/log": "^1 || ^2 || ^3",
"squizlabs/php_codesniffer": "3.7.1",
"squizlabs/php_codesniffer": "3.7.2",
"symfony/cache": "^4.4 || ^5.4 || ^6.0",
"symfony/var-exporter": "^4.4 || ^5.4 || ^6.2",
"symfony/yaml": "^3.4 || ^4.0 || ^5.0 || ^6.0",
"vimeo/psalm": "4.30.0 || 5.6.0"
"vimeo/psalm": "4.30.0 || 5.7.7"
},
"conflict": {
"doctrine/annotations": "<1.13 || >= 3.0"
Expand Down
2 changes: 1 addition & 1 deletion docs/en/cookbook/working-with-datetime.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ these comparisons are always made **BY REFERENCE**. That means the following cha
#[Entity]
class Article
{
#[Column(type='datetime')]
#[Column(type: 'datetime')]
private DateTime $updated;
public function setUpdated(): void
Expand Down
16 changes: 8 additions & 8 deletions docs/en/reference/association-mapping.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1386,6 +1386,14 @@ Is essentially the same as following:

.. configuration-block::

.. code-block:: attribute
<?php
/** One Product has One Shipment. */
#[OneToOne(targetEntity: Shipment::class)]
#[JoinColumn(name: 'shipment_id', referencedColumnName: 'id', nullable: false)]
private Shipment $shipment;
.. code-block:: annotation
<?php
Expand All @@ -1396,14 +1404,6 @@ Is essentially the same as following:
*/
private Shipment $shipment;
.. code-block:: attribute
<?php
/** One Product has One Shipment. */
#[OneToOne(targetEntity: Shipment::class)]
#[JoinColumn(name: 'shipment_id', referencedColumnName: 'id', nullable: false)]
private Shipment $shipment;
.. code-block:: xml
<doctrine-mapping>
Expand Down
2 changes: 1 addition & 1 deletion docs/en/reference/faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ upon insert:
private string $algorithm = "sha1";
/** @var self::STATUS_* */
private int $status = self:STATUS_DISABLED;
private int $status = self::STATUS_DISABLED;
}
.
Expand Down
13 changes: 13 additions & 0 deletions docs/en/reference/inheritance-mapping.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,19 @@ need not have an ``#[Id]`` property.
For further support of inheritance, the single or
joined table inheritance features have to be used.

.. warning::

At least when using attributes or annotations to specify your mapping,
it _seems_ as if you could inherit from a base class that is neither
an entity nor a mapped superclass, but has properties with mapping configuration
on them that would also be used in the inheriting class.

This, however, is due to how the corresponding mapping
drivers work and what the PHP reflection API reports for inherited fields.

Such a configuration is explicitly not supported. To give just one example,
it will break for ``private`` properties.

.. note::

You may be tempted to use traits to mix mapped fields or relationships
Expand Down
Loading

0 comments on commit 3ae6e8d

Please sign in to comment.