Skip to content

Support deptrac 4 - #2

Merged
dmolineus merged 7 commits into
masterfrom
support-deptrac-4
Sep 8, 2026
Merged

Support deptrac 4#2
dmolineus merged 7 commits into
masterfrom
support-deptrac-4

Conversation

@dmolineus

@dmolineus dmolineus commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

deptrac stopped attaching a deptrac.phar to its GitHub releases with 3.0, so the current tool source (constraints: ^0.19, repository: qossmic/deptrac) can no longer resolve a usable binary. deptrac is now Composer-only.

Changes

  • phpcq-plugin.json: replace the tool / GitHub-PHAR source with a
    composer requirement (deptrac/deptrac: ^4.0); raise the PHP requirement to
    ^8.3 and declare ext-json.
  • src/deptrac.php: run the Composer-installed
    getInstalledDir()/vendor/bin/deptrac via buildPhpProcess() instead of
    buildRunPhar(). CLI arguments and the JSON output transformer are unchanged –
    deptrac 4.7.1 still accepts analyse --no-progress --formatter=json --output=…
    (plus the global --config-file / --no-cache / --cache-file) and the JSON
    structure (files → messages[] → {message, line, type}) is identical.
  • Tests: the previous smoke tests are replaced with real assertions covering
    the described configuration options and the built process invocation (binary
    path, base arguments, and optional-argument handling). 7 tests / 18 assertions.
  • README.md: note the Composer-based tool acquisition.

Notes

  • Follows the composer requirement pattern already used by
    phpcq/plugin-rector and phpcq/plugin-doctrine-coding-standard.
  • deptrac 4.x requires PHP >= 8.2; this plugin targets ^8.3 in line with its
    own composer.json.

deptrac stopped shipping a PHAR release asset with 3.0, so the previous
GitHub tool source (constraint ^0.19, repository qossmic/deptrac) can no
longer provide a usable binary.

- phpcq-plugin.json: replace the tool/PHAR source with a composer
  requirement (deptrac/deptrac ^4.0); raise PHP requirement to ^8.3 and
  declare ext-json
- src/deptrac.php: run the composer-installed vendor/bin/deptrac through
  buildPhpProcess() instead of buildRunPhar(); mention deptrac.php in the
  config-file option description
- tests: replace the smoke tests with assertions covering the described
  configuration options and the built process invocation (binary path,
  base arguments, optional argument handling)
- README: note the Composer-based tool acquisition
@dmolineus
dmolineus requested a review from discordier September 4, 2026 08:24
@dmolineus dmolineus self-assigned this Sep 4, 2026

@discordier discordier left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but should become a new minor release - not a bugfix.

@dmolineus
dmolineus merged commit 5684915 into master Sep 8, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants