orklah/psalm-insane-comparison
Psalm plugin that flags “insane” string-to-number loose comparisons that change behavior in PHP 8 (RFC: Saner string to number comparisons). Helps you find risky == checks like non-empty string vs 0 before upgrading, and suggests safer typing/casts.
"string" == 0), which break in PHP 8 due to stricter type comparison rules. Aligns with roadmap items targeting PHP 8 compatibility."0" == 0, "abc" == 0).For Executives: "This package automates a critical PHP 8 migration risk: loose string-to-number comparisons that break in PHP 8. By integrating into our existing Psalm workflow, it catches bugs early—saving dev time and reducing post-migration fire drills. Low cost (MIT license, open-source), high ROI for teams upgrading to PHP 8."
For Engineering:
"Psalm-insane-comparison is a lightweight plugin that flags PHP 7 → PHP 8 breaking changes (e.g., 'x' == 0 → false). It’s zero-config beyond enabling it, and offers clear fixes (strict equality, type casting, or Psalm type hints). Perfect for auditing legacy code or enforcing PHP 8 compliance in CI. No false positives—just actionable issues."
How can I help you explore Laravel packages today?