=== PHP Upgrade Readiness ===
Contributors: donrulez
Tags: php, php 8.6, compatibility, deprecated, site health
Requires at least: 6.2
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Check your plugins and themes for code that PHP 8.1 to 8.6 deprecate, before your host switches PHP. File, line, message and fix.

== Description ==

PHP 8.6 is released on 19 November 2026. Hosts move sites to new PHP versions on their own schedule, and PHP 8.2 stops getting
security fixes on 31 December 2026. Before that happens, PHP Upgrade Readiness tells you which of your plugins and themes use
code that PHP 8.1 to 8.6 deprecate:

* **Every finding has the file, the line, the exact message PHP prints and the fix**, so you can send it to the plugin author or
  fix your own code.
* **Runs on your current PHP (7.4 and newer).** It reads files with PHP's tokenizer; nothing is executed or included, and you
  don't need PHP 8.6 installed.
* **Checks the new PHP 8.6 deprecations:** values returned from constructors and destructors, return in finally blocks, class
  constants named NAMESPACE, classes named Is or Let (Guzzle Promises), spl_object_hash(), is_integer(), is_long(), is_double(),
  doubleval(), strcoll(), metaphone(), mbregex (mb_ereg_*), mysqli_get_charset(), define() with three arguments, and more.
* **PHP 8.5:** non-canonical casts like (boolean) and (integer), case labels ending in a semicolon, the backtick operator,
  $http_response_header, curl_close(), finfo_close(), imagedestroy().
* **PHP 8.4:** implicitly nullable parameters (Type $x = null), E_STRICT, trigger_error() with E_USER_ERROR, lcg_value(),
  mysqli_ping() and more.
* **Site Health** shows whether your active plugins and themes are ready for PHP 8.6.
* **CSV export** for agencies that manage many sites.
* Scans in small batches, so large sites don't time out. Results are stored in one option and deleted on uninstall.

A deprecation does not break your site. PHP writes a notice to the error log, and prints it on pages where errors are
displayed, and the code will stop working in a future major version. This plugin shows you where those notices will come from.

= Checked against the real PHP 8.6 =

The rules were checked against PHP 8.6.0RC4 itself. We ran the 100 most popular WordPress.org plugins (55,760 PHP files)
through the real PHP 8.6 compiler, then through this scanner running on PHP 8.2, and compared line by line: the scanner reported
every one of the 1,171 places PHP flagged for the compile-time rules and the PHP 8.6 functions, and nothing else. Results for
those 100 plugins, including which ones log notices on an ordinary page load, are published at
[deadlinefix.com/php-8-6-wordpress-plugins](https://deadlinefix.com/php-8-6-wordpress-plugins). When a plugin on your site is one of them, the details view links to its page.

= What it can't see =

Some deprecations only happen at run time with particular values, for example is_a() called with a string, or null used as an
array offset. A static scan can't know those values. Test on a staging copy with the new PHP version and WP_DEBUG_LOG enabled
for the full picture.

= Privacy =

The plugin makes no remote requests and collects no data. The only external links are the "results and fixes" links to
deadlinefix.com, which open only when you click them.

== Installation ==

1. Install and activate the plugin.
2. Go to Tools → PHP Upgrade Readiness and click "Scan all plugins and themes".
3. Open "Details" for any plugin or theme with findings.

== Frequently Asked Questions ==

= Do I need PHP 8.6 on my server? =

No. The scan runs on the PHP version you have now. That is the point: you find out before the switch.

= Will a plugin stop working on PHP 8.6 because of these findings? =

No. Deprecations are warnings. The plugin keeps working. Keep display_errors off on live sites, and update plugins when their
authors release PHP 8.6 fixes.

= Why are test folders skipped? =

Library test suites (folders named tests or test) never run on a live site, so findings there would only be noise.

= Does it slow down my site? =

No. It does nothing on the front end. The scan runs only when you click the button in wp-admin.

== Screenshots ==

1. Scan results: plugins and themes with PHP 8.1 to 8.6 findings.
2. Details: file, line, the PHP message and the fix.

== Changelog ==

= 1.0.0 =
* First release: PHP 8.1 to 8.6 deprecation checks, Site Health test, CSV export.
