Skip to content

PHP Checker 1.2.4

Latest

Choose a tag to compare

@tvcnet tvcnet released this 13 Nov 00:36
· 20 commits to main since this release

The Hack Repair Guy's PHP Checker 1.2.4

Highlights

  • Exclude Internal.* formatting sniffs: THRG_PC_Engine::process() skips PHPCS Internal.* non-compatibility notices (such as Internal.LineEndings.Mixed) so mixed CRLF/LF endings no longer inflate warning counts.
  • Expanded legacy function_exists() + else & dead-variable guard detection: THRG_PC_Context now recognizes core built-in functions guaranteed on the target PHP version (e.g. error_clear_last in PHP 7.0+), automatically downgrading their unreachable else branches and isset($var) checks for variables only ever assigned in guarded branches.
  • Fatal vs. non-fatal error wording: THRG_PC_Results::is_fatal_rule() distinguishes hard fatal rules from non-fatal behavioral/INI removal rules (RemovedIniDirectives, ArgumentFunctionsReportCurrentValue) so component summaries and the top Readiness Verdict banner only warn of fatal crashes when hard-fatal rules are present.
  • Originating PHP version & NeedsInspection deprioritization: THRG_PC_Results::rule_php_version() extracts and displays the originating PHP version (e.g. since PHP 7.0, since PHP 8.2) in finding tables, and NeedsInspection warnings sort after actionable findings.
  • Broader bundled dependency detection: THRG_PC_Results::file_origin() now classifies libraries/, library/, lib/, libs/, sdk/, sdks/, mailer/, and imap2/ consistently as bundled dependency.

Verification

  • phpcs --standard=phpcs.xml.dist: 0 errors, 0 warnings across all 23 plugin PHP files.
  • php tests/run.php: 113 assertions passed.