Skip to content

Commit 1d218ba

Browse files
authored
Make docs valid according to guides 0.3.3 (#11252)
1 parent 40fbbf4 commit 1d218ba

File tree

6 files changed

+46
-48
lines changed

6 files changed

+46
-48
lines changed

.github/workflows/documentation.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,5 @@ jobs:
4040
with:
4141
dependency-versions: "highest"
4242

43-
- name: "Add dummy title to the sidebar"
44-
run: |
45-
printf '%s\n%s\n\n%s\n' "Dummy title" "===========" "$(cat docs/en/sidebar.rst)" > docs/en/sidebar.rst
46-
4743
- name: "Run guides-cli"
48-
run: "vendor/bin/guides -vvv --no-progress docs/en 2>&1 | grep -v 'Unknown directive' | ( ! grep WARNING )"
44+
run: "vendor/bin/guides -vvv --no-progress docs/en 2>&1 | grep -v 'No template found for rendering directive' | ( ! grep WARNING )"

docs/en/reference/basic-mapping.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ Here is the list of possible generation strategies:
462462
a new entity is passed to ``EntityManager#persist``. NONE is the
463463
same as leaving off the ``#[GeneratedValue]`` entirely.
464464
- ``CUSTOM``: With this option, you can use the ``#[CustomIdGenerator]`` attribute.
465-
It will allow you to pass a :ref:`class of your own to generate the identifiers.<annref_customidgenerator>`
465+
It will allow you to pass a :ref:`class of your own to generate the identifiers. <annref_customidgenerator>`
466466

467467
Sequence Generator
468468
^^^^^^^^^^^^^^^^^^

docs/en/reference/events.rst

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -131,47 +131,47 @@ There are two ways to set up an event handler:
131131
* For *all events* you can create a Lifecycle Event Listener or Subscriber class and register
132132
it by calling ``$eventManager->addEventListener()`` or ``eventManager->addEventSubscriber()``,
133133
see
134-
:ref:`Listening and subscribing to Lifecycle Events<listening-and-subscribing-to-lifecycle-events>`
134+
:ref:`Listening and subscribing to Lifecycle Events <listening-and-subscribing-to-lifecycle-events>`
135135
* For *some events* (see table below), you can create a *Lifecycle Callback* method in the
136-
entity, see :ref:`Lifecycle Callbacks<lifecycle-callbacks>`.
136+
entity, see :ref:`Lifecycle Callbacks <lifecycle-callbacks>`.
137137

138138
.. _reference-events-lifecycle-events:
139139

140140
Events Overview
141141
---------------
142142

143-
+-----------------------------------------------------------------+-----------------------+-----------+-------------------------------------+
144-
| Event | Dispatched by | Lifecycle | Passed |
145-
| | | Callback | Argument |
146-
+=================================================================+=======================+===========+=====================================+
147-
| :ref:`preRemove<reference-events-pre-remove>` | ``$em->remove()`` | Yes | `PreRemoveEventArgs`_ |
148-
+-----------------------------------------------------------------+-----------------------+-----------+-------------------------------------+
149-
| :ref:`postRemove<reference-events-post-update-remove-persist>` | ``$em->flush()`` | Yes | `PostRemoveEventArgs`_ |
150-
+-----------------------------------------------------------------+-----------------------+-----------+-------------------------------------+
151-
| :ref:`prePersist<reference-events-pre-persist>` | ``$em->persist()`` | Yes | `PrePersistEventArgs`_ |
152-
| | on *initial* persist | | |
153-
+-----------------------------------------------------------------+-----------------------+-----------+-------------------------------------+
154-
| :ref:`postPersist<reference-events-post-update-remove-persist>` | ``$em->flush()`` | Yes | `PostPersistEventArgs`_ |
155-
+-----------------------------------------------------------------+-----------------------+-----------+-------------------------------------+
156-
| :ref:`preUpdate<reference-events-pre-update>` | ``$em->flush()`` | Yes | `PreUpdateEventArgs`_ |
157-
+-----------------------------------------------------------------+-----------------------+-----------+-------------------------------------+
158-
| :ref:`postUpdate<reference-events-post-update-remove-persist>` | ``$em->flush()`` | Yes | `PostUpdateEventArgs`_ |
159-
+-----------------------------------------------------------------+-----------------------+-----------+-------------------------------------+
160-
| :ref:`postLoad<reference-events-post-load>` | Loading from database | Yes | `PostLoadEventArgs`_ |
161-
+-----------------------------------------------------------------+-----------------------+-----------+-------------------------------------+
162-
| :ref:`loadClassMetadata<reference-events-load-class-metadata>` | Loading of mapping | No | `LoadClassMetadataEventArgs`_ |
163-
| | metadata | | |
164-
+-----------------------------------------------------------------+-----------------------+-----------+-------------------------------------+
165-
| ``onClassMetadataNotFound`` | ``MappingException`` | No | `OnClassMetadataNotFoundEventArgs`_ |
166-
+-----------------------------------------------------------------+-----------------------+-----------+-------------------------------------+
167-
| :ref:`preFlush<reference-events-pre-flush>` | ``$em->flush()`` | Yes | `PreFlushEventArgs`_ |
168-
+-----------------------------------------------------------------+-----------------------+-----------+-------------------------------------+
169-
| :ref:`onFlush<reference-events-on-flush>` | ``$em->flush()`` | No | `OnFlushEventArgs`_ |
170-
+-----------------------------------------------------------------+-----------------------+-----------+-------------------------------------+
171-
| :ref:`postFlush<reference-events-post-flush>` | ``$em->flush()`` | No | `PostFlushEventArgs`_ |
172-
+-----------------------------------------------------------------+-----------------------+-----------+-------------------------------------+
173-
| :ref:`onClear<reference-events-on-clear>` | ``$em->clear()`` | No | `OnClearEventArgs`_ |
174-
+-----------------------------------------------------------------+-----------------------+-----------+-------------------------------------+
143+
+------------------------------------------------------------------+-----------------------+-----------+-------------------------------------+
144+
| Event | Dispatched by | Lifecycle | Passed |
145+
| | | Callback | Argument |
146+
+==================================================================+=======================+===========+=====================================+
147+
| :ref:`preRemove <reference-events-pre-remove>` | ``$em->remove()`` | Yes | `PreRemoveEventArgs`_ |
148+
+------------------------------------------------------------------+-----------------------+-----------+-------------------------------------+
149+
| :ref:`postRemove <reference-events-post-update-remove-persist>` | ``$em->flush()`` | Yes | `PostRemoveEventArgs`_ |
150+
+------------------------------------------------------------------+-----------------------+-----------+-------------------------------------+
151+
| :ref:`prePersist <reference-events-pre-persist>` | ``$em->persist()`` | Yes | `PrePersistEventArgs`_ |
152+
| | on *initial* persist | | |
153+
+------------------------------------------------------------------+-----------------------+-----------+-------------------------------------+
154+
| :ref:`postPersist <reference-events-post-update-remove-persist>` | ``$em->flush()`` | Yes | `PostPersistEventArgs`_ |
155+
+------------------------------------------------------------------+-----------------------+-----------+-------------------------------------+
156+
| :ref:`preUpdate <reference-events-pre-update>` | ``$em->flush()`` | Yes | `PreUpdateEventArgs`_ |
157+
+------------------------------------------------------------------+-----------------------+-----------+-------------------------------------+
158+
| :ref:`postUpdate <reference-events-post-update-remove-persist>` | ``$em->flush()`` | Yes | `PostUpdateEventArgs`_ |
159+
+------------------------------------------------------------------+-----------------------+-----------+-------------------------------------+
160+
| :ref:`postLoad <reference-events-post-load>` | Loading from database | Yes | `PostLoadEventArgs`_ |
161+
+------------------------------------------------------------------+-----------------------+-----------+-------------------------------------+
162+
| :ref:`loadClassMetadata <reference-events-load-class-metadata>` | Loading of mapping | No | `LoadClassMetadataEventArgs`_ |
163+
| | metadata | | |
164+
+------------------------------------------------------------------+-----------------------+-----------+-------------------------------------+
165+
| ``onClassMetadataNotFound`` | ``MappingException`` | No | `OnClassMetadataNotFoundEventArgs`_ |
166+
+------------------------------------------------------------------+-----------------------+-----------+-------------------------------------+
167+
| :ref:`preFlush <reference-events-pre-flush>` | ``$em->flush()`` | Yes | `PreFlushEventArgs`_ |
168+
+------------------------------------------------------------------+-----------------------+-----------+-------------------------------------+
169+
| :ref:`onFlush <reference-events-on-flush>` | ``$em->flush()`` | No | `OnFlushEventArgs`_ |
170+
+------------------------------------------------------------------+-----------------------+-----------+-------------------------------------+
171+
| :ref:`postFlush <reference-events-post-flush>` | ``$em->flush()`` | No | `PostFlushEventArgs`_ |
172+
+------------------------------------------------------------------+-----------------------+-----------+-------------------------------------+
173+
| :ref:`onClear <reference-events-on-clear>` | ``$em->clear()`` | No | `OnClearEventArgs`_ |
174+
+------------------------------------------------------------------+-----------------------+-----------+-------------------------------------+
175175

176176
.. warning::
177177

@@ -358,7 +358,7 @@ behaviors across different entity classes.
358358

359359
Note that they require much more detailed knowledge about the inner
360360
workings of the ``EntityManager`` and ``UnitOfWork`` classes. Please
361-
read the :ref:`Implementing Event Listeners<reference-events-implementing-listeners>` section
361+
read the :ref:`Implementing Event Listeners <reference-events-implementing-listeners>` section
362362
carefully if you are trying to write your own listener.
363363

364364
For event subscribers, there are no surprises. They declare the
@@ -471,11 +471,11 @@ prePersist
471471
There are two ways for the ``prePersist`` event to be triggered:
472472

473473
- One is when you call ``EntityManager::persist()``. The
474-
event is also called for all :ref:`cascaded associations<transitive-persistence>`.
474+
event is also called for all :ref:`cascaded associations <transitive-persistence>`.
475475
- The other is inside the ``flush()`` method when changes to associations are computed and
476-
this association is marked as :ref:`cascade: persist<transitive-persistence>`. Any new entity found
476+
this association is marked as :ref:`cascade: persist <transitive-persistence>`. Any new entity found
477477
during this operation is also persisted and ``prePersist`` called
478-
on it. This is called :ref:`persistence by reachability<persistence-by-reachability>`.
478+
on it. This is called :ref:`persistence by reachability <persistence-by-reachability>`.
479479

480480
In both cases you get passed a ``PrePersistEventArgs`` instance
481481
which has access to the entity and the entity manager.
@@ -499,7 +499,7 @@ preRemove
499499

500500
The ``preRemove`` event is called on every entity immediately when it is passed
501501
to the ``EntityManager::remove()`` method. It is cascaded for all
502-
associations that are marked as :ref:`cascade: remove<transitive-persistence>`
502+
associations that are marked as :ref:`cascade: remove <transitive-persistence>`
503503

504504
It is not called for a DQL ``DELETE`` statement.
505505

@@ -547,7 +547,7 @@ entities and their associations have been computed. This means, the
547547
- Collections scheduled for removal
548548

549549
To make use of the ``onFlush`` event you have to be familiar with the
550-
internal :ref:`UnitOfWork<unit-of-work>` API, which grants you access to the previously
550+
internal :ref:`UnitOfWork <unit-of-work>` API, which grants you access to the previously
551551
mentioned sets. See this example:
552552

553553
.. code-block:: php

docs/en/reference/faq.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ The many-to-many association is only supporting foreign keys in the table defini
101101
To work with many-to-many tables containing extra columns you have to use the
102102
foreign keys as primary keys feature of Doctrine ORM.
103103

104-
See :doc:`the tutorial on composite primary keys for more information<../tutorials/composite-primary-keys>`.
104+
See :doc:`the tutorial on composite primary keys for more information <../tutorials/composite-primary-keys>`.
105105

106106

107107
How can i paginate fetch-joined collections?

docs/en/reference/inheritance-mapping.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ It is not supported to use overrides in entity inheritance scenarios.
380380
.. note::
381381
382382
When using traits, make sure not to miss the warnings given in the
383-
:doc:`Limitations and Known Issues</reference/limitations-and-known-issues>` chapter.
383+
:doc:`Limitations and Known Issues </reference/limitations-and-known-issues>` chapter.
384384
385385
386386
Association Override

docs/en/sidebar.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
:orphan:
2+
13
.. toc::
24

35
.. tocheader:: Tutorials

0 commit comments

Comments
 (0)