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