Skip to content

Commit

Permalink
Merge branch '2.16.x' into 2.17.x
Browse files Browse the repository at this point in the history
* 2.16.x:
  Use required classes for Lifecycle Callback examples (#10916)
  Add space before backquote (#10918)
  Add back throws annotation to getSingleScalarResult (#10907)
  Fix link on known issues docs (#10904)
  • Loading branch information
derrabus committed Aug 23, 2023
2 parents 9647d0e + bb55240 commit b6441b4
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ for all our domain objects.
.. note::

The notify change tracking policy is deprecated and will be removed in ORM 3.0.
(`Details <https://github.com/doctrine/orm/issues/8383>`_)
(\ `Details <https://github.com/doctrine/orm/issues/8383>`_)

Implementing NotifyPropertyChanged
----------------------------------
Expand Down
4 changes: 4 additions & 0 deletions docs/en/cookbook/validation-of-entities.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ First Attributes:
.. code-block:: php
<?php
use Doctrine\ORM\Mapping\Entity;
use Doctrine\ORM\Mapping\HasLifecycleCallbacks;
use Doctrine\ORM\Mapping\PrePersist;
use Doctrine\ORM\Mapping\PreUpdate;
#[Entity]
#[HasLifecycleCallbacks]
Expand Down
2 changes: 1 addition & 1 deletion docs/en/reference/change-tracking-policies.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Notify
.. note::

The notify change tracking policy is deprecated and will be removed in ORM 3.0.
(`Details <https://github.com/doctrine/orm/issues/8383>`_)
(\ `Details <https://github.com/doctrine/orm/issues/8383>`_)

This policy is based on the assumption that the entities notify
interested listeners of changes to their properties. For that
Expand Down
2 changes: 1 addition & 1 deletion docs/en/reference/dql-doctrine-query-language.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1425,7 +1425,7 @@ userland:
reloading this data. Partially loaded objects have to be passed to
``EntityManager::refresh()`` if they are to be reloaded fully from
the database. This query hint is deprecated and will be removed
in the future (`Details <https://github.com/doctrine/orm/issues/8471>`_)
in the future (\ `Details <https://github.com/doctrine/orm/issues/8471>`_)
- ``Query::HINT_REFRESH`` - This query is used internally by
``EntityManager::refresh()`` and can be used in userland as well.
If you specify this hint and a query returns the data for an entity
Expand Down
4 changes: 4 additions & 0 deletions docs/en/reference/events.rst
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,10 @@ specific to a particular entity class's lifecycle.
<?php
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Event\PrePersistEventArgs;
use Doctrine\ORM\Mapping\Entity;
use Doctrine\ORM\Mapping\HasLifecycleCallbacks;
use Doctrine\ORM\Mapping\PrePersist;
use Doctrine\ORM\Mapping\PreUpdate;
#[Entity]
#[HasLifecycleCallbacks]
Expand Down
2 changes: 1 addition & 1 deletion docs/en/reference/limitations-and-known-issues.rst
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ have produced, this is probably fine.

However, to mention known limitations, it is currently not possible to use "class"
level `annotations <https://github.com/doctrine/orm/pull/1517>`_ or
`attributes <https://github.com/doctrine/orm/issues/8868>` on traits, and attempts to
`attributes <https://github.com/doctrine/orm/issues/8868>`_ on traits, and attempts to
improve parser support for traits as `here <https://github.com/doctrine/annotations/pull/102>`_
or `there <https://github.com/doctrine/annotations/pull/63>`_ have been abandoned
due to complexity.
Expand Down
2 changes: 1 addition & 1 deletion docs/en/reference/partial-objects.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Partial Objects

Creating Partial Objects through DQL is deprecated and
will be removed in the future, use data transfer object
support in DQL instead. (`Details
support in DQL instead. (\ `Details
<https://github.com/doctrine/orm/issues/8471>`_)

A partial object is an object whose state is not fully initialized
Expand Down
2 changes: 1 addition & 1 deletion docs/en/reference/unitofwork.rst
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ optimize the performance of the Flush Operation:
.. note::

Flush only a single entity with ``$entityManager->flush($entity)`` is deprecated and will be removed in ORM 3.0.
(`Details <https://github.com/doctrine/orm/issues/8459>`_)
(\ `Details <https://github.com/doctrine/orm/issues/8459>`_)

Query Internals
---------------
Expand Down
4 changes: 2 additions & 2 deletions docs/en/tutorials/getting-started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ before. There are some prerequisites for the tutorial that have to be
installed:

- PHP (latest stable version)
- Composer Package Manager (`Install Composer
- Composer Package Manager (\ `Install Composer
<https://getcomposer.org/doc/00-intro.md>`_)

The code of this tutorial is `available on Github <https://github.com/doctrine/doctrine2-orm-tutorial>`_.
Expand Down Expand Up @@ -321,7 +321,7 @@ data in your storage, and later in your application when the data is loaded agai
.. note::

This method, although very common, is inappropriate for Domain Driven
Design (`DDD <https://en.wikipedia.org/wiki/Domain-driven_design>`_)
Design (\ `DDD <https://en.wikipedia.org/wiki/Domain-driven_design>`_)
where methods should represent real business operations and not simple
property change, And business invariants should be maintained both in the
application state (entities in this case) and in the database, with no
Expand Down
1 change: 1 addition & 0 deletions lib/Doctrine/ORM/AbstractQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -1012,6 +1012,7 @@ public function getSingleResult($hydrationMode = null)
*
* @return bool|float|int|string|null The scalar result.
*
* @throws NoResultException If the query returned no result.
* @throws NonUniqueResultException If the query result is not unique.
*/
public function getSingleScalarResult()
Expand Down

0 comments on commit b6441b4

Please sign in to comment.