Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: Validate documentation rst with phpdocumentor #2646

Merged
merged 3 commits into from
Jun 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: "Documentation"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noted that this was adapated from the ORM action.


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: "Install dependencies with Composer"
uses: "ramsey/composer-install@v3"
with:
working-directory: "docs"
dependency-versions: "highest"

- name: "Add orphan metadata where needed"
run: |
printf '%s\n\n%s\n' ":orphan:" "$(cat docs/en/sidebar.rst)" > docs/en/sidebar.rst

- name: "Run guides-cli"
run: "docs/vendor/bin/guides -vvv --no-progress docs/en 2>&1 | grep -v 'No template found for rendering directive' | ( ! grep WARNING )"
5 changes: 5 additions & 0 deletions docs/composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"require-dev": {
"phpdocumentor/guides-cli": "^1.2"
}
}
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 <[email protected]>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: Content of .. sectionauthor:: name <email> must specify a name and can also specify an email


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 <[email protected]>

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 <[email protected]>

As explained in the
:doc:`restrictions for document classes in the manual <../reference/architecture>`.
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>
Comment on lines +98 to +99
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: No replacement was found for variable |FQCN| {"rst-file":"reference/custom-mapping-types.rst"}

Loading