-
Couldn't load subscription status.
- Fork 39
Add sphinxcontrib-phpdomain extension #269
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
Conversation
18bb741 to
1dde4ff
Compare
|
@adiati98, this seems to be working based on this PR's URL: But I can see an issue: those aren't nested correctly. Each Incorrect exampleAdvanced routing
================
Configure custom routes through writing a listener to the ``\Mautic\CoreBundle\CoreEvents::BUILD_ROUTE`` event. Listeners to this event receives a ``Mautic\CoreBundle\Event\RouteEvent`` object. Mautic dispatches an event for each firewall when compiling routes.
.. php:class:: Mautic\CoreBundle\Event\RouteEvent
.. php:method:: getType()
:returns: The :ref:`route firewall<plugins/config:Routing firewalls>` for the given route collection.
:returntype: string
.. php:method:: getCollection()
:returns: Returns a RouteCollection object that can be used to manually define custom routes.
:returntype: \\Symfony\\Component\\Routing\\RouteCollection
.. php:method:: addRoutes(string $path)
Load custom routes through a resource file such as yaml or XML.
:param string $path: Path to the resource file. For example, ``@FMElfinderBundle/Resources/config/routing.yaml``.
:returntype: void
Correct exampleAdvanced routing
================
Configure custom routes through writing a listener to the ``\Mautic\CoreBundle\CoreEvents::BUILD_ROUTE`` event. Listeners to this event receives a ``Mautic\CoreBundle\Event\RouteEvent`` object. Mautic dispatches an event for each firewall when compiling routes.
.. php:class:: Mautic\CoreBundle\Event\RouteEvent
.. php:method:: getType()
:returns: The :ref:`route firewall<plugins/config:Routing firewalls>` for the given route collection.
:returntype: string
.. php:method:: getCollection()
:returns: Returns a RouteCollection object that can be used to manually define custom routes.
:returntype: \\Symfony\\Component\\Routing\\RouteCollection
.. php:method:: addRoutes(string $path)
Load custom routes through a resource file such as yaml or XML.
:param string $path: Path to the resource file. For example, ``@FMElfinderBundle/Resources/config/routing.yaml``.
:returntype: void
|
fd68ed8 to
45e49b1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @matbcvo,
Thanks so much for your PR! ✨
I'm currently reviewing this, but I also have a question in paralel.
| RUN chmod +x /usr/local/bin/pipx | ||
|
|
||
| RUN pipx install --global sphinx | ||
| RUN pipx install --force --global --include-deps sphinx-rtd-theme |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: Is there any reason to remove this? Would we need this in the future?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: Is there any reason to remove this? Would we need this in the future?
This PR switches to pipx inject because sphinx-rtd-theme and sphinxcontrib-phpdomain are Sphinx extensions, not standalone tools.
With the previous pipx install sphinx-rtd-theme, the theme was placed into its own isolated environment. While Sphinx was still able to see the theme, the sphinxcontrib-phpdomain extension was not discoverable there (resulting in module not found error). Injecting both into the sphinx environment ensures they are installed alongside Sphinx and reliably available during docs builds.
This approach keeps the extensions in the same environment as Sphinx, avoids discovery issues, and results in a cleaner, more maintainable setup.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, okay. Thanks so much for the explanation!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for adding the pipx inject and fixing the indentation, @matbcvo! 🚀
FYI, as the build failed, we need to wait for @RCheesley to merge this.



Description
This PR adds the
sphinxcontrib-phpdomainextension to the documentation build.Compared to the older
phpdomain, themarkstory/sphinxcontrib-phpdomainpackage is actively maintained.https://github.com/markstory/sphinxcontrib-phpdomain
Screenshots or screen recordings
Before
After