From c9487e344a28e40411fdd40a47c4c7ab113d5b4b Mon Sep 17 00:00:00 2001 From: Antoine Lamirault Date: Mon, 5 Feb 2024 20:34:01 +0100 Subject: [PATCH] Fix broken class links --- components/cache/adapters/pdo_adapter.rst | 2 +- components/runtime.rst | 2 +- components/validator/resources.rst | 2 +- controller/argument_value_resolver.rst | 6 ++--- reference/constraints/Negative.rst | 2 +- reference/constraints/NegativeOrZero.rst | 2 +- reference/dic_tags.rst | 4 +-- templates.rst | 33 ++++++++++++----------- 8 files changed, 27 insertions(+), 26 deletions(-) diff --git a/components/cache/adapters/pdo_adapter.rst b/components/cache/adapters/pdo_adapter.rst index 34815a51eb0..9cfbfd7bdfa 100644 --- a/components/cache/adapters/pdo_adapter.rst +++ b/components/cache/adapters/pdo_adapter.rst @@ -41,7 +41,7 @@ your code. .. deprecated:: 5.4 Using :class:`Symfony\\Component\\Cache\\Adapter\\PdoAdapter` with a - :class:`Doctrine\\DBAL\\Connection` or a DBAL URL is deprecated since Symfony 5.4 + ``Doctrine\DBAL\Connection`` or a DBAL URL is deprecated since Symfony 5.4 and will be removed in Symfony 6.0. Use :class:`Symfony\\Component\\Cache\\Adapter\\DoctrineDbalAdapter` instead. diff --git a/components/runtime.rst b/components/runtime.rst index bc2fe81e726..df08c36251f 100644 --- a/components/runtime.rst +++ b/components/runtime.rst @@ -139,7 +139,7 @@ The following arguments are supported by the ``SymfonyRuntime``: :class:`Symfony\\Component\\Console\\Application` An application for creating CLI applications. -:class:`Symfony\\Component\\Command\\Command` +:class:`Symfony\\Component\\Console\\Command\\Command` For creating one line command CLI applications (using ``Command::setCode()``). diff --git a/components/validator/resources.rst b/components/validator/resources.rst index 0eb5bc71e86..4baf4fbdd65 100644 --- a/components/validator/resources.rst +++ b/components/validator/resources.rst @@ -148,7 +148,7 @@ instance. To solve this problem, call the :method:`Symfony\\Component\\Validator\\ValidatorBuilder::setMappingCache` method of the Validator builder and pass your own caching class (which must -implement the PSR-6 interface :class:`Psr\\Cache\\CacheItemPoolInterface`):: +implement the PSR-6 interface ``Psr\Cache\CacheItemPoolInterface``):: use Symfony\Component\Validator\Validation; diff --git a/controller/argument_value_resolver.rst b/controller/argument_value_resolver.rst index eb100c258f0..1cddcede0bf 100644 --- a/controller/argument_value_resolver.rst +++ b/controller/argument_value_resolver.rst @@ -53,8 +53,8 @@ In addition, some components and official bundles provide other value resolvers: PSR-7 Objects Resolver: Injects a Symfony HttpFoundation ``Request`` object created from a PSR-7 object - of type :class:`Psr\\Http\\Message\\ServerRequestInterface`, - :class:`Psr\\Http\\Message\\RequestInterface` or :class:`Psr\\Http\\Message\\MessageInterface`. + of type ``Psr\Http\Message\ServerRequestInterface``, + ``Psr\Http\Message\RequestInterface`` or ``Psr\Http\Message\MessageInterface``. It requires installing :doc:`the PSR-7 Bridge ` component. Adding a Custom Value Resolver @@ -250,7 +250,7 @@ To ensure your resolvers are added in the right position you can run the followi command to see which argument resolvers are present and in which order they run. .. code-block:: terminal - + $ php bin/console debug:container debug.argument_resolver.inner --show-arguments .. tip:: diff --git a/reference/constraints/Negative.rst b/reference/constraints/Negative.rst index c77d0586cbf..fa00910e790 100644 --- a/reference/constraints/Negative.rst +++ b/reference/constraints/Negative.rst @@ -8,7 +8,7 @@ want to allow zero as value. ========== =================================================================== Applies to :ref:`property or method ` Class :class:`Symfony\\Component\\Validator\\Constraints\\Negative` -Validator :class:`Symfony\\Component\\Validator\\Constraints\\LesserThanValidator` +Validator :class:`Symfony\\Component\\Validator\\Constraints\\LessThanValidator` ========== =================================================================== Basic Usage diff --git a/reference/constraints/NegativeOrZero.rst b/reference/constraints/NegativeOrZero.rst index 0aead7184e3..e356a21d20f 100644 --- a/reference/constraints/NegativeOrZero.rst +++ b/reference/constraints/NegativeOrZero.rst @@ -7,7 +7,7 @@ want to allow zero as value, use :doc:`/reference/constraints/Negative` instead. ========== =================================================================== Applies to :ref:`property or method ` Class :class:`Symfony\\Component\\Validator\\Constraints\\NegativeOrZero` -Validator :class:`Symfony\\Component\\Validator\\Constraints\\LesserThanOrEqualValidator` +Validator :class:`Symfony\\Component\\Validator\\Constraints\\LessThanOrEqualValidator` ========== =================================================================== Basic Usage diff --git a/reference/dic_tags.rst b/reference/dic_tags.rst index 96b4d2d77fa..16480b3fb3c 100644 --- a/reference/dic_tags.rst +++ b/reference/dic_tags.rst @@ -1339,8 +1339,7 @@ twig.loader **Purpose**: Register a custom service that loads Twig templates -By default, Symfony uses only one `Twig Loader`_ - -:class:`Symfony\\Bundle\\TwigBundle\\Loader\\FilesystemLoader`. If you need +By default, Symfony uses only one `Twig Loader`_ - `FilesystemLoader`_. If you need to load Twig templates from another resource, you can create a service for the new loader and tag it with ``twig.loader``. @@ -1457,6 +1456,7 @@ Then, tag it with the ``validator.initializer`` tag (it has no options). For an example, see the ``DoctrineInitializer`` class inside the Doctrine Bridge. +.. _`FilesystemLoader`: https://github.com/twigphp/Twig/blob/3.x/src/Loader/FilesystemLoader.php .. _`Twig's documentation`: https://twig.symfony.com/doc/3.x/advanced.html#creating-an-extension .. _`Twig Loader`: https://twig.symfony.com/doc/3.x/api.html#loaders .. _`PHP class preloading`: https://www.php.net/manual/en/opcache.configuration.php#ini.opcache.preload diff --git a/templates.rst b/templates.rst index 47071654f54..1ff0ab1d44f 100644 --- a/templates.rst +++ b/templates.rst @@ -592,7 +592,7 @@ Rendering a Template in Services Inject the ``twig`` Symfony service into your own services and use its ``render()`` method. When using :doc:`service autowiring ` you only need to add an argument in the service constructor and type-hint it with -the :class:`Twig\\Environment` class:: +the `Twig Environment`_:: // src/Service/SomeService.php namespace App\Service; @@ -1582,23 +1582,24 @@ If you're using the default ``services.yaml`` configuration, this will already work! Otherwise, :ref:`create a service ` for this class and :doc:`tag your service ` with ``twig.runtime``. -.. _`Twig`: https://twig.symfony.com -.. _`tags`: https://twig.symfony.com/doc/3.x/tags/index.html +.. _`Cross-Site Scripting`: https://en.wikipedia.org/wiki/Cross-site_scripting +.. _`default Twig filters and functions`: https://twig.symfony.com/doc/3.x/#reference .. _`filters`: https://twig.symfony.com/doc/3.x/filters/index.html .. _`functions`: https://twig.symfony.com/doc/3.x/functions/index.html -.. _`with_context`: https://twig.symfony.com/doc/3.x/functions/include.html -.. _`Twig template loader`: https://twig.symfony.com/doc/3.x/api.html#loaders -.. _`Twig raw filter`: https://twig.symfony.com/doc/3.x/filters/raw.html -.. _`Twig output escaping docs`: https://twig.symfony.com/doc/3.x/api.html#escaper-extension -.. _`snake case`: https://en.wikipedia.org/wiki/Snake_case -.. _`Twig template inheritance`: https://twig.symfony.com/doc/3.x/tags/extends.html -.. _`Twig block tag`: https://twig.symfony.com/doc/3.x/tags/block.html -.. _`Cross-Site Scripting`: https://en.wikipedia.org/wiki/Cross-site_scripting .. _`GitHub Actions`: https://docs.github.com/en/free-pro-team@latest/actions -.. _`UX Twig Component`: https://symfony.com/bundles/ux-twig-component/current/index.html -.. _`UX Live Component`: https://symfony.com/bundles/ux-live-component/current/index.html -.. _`Twig Extensions`: https://twig.symfony.com/doc/3.x/advanced.html#creating-an-extension -.. _`default Twig filters and functions`: https://twig.symfony.com/doc/3.x/#reference -.. _`official Twig extensions`: https://github.com/twigphp?q=extra .. _`global variables`: https://twig.symfony.com/doc/3.x/advanced.html#id1 .. _`hinclude.js`: https://mnot.github.io/hinclude/ +.. _`official Twig extensions`: https://github.com/twigphp?q=extra +.. _`snake case`: https://en.wikipedia.org/wiki/Snake_case +.. _`tags`: https://twig.symfony.com/doc/3.x/tags/index.html +.. _`Twig block tag`: https://twig.symfony.com/doc/3.x/tags/block.html +.. _`Twig Environment`: https://github.com/twigphp/Twig/blob/3.x/src/Loader/FilesystemLoader.php +.. _`Twig Extensions`: https://twig.symfony.com/doc/3.x/advanced.html#creating-an-extension +.. _`Twig output escaping docs`: https://twig.symfony.com/doc/3.x/api.html#escaper-extension +.. _`Twig raw filter`: https://twig.symfony.com/doc/3.x/filters/raw.html +.. _`Twig template inheritance`: https://twig.symfony.com/doc/3.x/tags/extends.html +.. _`Twig template loader`: https://twig.symfony.com/doc/3.x/api.html#loaders +.. _`Twig`: https://twig.symfony.com +.. _`UX Live Component`: https://symfony.com/bundles/ux-live-component/current/index.html +.. _`UX Twig Component`: https://symfony.com/bundles/ux-twig-component/current/index.html +.. _`with_context`: https://twig.symfony.com/doc/3.x/functions/include.html