11dependencies
22=============
33
4- Analyzes missing, unused, and outdated Composer dependencies.
4+ Analyzes missing, unused, misplaced, and outdated Composer dependencies.
55
66Description
77-----------
88
9- The ``dependencies `` command (alias: ``deps ``) analyzes missing, unused, and
10- overly outdated Composer dependencies using three tools:
9+ The ``dependencies `` command (alias: ``deps ``) analyzes missing, unused,
10+ misplaced, and overly outdated Composer dependencies using two tools:
1111
12- - ``composer-unused `` - detects unused packages
13- - ``composer-dependency-analyser `` - detects missing packages
12+ - ``composer-dependency-analyser `` - detects missing, unused, and misplaced packages
1413- ``jack breakpoint `` - fails when too many outdated packages accumulate
1514
1615These analyzers ship as direct dependencies of ``fast-forward/dev-tools ``, so
@@ -35,6 +34,9 @@ Options
3534
3635 Default: ``5 ``.
3736
37+ Use ``-1 `` to keep the outdated dependency report in the output while
38+ ignoring Jack failures in the final command status.
39+
3840``--upgrade `` (optional)
3941 Applies the Jack upgrade workflow before the analyzers:
4042
@@ -49,6 +51,10 @@ Options
4951``--dev `` (optional)
5052 Prioritizes dev dependencies where Jack supports it.
5153
54+ ``--dump-usage=<package> `` (optional)
55+ Asks ``composer-dependency-analyser `` to dump usages for the given package
56+ or wildcard pattern and enables ``--show-all-usages `` automatically.
57+
5258Examples
5359--------
5460
@@ -64,12 +70,24 @@ Allow up to 10 outdated packages:
6470
6571 composer dependencies --max-outdated=10
6672
73+ Report outdated packages without failing on their count:
74+
75+ .. code-block :: bash
76+
77+ composer dependencies --max-outdated=-1
78+
6779 Preview the upgrade workflow:
6880
6981.. code-block :: bash
7082
7183 composer dependencies --dev
7284
85+ Dump all matched usages for one package:
86+
87+ .. code-block :: bash
88+
89+ composer dependencies --dump-usage=symfony/console
90+
7391 Apply the upgrade workflow and then analyze dependencies:
7492
7593.. code-block :: bash
@@ -91,7 +109,7 @@ Exit Codes
91109 * - Code
92110 - Meaning
93111 * - 0
94- - Success. No missing, unused, or excessive outdated dependencies.
112+ - Success. No missing, unused, misplaced, or excessive outdated dependencies.
95113 * - 1
96114 - Failure. A dependency analyzer or Jack reported findings or errors.
97115
@@ -100,14 +118,22 @@ Behavior
100118
101119- Always previews or applies ``jack raise-to-installed `` first and then
102120 ``jack open-versions `` before running the analyzers.
103- - Runs ``composer-unused ``, `` composer-dependency-analyser ``, and
104- `` jack breakpoint `` after the Jack preview or upgrade phase.
121+ - Runs ``composer-dependency-analyser `` and `` jack breakpoint `` after the Jack
122+ preview or upgrade phase.
105123- ``composer-dependency-analyser `` is configured with:
106- - ``--ignore-unused-deps `` (leaves unused detection to ``composer-unused ``)
107- - ``--ignore-prod-only-in-dev-deps `` (ignores dev-only usage in production code)
124+ - ``--config composer-dependency-analyser.php `` (resolved through the package
125+ file locator so consumer repositories can override it locally)
126+ - the packaged ``composer-dependency-analyser.php `` delegates to
127+ ``FastForward\DevTools\Config\ComposerDependencyAnalyserConfig `` so
128+ consumer repositories can extend the baseline instead of copying it whole
129+ - ``--dump-usages <package> `` and ``--show-all-usages `` when ``--dump-usage ``
130+ is passed to the DevTools command
108131- ``jack breakpoint `` maps ``--max-outdated `` to Jack's ``--limit `` option.
132+ - ``--max-outdated=-1 `` keeps ``jack breakpoint `` in the workflow for reporting,
133+ but its failure is ignored so only missing or unused dependency findings fail
134+ the command.
109135- ``--upgrade `` applies Jack's ``raise-to-installed `` and ``open-versions ``
110136 commands before ``composer update -W `` and ``composer normalize ``.
111- - Returns a non-zero exit code when missing, unused, or too many outdated
112- dependencies are found.
113- - All three tools must be available in ``vendor/bin/ ``.
137+ - Returns a non-zero exit code when missing, unused, misplaced, or too many
138+ outdated dependencies are found.
139+ - Both tools must be available in ``vendor/bin/ ``.
0 commit comments