feat(php): add PHPStan analyse filter module#1110
Closed
LucianoVandi wants to merge 1 commit into
Closed
Conversation
Contributor
Author
|
Hi! Following up on this PR. I know maintainers are busy, so no pressure at all! I just wanted to check whether this contribution looks useful / in scope, and whether there's anything I should adjust to make review easier. I use PHPStan daily, so I'm happy to adjust this if needed. Thanks! |
iliaal
added a commit
to iliaal/rtk
that referenced
this pull request
Apr 30, 2026
…t, paratest, ecs, pint, artisan) Consolidates three stalled upstream PRs plus a new .phpt filter and Pint support into one coherent PHP ecosystem module: - `rtk php` + `rtk artisan`: syntax check (-l) and Laravel artisan wrapper - `rtk phpunit`: structured-state parser; aggregate counts + bounded failure list (sourced from rtk-ai#874, refactored to use runner::run_filtered and strip emoji) - `rtk phpstan`: typed serde::Deserialize parser for --error-format=json; groups errors by file, sorts by count desc; handles utility commands (--version, list, clear-result-cache) as passthrough (sourced from rtk-ai#1110, strip emoji in success path) - `rtk pest` + `rtk paratest`: shared test_output helper (from rtk-ai#1246) - `rtk ecs` + `rtk pint`: code style fixers; pint uses --format=json for structured per-file rule counts - `rtk phpt`: wraps `php run-tests.php` for php-src and PHP extensions; collapses per-test PASS chatter (99.5% byte reduction on a 5322-test run) Composer custom-bin-dir detection: `composer_bin_dirs()` reads COMPOSER_BIN_DIR and composer.json `config.bin-dir` so `tools/bin/phpunit` classifies identically to `vendor/bin/phpunit`. registry.rs normalizes tool paths before matching so one rule covers every Composer layout. Sources: - rtk-ai#1246 (aaronflorey): php, artisan, ecs, pest, paratest, test_output, utils, composer_bin_dirs + registry normalization. phpunit and phpstan stubs replaced with deeper implementations below. - rtk-ai#874 (Beninho): phpunit state-machine parser (ported). - rtk-ai#1110 (LucianoVandi): phpstan typed parser (emoji stripped). - New: pint_cmd.rs, phpt_cmd.rs. 1744 tests pass (1683 baseline + 61 new).
iliaal
added a commit
to iliaal/rtk
that referenced
this pull request
May 9, 2026
…t, paratest, ecs, pint, artisan) Consolidates three stalled upstream PRs plus a new .phpt filter and Pint support into one coherent PHP ecosystem module: - `rtk php` + `rtk artisan`: syntax check (-l) and Laravel artisan wrapper - `rtk phpunit`: structured-state parser; aggregate counts + bounded failure list (sourced from rtk-ai#874, refactored to use runner::run_filtered and strip emoji) - `rtk phpstan`: typed serde::Deserialize parser for --error-format=json; groups errors by file, sorts by count desc; handles utility commands (--version, list, clear-result-cache) as passthrough (sourced from rtk-ai#1110, strip emoji in success path) - `rtk pest` + `rtk paratest`: shared test_output helper (from rtk-ai#1246) - `rtk ecs` + `rtk pint`: code style fixers; pint uses --format=json for structured per-file rule counts - `rtk phpt`: wraps `php run-tests.php` for php-src and PHP extensions; collapses per-test PASS chatter (99.5% byte reduction on a 5322-test run) Composer custom-bin-dir detection: `composer_bin_dirs()` reads COMPOSER_BIN_DIR and composer.json `config.bin-dir` so `tools/bin/phpunit` classifies identically to `vendor/bin/phpunit`. registry.rs normalizes tool paths before matching so one rule covers every Composer layout. Sources: - rtk-ai#1246 (aaronflorey): php, artisan, ecs, pest, paratest, test_output, utils, composer_bin_dirs + registry normalization. phpunit and phpstan stubs replaced with deeper implementations below. - rtk-ai#874 (Beninho): phpunit state-machine parser (ported). - rtk-ai#1110 (LucianoVandi): phpstan typed parser (emoji stripped). - New: pint_cmd.rs, phpt_cmd.rs. 1744 tests pass (1683 baseline + 61 new).
iliaal
added a commit
to iliaal/rtk
that referenced
this pull request
May 17, 2026
…t, paratest, ecs, pint, artisan) Consolidates three stalled upstream PRs plus a new .phpt filter and Pint support into one coherent PHP ecosystem module: - `rtk php` + `rtk artisan`: syntax check (-l) and Laravel artisan wrapper - `rtk phpunit`: structured-state parser; aggregate counts + bounded failure list (sourced from rtk-ai#874, refactored to use runner::run_filtered and strip emoji) - `rtk phpstan`: typed serde::Deserialize parser for --error-format=json; groups errors by file, sorts by count desc; handles utility commands (--version, list, clear-result-cache) as passthrough (sourced from rtk-ai#1110, strip emoji in success path) - `rtk pest` + `rtk paratest`: shared test_output helper (from rtk-ai#1246) - `rtk ecs` + `rtk pint`: code style fixers; pint uses --format=json for structured per-file rule counts - `rtk phpt`: wraps `php run-tests.php` for php-src and PHP extensions; collapses per-test PASS chatter (99.5% byte reduction on a 5322-test run) Composer custom-bin-dir detection: `composer_bin_dirs()` reads COMPOSER_BIN_DIR and composer.json `config.bin-dir` so `tools/bin/phpunit` classifies identically to `vendor/bin/phpunit`. registry.rs normalizes tool paths before matching so one rule covers every Composer layout. Sources: - rtk-ai#1246 (aaronflorey): php, artisan, ecs, pest, paratest, test_output, utils, composer_bin_dirs + registry normalization. phpunit and phpstan stubs replaced with deeper implementations below. - rtk-ai#874 (Beninho): phpunit state-machine parser (ported). - rtk-ai#1110 (LucianoVandi): phpstan typed parser (emoji stripped). - New: pint_cmd.rs, phpt_cmd.rs. 1744 tests pass (1683 baseline + 61 new).
iliaal
added a commit
to iliaal/rtk
that referenced
this pull request
May 17, 2026
…pest, paratest, ecs, pint) Consolidates the PHP-tooling work from three upstream PRs plus a new Pint module, leaving phpt to its own PR (rtk-ai#1503). - rtk php / rtk artisan: syntax check (-l) and Laravel artisan wrapper. - rtk phpunit: structured-state parser, aggregate counts, bounded failure list. Uses runner::run_filtered. - rtk phpstan: typed serde::Deserialize parser for --error-format=json, groups errors by file, sorts by count desc. Utility commands (--version, list, clear-result-cache) pass through unchanged. - rtk pest / rtk paratest: shared test_output helper. - rtk ecs / rtk pint: code-style fixers; pint uses --format=json for structured per-file rule counts. Composer custom-bin-dir detection: composer_bin_dirs() reads COMPOSER_BIN_DIR and composer.json config.bin-dir, so tools/bin/phpunit classifies identically to vendor/bin/phpunit. registry.rs normalizes tool paths before matching. Sources: - rtk-ai#1246 (aaronflorey, self-closed): php, artisan, ecs, pest, paratest, test_output, utils, composer_bin_dirs, registry normalization. - rtk-ai#874 (Beninho, open): phpunit state-machine parser. - rtk-ai#1110 (LucianoVandi, open): phpstan typed parser. - New: pint_cmd.rs. Tests: discover::registry 253 pass; cmds::php 36 pass; cargo build --release 0 errors; cargo fmt --check clean.
iliaal
added a commit
to iliaal/rtk
that referenced
this pull request
May 30, 2026
…t, paratest, ecs, pint, artisan) Consolidates three stalled upstream PRs plus a new .phpt filter and Pint support into one coherent PHP ecosystem module: - `rtk php` + `rtk artisan`: syntax check (-l) and Laravel artisan wrapper - `rtk phpunit`: structured-state parser; aggregate counts + bounded failure list (sourced from rtk-ai#874, refactored to use runner::run_filtered and strip emoji) - `rtk phpstan`: typed serde::Deserialize parser for --error-format=json; groups errors by file, sorts by count desc; handles utility commands (--version, list, clear-result-cache) as passthrough (sourced from rtk-ai#1110, strip emoji in success path) - `rtk pest` + `rtk paratest`: shared test_output helper (from rtk-ai#1246) - `rtk ecs` + `rtk pint`: code style fixers; pint uses --format=json for structured per-file rule counts - `rtk phpt`: wraps `php run-tests.php` for php-src and PHP extensions; collapses per-test PASS chatter (99.5% byte reduction on a 5322-test run) Composer custom-bin-dir detection: `composer_bin_dirs()` reads COMPOSER_BIN_DIR and composer.json `config.bin-dir` so `tools/bin/phpunit` classifies identically to `vendor/bin/phpunit`. registry.rs normalizes tool paths before matching so one rule covers every Composer layout. Sources: - rtk-ai#1246 (aaronflorey): php, artisan, ecs, pest, paratest, test_output, utils, composer_bin_dirs + registry normalization. phpunit and phpstan stubs replaced with deeper implementations below. - rtk-ai#874 (Beninho): phpunit state-machine parser (ported). - rtk-ai#1110 (LucianoVandi): phpstan typed parser (emoji stripped). - New: pint_cmd.rs, phpt_cmd.rs. 1744 tests pass (1683 baseline + 61 new).
iliaal
added a commit
to iliaal/rtk
that referenced
this pull request
May 30, 2026
…pest, paratest, ecs, pint) Consolidates the PHP-tooling work from three upstream PRs plus a new Pint module, leaving phpt to its own PR (rtk-ai#1503). - rtk php / rtk artisan: syntax check (-l) and Laravel artisan wrapper. - rtk phpunit: structured-state parser, aggregate counts, bounded failure list. Uses runner::run_filtered. - rtk phpstan: typed serde::Deserialize parser for --error-format=json, groups errors by file, sorts by count desc. Utility commands (--version, list, clear-result-cache) pass through unchanged. - rtk pest / rtk paratest: shared test_output helper. - rtk ecs / rtk pint: code-style fixers; pint uses --format=json for structured per-file rule counts. Composer custom-bin-dir detection: composer_bin_dirs() reads COMPOSER_BIN_DIR and composer.json config.bin-dir, so tools/bin/phpunit classifies identically to vendor/bin/phpunit. registry.rs normalizes tool paths before matching. Sources: - rtk-ai#1246 (aaronflorey, self-closed): php, artisan, ecs, pest, paratest, test_output, utils, composer_bin_dirs, registry normalization. - rtk-ai#874 (Beninho, open): phpunit state-machine parser. - rtk-ai#1110 (LucianoVandi, open): phpstan typed parser. - New: pint_cmd.rs. Tests: discover::registry 253 pass; cmds::php 36 pass; cargo build --release 0 errors; cargo fmt --check clean.
iliaal
added a commit
to iliaal/rtk
that referenced
this pull request
Jun 9, 2026
…pest, paratest, ecs, pint) Consolidates the PHP-tooling work from three upstream PRs plus a new Pint module, leaving phpt to its own PR (rtk-ai#1503). - rtk php / rtk artisan: syntax check (-l) and Laravel artisan wrapper. - rtk phpunit: structured-state parser, aggregate counts, bounded failure list. Uses runner::run_filtered. - rtk phpstan: typed serde::Deserialize parser for --error-format=json, groups errors by file, sorts by count desc. Utility commands (--version, list, clear-result-cache) pass through unchanged. - rtk pest / rtk paratest: shared test_output helper. - rtk ecs / rtk pint: code-style fixers; pint uses --format=json for structured per-file rule counts. Composer custom-bin-dir detection: composer_bin_dirs() reads COMPOSER_BIN_DIR and composer.json config.bin-dir, so tools/bin/phpunit classifies identically to vendor/bin/phpunit. registry.rs normalizes tool paths before matching. Sources: - rtk-ai#1246 (aaronflorey, self-closed): php, artisan, ecs, pest, paratest, test_output, utils, composer_bin_dirs, registry normalization. - rtk-ai#874 (Beninho, open): phpunit state-machine parser. - rtk-ai#1110 (LucianoVandi, open): phpstan typed parser. - New: pint_cmd.rs. Tests: discover::registry 253 pass; cmds::php 36 pass; cargo build --release 0 errors; cargo fmt --check clean.
iliaal
added a commit
to iliaal/rtk
that referenced
this pull request
Jun 9, 2026
…t, paratest, ecs, pint, artisan) Consolidates three stalled upstream PRs plus a new .phpt filter and Pint support into one coherent PHP ecosystem module: - `rtk php` + `rtk artisan`: syntax check (-l) and Laravel artisan wrapper - `rtk phpunit`: structured-state parser; aggregate counts + bounded failure list (sourced from rtk-ai#874, refactored to use runner::run_filtered and strip emoji) - `rtk phpstan`: typed serde::Deserialize parser for --error-format=json; groups errors by file, sorts by count desc; handles utility commands (--version, list, clear-result-cache) as passthrough (sourced from rtk-ai#1110, strip emoji in success path) - `rtk pest` + `rtk paratest`: shared test_output helper (from rtk-ai#1246) - `rtk ecs` + `rtk pint`: code style fixers; pint uses --format=json for structured per-file rule counts - `rtk phpt`: wraps `php run-tests.php` for php-src and PHP extensions; collapses per-test PASS chatter (99.5% byte reduction on a 5322-test run) Composer custom-bin-dir detection: `composer_bin_dirs()` reads COMPOSER_BIN_DIR and composer.json `config.bin-dir` so `tools/bin/phpunit` classifies identically to `vendor/bin/phpunit`. registry.rs normalizes tool paths before matching so one rule covers every Composer layout. Sources: - rtk-ai#1246 (aaronflorey): php, artisan, ecs, pest, paratest, test_output, utils, composer_bin_dirs + registry normalization. phpunit and phpstan stubs replaced with deeper implementations below. - rtk-ai#874 (Beninho): phpunit state-machine parser (ported). - rtk-ai#1110 (LucianoVandi): phpstan typed parser (emoji stripped). - New: pint_cmd.rs, phpt_cmd.rs. 1744 tests pass (1683 baseline + 61 new).
iliaal
added a commit
to iliaal/rtk
that referenced
this pull request
Jun 18, 2026
…t, paratest, ecs, pint, artisan) Consolidates three stalled upstream PRs plus a new .phpt filter and Pint support into one coherent PHP ecosystem module: - `rtk php` + `rtk artisan`: syntax check (-l) and Laravel artisan wrapper - `rtk phpunit`: structured-state parser; aggregate counts + bounded failure list (sourced from rtk-ai#874, refactored to use runner::run_filtered and strip emoji) - `rtk phpstan`: typed serde::Deserialize parser for --error-format=json; groups errors by file, sorts by count desc; handles utility commands (--version, list, clear-result-cache) as passthrough (sourced from rtk-ai#1110, strip emoji in success path) - `rtk pest` + `rtk paratest`: shared test_output helper (from rtk-ai#1246) - `rtk ecs` + `rtk pint`: code style fixers; pint uses --format=json for structured per-file rule counts - `rtk phpt`: wraps `php run-tests.php` for php-src and PHP extensions; collapses per-test PASS chatter (99.5% byte reduction on a 5322-test run) Composer custom-bin-dir detection: `composer_bin_dirs()` reads COMPOSER_BIN_DIR and composer.json `config.bin-dir` so `tools/bin/phpunit` classifies identically to `vendor/bin/phpunit`. registry.rs normalizes tool paths before matching so one rule covers every Composer layout. Sources: - rtk-ai#1246 (aaronflorey): php, artisan, ecs, pest, paratest, test_output, utils, composer_bin_dirs + registry normalization. phpunit and phpstan stubs replaced with deeper implementations below. - rtk-ai#874 (Beninho): phpunit state-machine parser (ported). - rtk-ai#1110 (LucianoVandi): phpstan typed parser (emoji stripped). - New: pint_cmd.rs, phpt_cmd.rs. 1744 tests pass (1683 baseline + 61 new).
iliaal
added a commit
to iliaal/rtk
that referenced
this pull request
Jun 26, 2026
…pest, paratest, ecs, pint) Consolidates the PHP-tooling work from three upstream PRs plus a new Pint module, leaving phpt to its own PR (rtk-ai#1503). - rtk php / rtk artisan: syntax check (-l) and Laravel artisan wrapper. - rtk phpunit: structured-state parser, aggregate counts, bounded failure list. Uses runner::run_filtered. - rtk phpstan: typed serde::Deserialize parser for --error-format=json, groups errors by file, sorts by count desc. Utility commands (--version, list, clear-result-cache) pass through unchanged. - rtk pest / rtk paratest: shared test_output helper. - rtk ecs / rtk pint: code-style fixers; pint uses --format=json for structured per-file rule counts. Composer custom-bin-dir detection: composer_bin_dirs() reads COMPOSER_BIN_DIR and composer.json config.bin-dir, so tools/bin/phpunit classifies identically to vendor/bin/phpunit. registry.rs normalizes tool paths before matching. Sources: - rtk-ai#1246 (aaronflorey, self-closed): php, artisan, ecs, pest, paratest, test_output, utils, composer_bin_dirs, registry normalization. - rtk-ai#874 (Beninho, open): phpunit state-machine parser. - rtk-ai#1110 (LucianoVandi, open): phpstan typed parser. - New: pint_cmd.rs. Tests: discover::registry 253 pass; cmds::php 36 pass; cargo build --release 0 errors; cargo fmt --check clean.
Collaborator
|
Hi, thanks for your PR. This has been superseded by #1649, and you’ve been properly credited there. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new
phpecosystem module with a filter for PHPStan.What it does
--error-format=jsonforanalyse/analyzevendor/bin/phpstanbefore falling back tophpstanon PATH--error-formatis requestedfallback_tail()if JSON parsing fails--version,list, andclear-result-cacheas real passthroughRewrite coverage
Adds rewrite support for:
phpstan analysevendor/bin/phpstan analyse./vendor/bin/phpstan analysephp vendor/bin/phpstan analyseTests
Added module tests covering:
Validation
cargo fmt --all --check cargo clippy --all-targets cargo test --allNotes
Snapshot tests were not added because
instais not currently a repo dependency. This PR uses explicit assertions and fixture-based coverage instead.