shipmonk/phpstan-dev
Utilities for developing PHPStan rules: write expected errors directly in fixture files using // error: comments and avoid brittle line-number assertions. Includes an autofix mode to generate/update inline error comments during rule development.
Architecture fit: Purpose-built for PHPStan rule testing, seamlessly extending RuleTestCase without altering core PHPStan functionality. Integrates directly into existing test workflows using inline comments for error assertions, aligning perfectly with static analysis development patterns.
Integration feasibility: Minimal friction; requires only composer require --dev and replacing test class base type. No complex configuration or dependencies beyond PHPStan itself.
Technical risk: Low adoption (7 stars, 0 dependents) raises concerns about community support and long-term maintenance. Autofix feature poses critical risk if enabled in committed code (tests fail). Version 0.1.6 is recent but maturity is questionable given minimal usage and lack of external contributors.
Key questions:
Stack fit: Optimized for projects already using PHPStan for custom rule development. Requires PHP 7.4+/8.0 and PHPStan 2.1.8+ as specified in dependencies. Ideal for teams with existing PHPStan rule test suites.
Migration path: Incremental adoption possible. Existing tests can be converted one-by-one by extending RuleTestCase, adding // error: comments to fixtures, and using autofix: true during development to auto-generate assertions (then disabling before commit).
Compatibility: Cross-platform support (Windows path fixes in v0.1.2), trait error handling (v0.1.5), and multi-error ordering flexibility (v0.1.6). Fully compatible with current PHPStan versions but unverified for PHPStan 3.x.
Sequencing: Start with a single rule test, enable autofix to generate comments, validate correctness, then disable autofix and commit. Scale incrementally across all rule tests after initial validation.
Maintenance: Low overhead as a dev-only dependency. Requires monitoring for PHPStan API changes that could break compatibility. Minimal maintenance needed for the package itself if no issues arise, but relies entirely on ShipMonk's internal support.
Support: Limited external resources due to 0 dependents and low star count. No community forums or issue resolution patterns. Troubleshooting would depend on ShipMonk's responsiveness to GitHub issues.
Scaling: Handles multi-file analyses and traits effectively. Fixture readability remains high even in large codebases due to inline error
How can I help you explore Laravel packages today?