Skip to content

Commit 5454619

Browse files
committed
chore: normalize phpdoc command naming and docs
1 parent 94b74e5 commit 5454619

16 files changed

Lines changed: 47 additions & 45 deletions

CHANGELOG.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1313

1414
### Changed
1515

16-
- Align the standards pipeline to invoke PHPDoc checks via the `php-cs-fixer` command name/alias and route standards cache to `.dev-tools/cache/php-cs-fixer`, preserving backwards compatibility for existing `docheader`-style entry points.
17-
- Rename the command entry point from `standards:phpdoc` to `standards:docheader` and keep both `docheader` and `php-cs-fixer` aliases for compatibility (`standards:phpdoc` is intentionally not kept as a command name).
16+
- Restore `standards:phpdoc` as the command entry point for PHPDoc checks while keeping
17+
the legacy aliases `docheader` and `php-cs-fixer`.
18+
- Remove the `phpdoc` alias from `reports:docs` to avoid command-name collisions with
19+
the standards PHPDoc check command.
1820

1921
## [1.22.3] - 2026-04-25
2022

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ composer code-style
107107
composer refactor
108108

109109
# Check and fix PHPDoc comments
110-
composer docheader
110+
composer phpdoc
111111

112112
# Generate HTML API documentation using phpDocumentor
113113
composer docs

docs/advanced/rector-and-phpdoc.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
Rector and Docheader Automation
1+
Rector and PHPDoc Automation
22
===============================
33

44
The package uses two different Rector entry points, and that difference matters
55
when you are trying to understand why a rule did or did not run.
66

7-
``refactor`` Versus ``docheader``
7+
``refactor`` Versus ``phpdoc``
88
------------------------------
99

1010
- ``refactor`` uses the full ``rector.php`` file.
11-
- ``docheader`` runs PHP-CS-Fixer first and then executes Rector with
11+
- ``phpdoc`` runs PHP-CS-Fixer first and then executes Rector with
1212
``--only \FastForward\DevTools\Rector\AddMissingMethodPhpDocRector``.
1313

1414
Rules Shipped by the Package
@@ -19,7 +19,7 @@ Rules Shipped by the Package
1919

2020
* - Rule
2121
- Enabled in packaged ``rector.php``
22-
- Used directly by ``docheader``
22+
- Used directly by ``phpdoc``
2323
- Purpose
2424
* - ``FastForward\DevTools\Rector\AddMissingMethodPhpDocRector``
2525
- Yes
@@ -45,7 +45,7 @@ rules when ``thecodingmachine/safe`` is installed.
4545
Why ``.docheader`` Appears Automatically
4646
----------------------------------------
4747

48-
The ``docheader`` command creates ``.docheader`` in the consumer root when it is
48+
The ``phpdoc`` command creates ``.docheader`` in the consumer root when it is
4949
missing. The template comes from the packaged file and the package name is
5050
rewritten to match the current project whenever Composer metadata is
5151
available.

docs/api/commands.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ subprocess execution is needed.
3737
- ``refactor``
3838
- Runs Rector with local or packaged configuration.
3939
* - ``FastForward\DevTools\Console\Command\PhpDocCommand``
40-
- ``standards:docheader``
40+
- ``standards:phpdoc``
4141
- Runs PHP-CS-Fixer and a focused Rector PHPDoc pass. Supported aliases:
42-
``docheader`` and ``php-cs-fixer``.
42+
``phpdoc``, ``docheader`` and ``php-cs-fixer``.
4343
* - ``FastForward\DevTools\Console\Command\CodeStyleCommand``
4444
- ``code-style``
4545
- Runs Composer Normalize and ECS.

docs/commands/phpdoc.rst

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
docheader
2-
=========
1+
phpdoc
2+
======
33

44
Checks and fixes PHPDoc comments.
55

66
Description
77
-----------
88

9-
The ``docheader`` command coordinates PHPDoc checking and fixing using:
9+
The ``phpdoc`` command coordinates PHPDoc checking and fixing using:
1010
(alias ``docheader`` and ``php-cs-fixer``)
1111

1212
- PHP-CS-Fixer - fixes PHPDoc formatting
@@ -19,11 +19,10 @@ Usage
1919

2020
.. code-block:: bash
2121
22-
composer docheader
23-
composer php-cs-fixer
24-
composer docheader [options]
25-
composer dev-tools docheader -- [options]
26-
vendor/bin/dev-tools docheader [options]
22+
composer phpdoc
23+
composer phpdoc [options]
24+
composer dev-tools phpdoc -- [options]
25+
vendor/bin/dev-tools phpdoc [options]
2726
2827
Arguments
2928
---------
@@ -63,25 +62,25 @@ Check PHPDocs (dry-run):
6362

6463
.. code-block:: bash
6564
66-
composer docheader
65+
composer phpdoc
6766
6867
Fix PHPDocs automatically:
6968

