Skip to content

Commit

Permalink
Validate documentation rst with phpdocumentor
Browse files Browse the repository at this point in the history
  • Loading branch information
GromNaN committed Jun 19, 2024
1 parent 98e2e1b commit 8cd3137
Show file tree
Hide file tree
Showing 7 changed files with 53 additions and 5 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: "Documentation"

on:
pull_request:
branches:
- "*.x"
paths:
- .github/workflows/documentation.yml
- docs/**
push:
branches:
- "*.x"
paths:
- .github/workflows/documentation.yml
- docs/**

jobs:
validate-with-guides:
name: "Validate documentation with phpDocumentor/guides"
runs-on: "ubuntu-22.04"

steps:
- name: "Checkout code"
uses: "actions/checkout@v4"

- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "8.3"

- name: "Remove existing composer file"
run: "rm composer.json"

- name: "Require phpdocumentor/guides-cli"
run: "composer require --dev phpdocumentor/guides-cli --no-update"

- name: "Install dependencies with Composer"
uses: "ramsey/composer-install@v3"
with:
dependency-versions: "highest"

- name: "Run guides-cli"
run: "vendor/bin/guides -vvv --no-progress docs/en 2>&1 | grep -v 'No template found for rendering directive' | ( ! grep WARNING )"
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Implementing ArrayAccess for Domain Objects
===========================================

.. sectionauthor:: Roman Borschel ([email protected])
.. sectionauthor:: Roman Borschel

This recipe will show you how to implement ArrayAccess for your
domain objects in order to allow more uniform access, for example
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Implementing the Notify ChangeTracking Policy
=============================================

.. sectionauthor:: Roman Borschel ([email protected])
.. sectionauthor:: Roman Borschel

The NOTIFY change-tracking policy is the most effective
change-tracking policy provided by Doctrine but it requires some
Expand Down
2 changes: 1 addition & 1 deletion docs/en/cookbook/implementing-wakeup-or-clone.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Implementing Wakeup or Clone
============================

.. sectionauthor:: Roman Borschel ([email protected])
.. sectionauthor:: Roman Borschel

As explained in the
:doc:`restrictions for document classes in the manual <../reference/architecture>`.
Expand Down
4 changes: 2 additions & 2 deletions docs/en/cookbook/validation-of-documents.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Validation of Documents
Validation of Documents - Application Side
------------------------------------------

.. sectionauthor:: Benjamin Eberlei <[email protected]>
.. sectionauthor:: Benjamin Eberlei

Doctrine does not ship with any internal validators, the reason
being that we think all the frameworks out there already ship with
Expand Down Expand Up @@ -135,7 +135,7 @@ Further readings: :doc:`Lifecycle Events <../reference/events>`
Validation of Documents - Database Side
---------------------------------------

.. sectionauthor:: Alexandre Abrioux <[email protected]>
.. sectionauthor:: Alexandre Abrioux

.. note::

Expand Down
3 changes: 3 additions & 0 deletions docs/en/reference/custom-mapping-types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,6 @@ type in your mapping like this:
.. code-block:: xml
<field field-name="field" type="mytype" />
.. |FQCN| raw:: html
<abbr title="Fully-Qualified Class Name">FQCN</abbr>
1 change: 1 addition & 0 deletions docs/en/sidebar.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
:orphan:
.. toc::

.. tocheader:: Tutorials
Expand Down

0 comments on commit 8cd3137

Please sign in to comment.