Skip to content

Commit 8adc64b

Browse files
Add DevTools self-update workflow (#273)
* Add DevTools self-update command * Update wiki submodule pointer for PR #273 * Add DevTools self-update command * Update wiki submodule pointer for PR #273 * Add DevTools self-update command * Update wiki submodule pointer for PR #273 * Skip DevTools version checks in CI * Update wiki submodule pointer for PR #273 * Centralize runtime environment checks * Update wiki submodule pointer for PR #273 * Update docs for runtime environment checks * Fix self-update command coverage metadata * Infer self-update scope from installation * Update wiki submodule pointer for PR #273 --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 2c16097 commit 8adc64b

49 files changed

Lines changed: 2621 additions & 81 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/wiki

Submodule wiki updated from 170a0a7 to 20540e5

CHANGELOG.md

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

88
## [Unreleased]
99

10+
### Added
11+
12+
- Add a standalone DevTools `self-update` command plus global `--working-dir` and `--auto-update` binary options for local or global installations (#272)
13+
1014
## [1.23.0] - 2026-04-26
1115

1216
### Added

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,12 @@ composer dev-tools
5555

5656
# Automatically fix code standards issues where applicable
5757
composer dev-tools:fix
58+
59+
# Run the standalone binary from another project directory
60+
vendor/bin/dev-tools --working-dir=/path/to/project tests
61+
62+
# Update the installed DevTools package
63+
vendor/bin/dev-tools self-update
5864
```
5965

6066
You can also run individual commands for specific development tasks:
@@ -288,6 +294,7 @@ skills they depend on.
288294
| `composer codeowners` | Generates managed `.github/CODEOWNERS` content from local repository metadata. |
289295
| `composer gitattributes` | Manages export-ignore rules in `.gitattributes`. |
290296
| `composer dev-tools:sync` | Updates scripts, CODEOWNERS, funding metadata, workflow stubs, `.editorconfig`, `.gitignore`, `.gitattributes`, wiki setup, packaged skills, and packaged agents. |
297+
| `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. |
291298

292299
## 🔌 Integration
293300

docs/_static/mascot-banner.png

967 KB
Loading

docs/_static/mascot.png

-1.84 MB
Binary file not shown.

docs/api/commands.rst

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
Command Classes
22
===============
33

4-
All public CLI commands extend ``Composer\Command\BaseCommand``. Most command
5-
classes are resolved lazily through ``DevToolsCommandLoader`` and receive
6-
their collaborators from the shared ``DevToolsServiceProvider`` container,
7-
while orchestration commands such as ``standards`` dispatch other commands
8-
through the console application itself. The architecture also relies on
9-
``ProcessBuilder`` and ``ProcessQueue`` for fluent process management where
10-
subprocess execution is needed.
4+
All public CLI commands are Symfony Console commands resolved lazily through
5+
``DevToolsCommandLoader``. Command classes receive their collaborators from
6+
the shared ``DevToolsServiceProvider`` container, while orchestration commands
7+
such as ``standards`` dispatch other commands through the console application
8+
itself. Composer integration uses proxy commands to expose that same Symfony
9+
command set without forcing each command to extend Composer's ``BaseCommand``.
10+
The architecture also relies on ``ProcessBuilder`` and ``ProcessQueue`` for
11+
fluent process management where subprocess execution is needed.
1112

1213
.. list-table::
1314
:header-rows: 1
@@ -95,3 +96,6 @@ subprocess execution is needed.
9596
* - ``FastForward\DevTools\Console\Command\UpdateComposerJsonCommand``
9697
- ``update-composer-json``
9798
- Updates the composer.json file to match the packaged schema.
99+
* - ``FastForward\DevTools\Console\Command\SelfUpdateCommand``
100+
- ``dev-tools:self-update``
101+
- Updates the local or global DevTools installation through Composer.

docs/api/composer-integration.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,11 @@ Composer Plugin Classes
3131
- Registers the command provider and runs ``dev-tools:sync`` after
3232
Composer install and update.
3333
* - ``FastForward\DevTools\Composer\Capability\DevToolsCommandProvider``
34-
- Instantiates and returns the available command classes.
34+
- Exposes Symfony command instances to Composer through proxy commands
35+
while filtering names and aliases already registered by Composer or the
36+
root project's scripts.
37+
* - ``FastForward\DevTools\Composer\Command\ProxyCommand``
38+
- Adapts one Symfony command to Composer's command provider contract.
3539
* - ``FastForward\DevTools\Console\DevTools``
3640
- Console application used by the local binary.
3741

docs/commands/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ Detailed documentation for each dev-tools command.
2020
agents
2121
skills
2222
sync
23+
self-update
2324
funding
2425
codeowners
2526
gitignore

docs/commands/self-update.rst

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
self-update
2+
===========
3+
4+
``self-update`` updates the installed ``fast-forward/dev-tools`` package
5+
through Composer.
6+
7+
Usage
8+
-----
9+
10+
.. code-block:: bash
11+
12+
vendor/bin/dev-tools self-update
13+
composer dev-tools:self-update
14+
15+
When the standalone ``dev-tools`` binary is itself loaded from Composer's
16+
global installation, ``self-update`` automatically targets
17+
``composer global update fast-forward/dev-tools``. Local project
18+
installations update the current project by default.
19+
20+
Global runtime options
21+
----------------------
22+
23+
The standalone DevTools binary also accepts Composer-like global runtime
24+
options before the command name:
25+
26+
.. code-block:: bash
27+
28+
vendor/bin/dev-tools --working-dir=/path/to/project tests
29+
vendor/bin/dev-tools --auto-update tests
30+
31+
``--working-dir`` (or ``-d``) switches the process directory before resolving
32+
paths, managed files, or command defaults. This lets a globally installed
33+
binary operate on another project without first changing shell directories.
34+
Composer executions can use Composer's own ``--working-dir``/``-d`` option.
35+
36+
``--auto-update`` runs the self-update flow before the requested command. The
37+
same behavior MAY be enabled with ``FAST_FORWARD_AUTO_UPDATE=1``. When the
38+
active ``dev-tools`` binary is already installed globally, auto-update also
39+
targets the global installation by default. Auto-update failures are reported
40+
as warnings and do not block the requested command.
41+
42+
Version freshness check
43+
-----------------------
44+
45+
When DevTools runs from an installed package, the binary checks Composer
46+
metadata for the latest stable ``fast-forward/dev-tools`` release. If a newer
47+
stable version is available, DevTools prints a warning recommending
48+
``dev-tools self-update``. This check is best-effort: network, Composer, or
49+
metadata failures are ignored so the requested command can continue normally.
50+
The check is skipped automatically in CI environments, including GitHub
51+
Actions, so freshly installed consumer workflows do not spend time querying
52+
release metadata. Set ``FAST_FORWARD_SKIP_VERSION_CHECK=1`` to disable the
53+
warning in other non-interactive contexts.

docs/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Documentation
2121

2222
.. container:: col-lg-5 text-center
2323

24-
.. image:: _static/mascot.png
24+
.. image:: _static/mascot-banner.png
2525
:alt: Fast Forward DevTools mascot
2626
:class: img-fluid w-100 rounded-4 shadow-sm border border-light-subtle bg-body-tertiary p-2
2727

0 commit comments

Comments
 (0)