7069
.. code-block:: bash
7170
72-
composer docheader --fix
71+
composer phpdoc --fix
7372
7473
Check specific directory:
7574

7675
.. code-block:: bash
7776
78-
composer docheader ./src
77+
composer phpdoc ./src
7978
8079
Check without cache:
8180

8281
.. code-block:: bash
8382
84-
composer docheader --no-cache
83+
composer phpdoc --no-cache
8584
8685
Exit Codes
8786
---------

docs/commands/standards.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Description
99
The ``standards`` command runs the full quality pipeline:
1010

1111
1. ``refactor`` - Rector code refactoring
12-
2. ``docheader`` - PHPDoc checks and fixes
12+
2. ``phpdoc`` - PHPDoc checks and fixes
1313
3. ``code-style`` - Code style checking
1414
4. ``reports`` - Documentation and test reports
1515

@@ -68,10 +68,10 @@ Behavior
6868
- Cache stays enabled by default for nested cache-aware phases; omit both flags
6969
to keep the command default, pass ``--cache`` to force it on, and pass
7070
``--no-cache`` to force it off.
71-
- The explicit cache intent is propagated to the nested ``docheader`` and
71+
- The explicit cache intent is propagated to the nested ``phpdoc`` and
7272
``reports`` phases. ``refactor`` and ``code-style`` do not consume this
7373
contract.
74-
- When ``--cache-dir`` is provided, ``docheader`` and ``reports`` receive nested
74+
- When ``--cache-dir`` is provided, ``phpdoc`` and ``reports`` receive nested
7575
cache directories under that base path. When it is omitted, each nested tool
7676
keeps its own default cache directory.
7777
- Progress output is disabled by default across nested phases; use

docs/configuration/overriding-defaults.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Commands and Their Configuration Files
3838
* - ``dependencies``
3939
- ``composer-dependency-analyser.php``
4040
- Falls back to the packaged Composer Dependency Analyser configuration.
41-
* - ``docheader``
41+
* - ``phpdoc``
4242
- ``.php-cs-fixer.dist.php`` and ``rector.php``
4343
- Falls back to the packaged files; ``.docheader`` is created locally
4444
when missing.
@@ -62,7 +62,7 @@ A Practical Example
6262
-------------------
6363

6464
To customize Rector for one library, create ``rector.php`` in the consumer
65-
project root. The ``refactor`` command and the Rector phase inside ``docheader``
65+
project root. The ``refactor`` command and the Rector phase inside ``phpdoc``
6666
will use that file instead of the packaged default.
6767

6868
Extending ECS Configuration

docs/configuration/tooling-defaults.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@ create them on day one.
1414
- ``code-style``
1515
- Fallback ECS configuration.
1616
* - ``rector.php``
17-
- ``refactor`` and ``docheader``
17+
- ``refactor`` and ``phpdoc``
1818
- Fallback Rector configuration.
1919
* - ``phpunit.xml``
2020
- ``tests``
2121
- Registers ``FastForward\DevTools\PhpUnit\Runner\Extension\DevToolsExtension``.
2222
* - ``.php-cs-fixer.dist.php``
23-
- ``docheader``
23+
- ``phpdoc``
2424
- Controls header and PHPDoc fixer behavior.
2525
* - ``.docheader``
26-
- ``docheader``
26+
- ``phpdoc``
2727
- Created into the consumer root on demand when missing.
2828
* - ``.editorconfig``
2929
- ``dev-tools:sync``

docs/running/specialized-commands.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,14 +179,14 @@ Important details:
179179
- ``--json`` and ``--pretty-json`` forward ``--output-format json`` to Rector
180180
and disable its progress bar.
181181

182-
``docheader`` (alias: ``php-cs-fixer``)
182+
``phpdoc`` (alias: ``docheader`` and ``php-cs-fixer``)
183183
---------------------------------------
184184

185185
Coordinates PHP-CS-Fixer and a focused Rector pass for missing method PHPDoc.
186186

187187
.. code-block:: bash
188188
189-
composer docheader
189+
composer phpdoc
190190
composer php-cs-fixer --fix
191191
192192
Important details:

docs/running/unified-command.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Execution Order
1414
``standards`` runs these commands in sequence:
1515

1616
1. ``refactor``
17-
2. ``docheader``
17+
2. ``phpdoc``
1818
3. ``code-style``
1919
4. ``reports``
2020

@@ -31,7 +31,7 @@ To allow the tools to modify files, use one of the following entry points:
3131
composer dev-tools:fix
3232
vendor/bin/dev-tools --fix
3333
34-
The flag mainly affects ``refactor``, ``docheader``, and ``code-style``. The
34+
The flag mainly affects ``refactor``, ``phpdoc``, and ``code-style``. The
3535
reporting steps still run, but they do not use the flag themselves.
3636

3737
When the Unified Command Is the Right Choice

0 commit comments

Comments
 (0)