From 2c0aa1083da05aef2606988a6a22ed44290c81e5 Mon Sep 17 00:00:00 2001 From: Dariusz Ruminski Date: Tue, 16 Dec 2025 00:17:39 +0100 Subject: [PATCH 1/3] poc --- index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.rst b/index.rst index f866a3ea7..afbf45929 100644 --- a/index.rst +++ b/index.rst @@ -7,7 +7,7 @@ If you are already using a linter to identify coding standards problems in your code, you know that fixing them by hand is tedious, especially on large projects. This tool not only detects them, but also fixes them for you. -PHP CS Fixer has built-in rule sets, whether you want to follow PHP coding standards as defined by `PHP-FIG's PER Coding Style `__ - `@PER-CS <./doc/ruleSets/PER-CS.rst>`__, +PHP CS Fixer has built-in rule sets, whether you want to follow PHP coding standards as defined by `PHP-FIG\'s PER Coding Style `__ - `@PER-CS <./doc/ruleSets/PER-CS.rst>`__, a wide community like the `Symfony `__ - `@Symfony <./doc/ruleSets/Symfony.rst>`__, or our opinionated one - `@PhpCsFixer <./doc/ruleSets/PhpCsFixer.rst>`__. You can also define your (team's) style through the `configuration file <./doc/config.rst>`__. From 0791ba556af0d1027b698364d4aa4625bece62cf Mon Sep 17 00:00:00 2001 From: Dariusz Ruminski Date: Tue, 16 Dec 2025 00:43:40 +0100 Subject: [PATCH 2/3] Revert "poc" This reverts commit 2c0aa1083da05aef2606988a6a22ed44290c81e5. --- index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.rst b/index.rst index afbf45929..f866a3ea7 100644 --- a/index.rst +++ b/index.rst @@ -7,7 +7,7 @@ If you are already using a linter to identify coding standards problems in your code, you know that fixing them by hand is tedious, especially on large projects. This tool not only detects them, but also fixes them for you. -PHP CS Fixer has built-in rule sets, whether you want to follow PHP coding standards as defined by `PHP-FIG\'s PER Coding Style `__ - `@PER-CS <./doc/ruleSets/PER-CS.rst>`__, +PHP CS Fixer has built-in rule sets, whether you want to follow PHP coding standards as defined by `PHP-FIG's PER Coding Style `__ - `@PER-CS <./doc/ruleSets/PER-CS.rst>`__, a wide community like the `Symfony `__ - `@Symfony <./doc/ruleSets/Symfony.rst>`__, or our opinionated one - `@PhpCsFixer <./doc/ruleSets/PhpCsFixer.rst>`__. You can also define your (team's) style through the `configuration file <./doc/config.rst>`__. From 2938369e909a912c0b9299ab9aeaf74fc718e3c1 Mon Sep 17 00:00:00 2001 From: Dariusz Ruminski Date: Tue, 16 Dec 2025 00:43:56 +0100 Subject: [PATCH 3/3] docs: upgrade on-the-fly link replacement regex --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index b7e7d8fa1..f31f01544 100644 --- a/Makefile +++ b/Makefile @@ -71,8 +71,8 @@ build-links: build-fetch-docs # -`DESC `_ # +:doc:`DESC ` # ``` - # to find: grep -r --perl '`[^<]+<[^>]+\.rst>`_+' src - find src -type f -name "*.rst" -print0 | xargs -0 perl -pi -e 's|`([^<]+)<([^>]+)\.rst>`_+|:doc:`\1<\2>`|g' + # to find: grep -r --perl '`[^`<]+<[^>]+\.rst>`_+' src + find src -type f -name "*.rst" -print0 | xargs -0 perl -pi -e 's|`([^`<]+)<([^>]+)\.rst>`_+|:doc:`\1<\2>`|g' echo λλλ replace links to source files PHP_CS_FIXER_VERSION=$(shell cat download/version.json | jq .number) && \ find src -type f -name "*.rst" -print0 | xargs -0 perl -pi -e "s|\`([^<]+)<(?:\./)?(?:\.\./)+(src\|tests)+/([^>]+)\.php>\`_+|\`\1\`_|g"