diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 58c53f5ae38..f0bbf5b9e2a 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -40,9 +40,5 @@ jobs: with: dependency-versions: "highest" - - name: "Add dummy title to the sidebar" - run: | - printf '%s\n%s\n\n%s\n' "Dummy title" "===========" "$(cat docs/en/sidebar.rst)" > docs/en/sidebar.rst - - name: "Run guides-cli" - run: "vendor/bin/guides -vvv --no-progress docs/en 2>&1 | grep -v 'Unknown directive' | ( ! grep WARNING )" + run: "vendor/bin/guides -vvv --no-progress docs/en 2>&1 | grep -v 'No template found for rendering directive' | ( ! grep WARNING )" diff --git a/docs/en/reference/basic-mapping.rst b/docs/en/reference/basic-mapping.rst index 66b552a1d87..a61e5d8d0e4 100644 --- a/docs/en/reference/basic-mapping.rst +++ b/docs/en/reference/basic-mapping.rst @@ -462,7 +462,7 @@ Here is the list of possible generation strategies: a new entity is passed to ``EntityManager#persist``. NONE is the same as leaving off the ``#[GeneratedValue]`` entirely. - ``CUSTOM``: With this option, you can use the ``#[CustomIdGenerator]`` attribute. - It will allow you to pass a :ref:`class of your own to generate the identifiers.` + It will allow you to pass a :ref:`class of your own to generate the identifiers. ` Sequence Generator ^^^^^^^^^^^^^^^^^^ diff --git a/docs/en/reference/events.rst b/docs/en/reference/events.rst index 408014cf417..dbde6d19df2 100644 --- a/docs/en/reference/events.rst +++ b/docs/en/reference/events.rst @@ -131,47 +131,47 @@ There are two ways to set up an event handler: * For *all events* you can create a Lifecycle Event Listener or Subscriber class and register it by calling ``$eventManager->addEventListener()`` or ``eventManager->addEventSubscriber()``, see -:ref:`Listening and subscribing to Lifecycle Events` +:ref:`Listening and subscribing to Lifecycle Events ` * For *some events* (see table below), you can create a *Lifecycle Callback* method in the -entity, see :ref:`Lifecycle Callbacks`. +entity, see :ref:`Lifecycle Callbacks `. .. _reference-events-lifecycle-events: Events Overview --------------- -+-----------------------------------------------------------------+-----------------------+-----------+-------------------------------------+ -| Event | Dispatched by | Lifecycle | Passed | -| | | Callback | Argument | -+=================================================================+=======================+===========+=====================================+ -| :ref:`preRemove` | ``$em->remove()`` | Yes | `PreRemoveEventArgs`_ | -+-----------------------------------------------------------------+-----------------------+-----------+-------------------------------------+ -| :ref:`postRemove` | ``$em->flush()`` | Yes | `PostRemoveEventArgs`_ | -+-----------------------------------------------------------------+-----------------------+-----------+-------------------------------------+ -| :ref:`prePersist` | ``$em->persist()`` | Yes | `PrePersistEventArgs`_ | -| | on *initial* persist | | | -+-----------------------------------------------------------------+-----------------------+-----------+-------------------------------------+ -| :ref:`postPersist` | ``$em->flush()`` | Yes | `PostPersistEventArgs`_ | -+-----------------------------------------------------------------+-----------------------+-----------+-------------------------------------+ -| :ref:`preUpdate` | ``$em->flush()`` | Yes | `PreUpdateEventArgs`_ | -+-----------------------------------------------------------------+-----------------------+-----------+-------------------------------------+ -| :ref:`postUpdate` | ``$em->flush()`` | Yes | `PostUpdateEventArgs`_ | -+-----------------------------------------------------------------+-----------------------+-----------+-------------------------------------+ -| :ref:`postLoad` | Loading from database | Yes | `PostLoadEventArgs`_ | -+-----------------------------------------------------------------+-----------------------+-----------+-------------------------------------+ -| :ref:`loadClassMetadata` | Loading of mapping | No | `LoadClassMetadataEventArgs`_ | -| | metadata | | | -+-----------------------------------------------------------------+-----------------------+-----------+-------------------------------------+ -| ``onClassMetadataNotFound`` | ``MappingException`` | No | `OnClassMetadataNotFoundEventArgs`_ | -+-----------------------------------------------------------------+-----------------------+-----------+-------------------------------------+ -| :ref:`preFlush` | ``$em->flush()`` | Yes | `PreFlushEventArgs`_ | -+-----------------------------------------------------------------+-----------------------+-----------+-------------------------------------+ -| :ref:`onFlush` | ``$em->flush()`` | No | `OnFlushEventArgs`_ | -+-----------------------------------------------------------------+-----------------------+-----------+-------------------------------------+ -| :ref:`postFlush` | ``$em->flush()`` | No | `PostFlushEventArgs`_ | -+-----------------------------------------------------------------+-----------------------+-----------+-------------------------------------+ -| :ref:`onClear` | ``$em->clear()`` | No | `OnClearEventArgs`_ | -+-----------------------------------------------------------------+-----------------------+-----------+-------------------------------------+ ++------------------------------------------------------------------+-----------------------+-----------+-------------------------------------+ +| Event | Dispatched by | Lifecycle | Passed | +| | | Callback | Argument | ++==================================================================+=======================+===========+=====================================+ +| :ref:`preRemove ` | ``$em->remove()`` | Yes | `PreRemoveEventArgs`_ | ++------------------------------------------------------------------+-----------------------+-----------+-------------------------------------+ +| :ref:`postRemove ` | ``$em->flush()`` | Yes | `PostRemoveEventArgs`_ | ++------------------------------------------------------------------+-----------------------+-----------+-------------------------------------+ +| :ref:`prePersist ` | ``$em->persist()`` | Yes | `PrePersistEventArgs`_ | +| | on *initial* persist | | | ++------------------------------------------------------------------+-----------------------+-----------+-------------------------------------+ +| :ref:`postPersist ` | ``$em->flush()`` | Yes | `PostPersistEventArgs`_ | ++------------------------------------------------------------------+-----------------------+-----------+-------------------------------------+ +| :ref:`preUpdate ` | ``$em->flush()`` | Yes | `PreUpdateEventArgs`_ | ++------------------------------------------------------------------+-----------------------+-----------+-------------------------------------+ +| :ref:`postUpdate ` | ``$em->flush()`` | Yes | `PostUpdateEventArgs`_ | ++------------------------------------------------------------------+-----------------------+-----------+-------------------------------------+ +| :ref:`postLoad ` | Loading from database | Yes | `PostLoadEventArgs`_ | ++------------------------------------------------------------------+-----------------------+-----------+-------------------------------------+ +| :ref:`loadClassMetadata ` | Loading of mapping | No | `LoadClassMetadataEventArgs`_ | +| | metadata | | | ++------------------------------------------------------------------+-----------------------+-----------+-------------------------------------+ +| ``onClassMetadataNotFound`` | ``MappingException`` | No | `OnClassMetadataNotFoundEventArgs`_ | ++------------------------------------------------------------------+-----------------------+-----------+-------------------------------------+ +| :ref:`preFlush ` | ``$em->flush()`` | Yes | `PreFlushEventArgs`_ | ++------------------------------------------------------------------+-----------------------+-----------+-------------------------------------+ +| :ref:`onFlush ` | ``$em->flush()`` | No | `OnFlushEventArgs`_ | ++------------------------------------------------------------------+-----------------------+-----------+-------------------------------------+ +| :ref:`postFlush ` | ``$em->flush()`` | No | `PostFlushEventArgs`_ | ++------------------------------------------------------------------+-----------------------+-----------+-------------------------------------+ +| :ref:`onClear ` | ``$em->clear()`` | No | `OnClearEventArgs`_ | ++------------------------------------------------------------------+-----------------------+-----------+-------------------------------------+ .. warning:: @@ -358,7 +358,7 @@ behaviors across different entity classes. Note that they require much more detailed knowledge about the inner workings of the ``EntityManager`` and ``UnitOfWork`` classes. Please -read the :ref:`Implementing Event Listeners` section +read the :ref:`Implementing Event Listeners ` section carefully if you are trying to write your own listener. For event subscribers, there are no surprises. They declare the @@ -471,11 +471,11 @@ prePersist There are two ways for the ``prePersist`` event to be triggered: - One is when you call ``EntityManager::persist()``. The - event is also called for all :ref:`cascaded associations`. + event is also called for all :ref:`cascaded associations `. - The other is inside the ``flush()`` method when changes to associations are computed and - this association is marked as :ref:`cascade: persist`. Any new entity found + this association is marked as :ref:`cascade: persist `. Any new entity found during this operation is also persisted and ``prePersist`` called - on it. This is called :ref:`persistence by reachability`. + on it. This is called :ref:`persistence by reachability `. In both cases you get passed a ``PrePersistEventArgs`` instance which has access to the entity and the entity manager. @@ -499,7 +499,7 @@ preRemove The ``preRemove`` event is called on every entity immediately when it is passed to the ``EntityManager::remove()`` method. It is cascaded for all -associations that are marked as :ref:`cascade: remove` +associations that are marked as :ref:`cascade: remove ` It is not called for a DQL ``DELETE`` statement. @@ -547,7 +547,7 @@ entities and their associations have been computed. This means, the - Collections scheduled for removal To make use of the ``onFlush`` event you have to be familiar with the -internal :ref:`UnitOfWork` API, which grants you access to the previously +internal :ref:`UnitOfWork ` API, which grants you access to the previously mentioned sets. See this example: .. code-block:: php diff --git a/docs/en/reference/faq.rst b/docs/en/reference/faq.rst index a81812a9c2b..85b6e35d851 100644 --- a/docs/en/reference/faq.rst +++ b/docs/en/reference/faq.rst @@ -101,7 +101,7 @@ The many-to-many association is only supporting foreign keys in the table defini To work with many-to-many tables containing extra columns you have to use the foreign keys as primary keys feature of Doctrine ORM. -See :doc:`the tutorial on composite primary keys for more information<../tutorials/composite-primary-keys>`. +See :doc:`the tutorial on composite primary keys for more information <../tutorials/composite-primary-keys>`. How can i paginate fetch-joined collections? diff --git a/docs/en/reference/inheritance-mapping.rst b/docs/en/reference/inheritance-mapping.rst index 0e23c8f7d87..448c9dd401b 100644 --- a/docs/en/reference/inheritance-mapping.rst +++ b/docs/en/reference/inheritance-mapping.rst @@ -380,7 +380,7 @@ It is not supported to use overrides in entity inheritance scenarios. .. note:: When using traits, make sure not to miss the warnings given in the - :doc:`Limitations and Known Issues` chapter. + :doc:`Limitations and Known Issues ` chapter. Association Override diff --git a/docs/en/sidebar.rst b/docs/en/sidebar.rst index 0430bcc7504..c87651c2fbe 100644 --- a/docs/en/sidebar.rst +++ b/docs/en/sidebar.rst @@ -1,3 +1,5 @@ +:orphan: + .. toc:: .. tocheader:: Tutorials