Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Two real WordPress plugins on PHP 8.4: what broke, and what I refused to auto-fix

说明与用途

Refit帮助WordPress插件开发者安全升级到PHP 8.4,只识别影响最低支持PHP版本的问题,并自动应用安全修复,保持向后兼容。

问题

WordPress plugin maintainers face breaking changes when upgrading to PHP 8.4 while still supporting older PHP versions.

结果

Refit successfully identified zero fatal errors in an events plugin and fixed four dynamic property issues without breaking compatibility with PHP 7.2. In a social feed plugin, it reported a deprecation that could not be auto‑fixed due to the minimum PHP 7.0 requirement, leaving the decision to the maintainer.

工作流

  • Scan the plugin with refit scan to identify breakages, checks, and deprecations.
  • Review the report, noting items that are already problems on the minimum PHP version.
  • Run refit fix to apply safe automatic fixes, ensuring the project is a clean git repo and that changes compile with php -l.
  • Use git diff to review changes and undo if necessary.
  • Optionally update the minimum PHP version if a deprecation cannot be auto‑fixed without breaking older PHP.
  • Repeat scan and fix until the report shows zero breakages.
  • Deploy the updated plugin to the hosting environment.
  • Monitor for any runtime errors or deprecation warnings in production.

证据

Refit runs both, plus php -l. It does not reinvent the checks.

来源

Refit declares them in the class as plain public properties. That works when the parent class is in your code.

来源

The report also has a section called "Already a problem on PHP 7.2".

来源

  • 记录日期: 2026-11-01T03:59:00.323Z