Skip to content

Commit 8c0b865

Browse files
Normalize DevTools workspace directory handling (#275)
* Normalize DevTools workspace directory handling * Update wiki submodule pointer for PR #275 --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 8adc64b commit 8c0b865

23 files changed

Lines changed: 426 additions & 38 deletions

.github/wiki

Submodule wiki updated from 20540e5 to f1a8bc3

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
### Added
1111

12+
- Add a configurable DevTools generated artifact workspace through `--workspace-dir` and `FAST_FORWARD_WORKSPACE_DIR`, keeping explicit output/cache command options authoritative (#274)
1213
- Add a standalone DevTools `self-update` command plus global `--working-dir` and `--auto-update` binary options for local or global installations (#272)
1314

1415
## [1.23.0] - 2026-04-26

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ composer dev-tools:fix
5959
# Run the standalone binary from another project directory
6060
vendor/bin/dev-tools --working-dir=/path/to/project tests
6161

62+
# Store generated reports and caches outside the default .dev-tools workspace
63+
vendor/bin/dev-tools --workspace-dir=.artifacts reports
64+
6265
# Update the installed DevTools package
6366
vendor/bin/dev-tools self-update
6467
```
@@ -124,6 +127,7 @@ composer wiki
124127
# Generate documentation frontpage and related reports
125128
composer reports
126129
composer reports --target=.dev-tools --coverage=.dev-tools/coverage
130+
FAST_FORWARD_WORKSPACE_DIR=.artifacts composer reports
127131

128132
# Synchronize packaged agent skills into .agents/skills
129133
composer skills
@@ -296,6 +300,13 @@ skills they depend on.
296300
| `composer dev-tools:sync` | Updates scripts, CODEOWNERS, funding metadata, workflow stubs, `.editorconfig`, `.gitignore`, `.gitattributes`, wiki setup, packaged skills, and packaged agents. |
297301
| `vendor/bin/dev-tools self-update` / `composer dev-tools:self-update` | Updates the local DevTools package, or the Composer global installation when the active binary is globally installed. |
298302

303+
`--working-dir`/`-d` changes the project root used by the standalone binary.
304+
`--workspace-dir`/`-w` changes where generated DevTools artifacts and caches are
305+
written when command-specific paths are omitted. Composer executions can use
306+
`FAST_FORWARD_WORKSPACE_DIR=.artifacts composer reports` for the same workspace
307+
policy, while explicit options such as `--target`, `--coverage`, `--metrics`,
308+
and `--cache-dir` continue to take precedence.
309+
299310
## 🔌 Integration
300311

301312
DevTools integrates with consumer repositories in two ways. The Composer plugin

docs/commands/docs.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ Options
2828

2929
``--target, -t`` (optional)
3030
Path to the output directory for the generated HTML documentation.
31-
Default: ``.dev-tools``.
31+
Default: selected workspace directory, ``.dev-tools`` unless
32+
``--workspace-dir`` or ``FAST_FORWARD_WORKSPACE_DIR`` is configured.
3233

3334
``--source, -s`` (optional)
3435
Path to the source directory for the guide documentation.
@@ -40,7 +41,8 @@ Options
4041

4142
``--cache-dir`` (optional)
4243
Path to the cache directory for phpDocumentor.
43-
Default: ``.dev-tools/cache/phpdoc``.
44+
Default: selected workspace cache directory, usually
45+
``.dev-tools/cache/phpdoc``.
4446

4547
``--cache``
4648
Force phpDocumentor caching on for this run.

docs/commands/metrics.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,15 @@ Options
3333
Comma-separated directories that should be excluded from analysis.
3434

3535
Default:
36-
``vendor,tmp,cache,spec,build,.dev-tools,backup,resources``.
36+
``vendor,tmp,cache,spec,build,.dev-tools,backup,resources`` plus a custom
37+
relative workspace directory when ``--workspace-dir`` or
38+
``FAST_FORWARD_WORKSPACE_DIR`` selects one.
3739

3840
``--target=<directory>``
3941
Output directory for the generated metrics reports.
4042

41-
Default: ``.dev-tools/metrics``.
43+
Default: selected workspace ``metrics`` directory, usually
44+
``.dev-tools/metrics``.
4245

4346
The command writes:
4447

docs/commands/phpdoc.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ Options
3737
Automatically fix PHPDoc issues. Without this option, runs in dry-run mode.
3838

3939
``--cache-dir`` (optional)
40-
Path to the cache directory for PHP-CS-Fixer. Default: ``.dev-tools/cache/php-cs-fixer``.
40+
Path to the cache directory for PHP-CS-Fixer. Default: selected workspace
41+
cache directory, usually ``.dev-tools/cache/php-cs-fixer``.
4142

4243
``--cache``
4344
Force PHP-CS-Fixer caching on for this run.

docs/commands/reports.rst

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,18 @@ Options
3030

3131
``--target`` (optional)
3232
The target directory for the generated documentation.
33-
Default: ``.dev-tools``.
33+
Default: selected workspace directory, ``.dev-tools`` unless
34+
``--workspace-dir`` or ``FAST_FORWARD_WORKSPACE_DIR`` is configured.
3435

3536
``--coverage, -c`` (optional)
3637
The target directory for the generated test coverage report.
37-
Default: ``.dev-tools/coverage``.
38+
Default: selected workspace ``coverage`` directory, usually
39+
``.dev-tools/coverage``.
3840

3941
``--metrics`` (optional)
4042
The target directory for the generated metrics report.
41-
Default: ``.dev-tools/metrics``.
43+
Default: selected workspace ``metrics`` directory, usually
44+
``.dev-tools/metrics``.
4245

4346
``--cache-dir`` (optional)
4447
Base cache directory for nested ``docs`` and ``tests`` caches.

docs/commands/self-update.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,21 @@ options before the command name:
2626
.. code-block:: bash
2727
2828
vendor/bin/dev-tools --working-dir=/path/to/project tests
29+
vendor/bin/dev-tools --workspace-dir=.artifacts reports
2930
vendor/bin/dev-tools --auto-update tests
3031
3132
``--working-dir`` (or ``-d``) switches the process directory before resolving
3233
paths, managed files, or command defaults. This lets a globally installed
3334
binary operate on another project without first changing shell directories.
3435
Composer executions can use Composer's own ``--working-dir``/``-d`` option.
3536

37+
``--workspace-dir`` (or ``-w``) changes where generated DevTools artifacts and
38+
caches are written when command-specific paths are omitted. It does not change
39+
the project root selected by ``--working-dir``. Composer plugin executions can use
40+
``FAST_FORWARD_WORKSPACE_DIR=.artifacts`` to apply the same workspace policy.
41+
Explicit command options such as ``--target``, ``--coverage``, ``--metrics``,
42+
and ``--cache-dir`` continue to take precedence over the workspace default.
43+
3644
``--auto-update`` runs the self-update flow before the requested command. The
3745
same behavior MAY be enabled with ``FAST_FORWARD_AUTO_UPDATE=1``. When the
3846
active ``dev-tools`` binary is already installed globally, auto-update also

docs/commands/tests.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ Options
3939
Path to the bootstrap file. Default: ``./vendor/autoload.php``.
4040

4141
``--cache-dir`` (optional)
42-
Path to the PHPUnit cache directory. Default: ``.dev-tools/cache/phpunit``.
42+
Path to the PHPUnit cache directory. Default: selected workspace cache
43+
directory, usually ``.dev-tools/cache/phpunit``.
4344

4445
``--cache``
4546
Force PHPUnit result caching on for this run.

docs/commands/wiki.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ Options
2727

2828
``--cache-dir`` (optional)
2929
Path to the cache directory for phpDocumentor.
30-
Default: ``.dev-tools/cache/phpdoc``.
30+
Default: selected workspace cache directory, usually
31+
``.dev-tools/cache/phpdoc``.
3132

3233
``--cache``
3334
Force phpDocumentor caching on for this run.

0 commit comments

Comments
 (0)