PHP 8.6.0 was released on November 19, 2026, bringing new language features, deprecations, and changes to existing behavior. If you maintain an OpenCart, WooCommerce, or Magento store, treat the upgrade as a compatibility project covering your application, extensions, dependencies, and server configuration—not just a hosting-panel setting. (php.net)
Key takeaways
- Test PHP 8.6 on an isolated staging copy before changing production.
- Check compatibility for your exact platform, extension, and dependency versions.
- Review changed behavior as well as deprecation notices.
- Verify checkout, payment callbacks, and scheduled tasks separately.
- Confirm the PHP runtime serving HTTP requests, not only the version reported over SSH.
What changed in PHP 8.6
PHP 8.6 introduces partial function application, a Time\Duration class, a polling API, and clamp(), among other additions. Those features are useful, but we would keep adopting new syntax separate from the initial runtime upgrade. (php.net)
Start your compatibility review with these verified deprecations:
| Area | What to review |
|---|---|
| Multibyte regular expressions | Functions including mb_ereg() and mb_split() are deprecated. Review Unicode-aware PCRE alternatives rather than replacing function names blindly. |
| Query-string generation | Passing objects to http_build_query(), including nested objects interpreted as arrays, is deprecated. Build the intended array explicitly. |
| Older aliases | Replace is_integer(), is_long(), is_double(), and doubleval() with their canonical equivalents. |
| Cleanup code | return inside a finally block is deprecated. Move return logic outside the block. |
These changes are documented in PHP’s migration guide. (php.net)
Behavior changes deserve separate tests. For example, invalid flags passed to functions such as array_filter() and pathinfo() now raise ValueError, while the default character set removed by trim() includes form feed. (php.net)
File-writing checks also matter: fclose(), file_put_contents(), and copy() now return false when flushing or closing fails, rather than silently ignoring that failure. Review exports, generated invoices, cache writes, and feeds accordingly. (php.net)
Why it matters for checkout and PHP sites
PHP 8.6 changes three native session defaults:
session.use_strict_modebecomes1.session.cookie_httponlybecomes1.session.cookie_samesitebecomesLax.
The migration guide explains that Lax excludes session cookies from cross-site POST requests. If your payment-return flow depends on that cookie, test it explicitly. Do not disable the new defaults globally as your first fix. (php.net)
Distinguish native PHP sessions from application-managed sessions. OpenCart’s current source, for example, implements its own session abstraction and storage adapters. Inspect your installed version’s session implementation and actual browser cookies instead of assuming every PHP session setting controls them. (raw.githubusercontent.com)
We recommend testing the customer’s browser return and the gateway’s server-to-server notification independently. A successful-looking confirmation page is not our acceptance criterion; the stored order and payment state must also be correct.
1. Inventory the store and confirm support
Record your platform version, theme, extensions, payment SDKs, custom code, and Composer lock file.
For OpenCart compatibility, check release notes for your exact branch and ask extension maintainers about the installed release—not simply their newest release. OpenCart publishes branch-specific changes in its release history. (github.com)
Use the same release-specific approach for other platforms. Adobe explicitly limits support to the combinations listed for each Commerce release. A PHP release announcement does not extend that platform support. (experienceleague.adobe.com)
Keep two inventories:
- Store extensions: payment gateways, shipping integrations, checkout modifications, and reporting modules.
- PHP extensions: database drivers, cURL, mbstring, GD, intl, ZIP, cache clients, and any loader required by encoded code.
For extensions you maintain, keep fixes in their source repository rather than editing deployed copies. Our OpenCart extension development guide is a related reference.
2. Build staging without production side effects
Create a representative copy of the store’s files, database, configuration, and scheduled-task definitions. Restrict access and remove or anonymize customer information where practical.
Before running tests:
- Replace live payment credentials with sandbox credentials.
- Route email to a test mailbox.
- Disable real fulfillment, accounting, and stock synchronization.
- Use separate cache namespaces, queues, and session storage.
- Disable copied schedules until you deliberately test them.
Keep staging access controls in place, but arrange a narrowly scoped route for legitimate sandbox callbacks if your provider needs inbound access.
3. Check dependencies, syntax, and logs
Use the PHP 8.6 executable explicitly. The examples below assume it is named php8.6; substitute your installed path.
php8.6 -v
php8.6 --ini
php8.6 -m
These commands report the CLI version, configuration files, and loaded modules. They do not inspect the web-serving process. (php.net)
For a Composer-managed project, install the committed lock file on staging, then run from the project directory:
# Replace this path with your Composer PHAR.
php8.6 /path/to/composer.phar prohibits php 8.6.0 --locked
php8.6 /path/to/composer.phar check-platform-reqs --no-dev
prohibits identifies declared dependency blockers. check-platform-reqs checks the actual CLI platform and ignores simulated config.platform values. Neither command executes your checkout. Do not use --ignore-platform-reqs to manufacture a passing result. (getcomposer.org)
Run a syntax pass over the staging code:
find . -type f -name '*.php' -print0 |
xargs -0 -r -n1 php8.6 -l
PHP’s lint option checks syntax without executing the application. Follow it with automated tests and real staging requests. (php.net)
Configure staging to capture all reported errors without printing them into responses:
error_reporting = E_ALL
log_errors = On
display_errors = Off
display_startup_errors = Off
Verify the log destination is writable. PHP recommends logging rather than displaying errors on production sites. (php.net)
If you are skipping versions, review every intervening migration guide, not only the PHP 8.5-to-8.6 guide. (php.net)
4. Verify the runtime actually serving your store
Check the virtual host’s PHP handler and, where applicable, its FPM pool and socket. FPM has its own pool configuration, including listener and PHP-setting controls. (php.net)
After restricting access, temporarily place this diagnostic in staging and request it through the store’s hostname:
<?php
header('Content-Type: application/json');
echo json_encode([
'version' => PHP_VERSION,
'sapi' => PHP_SAPI,
'ini' => php_ini_loaded_file(),
'additional_ini' => php_ini_scanned_files(),
'extensions' => get_loaded_extensions(),
], JSON_PRETTY_PRINT);
The configuration functions identify loaded INI files; get_loaded_extensions() lists extensions in that process. Compare the HTTP result with your CLI inventory, then delete the diagnostic. (php.net)
Check cron definitions, systemd services, and queue-worker commands separately. Use explicit executable paths in your deployment plan rather than assuming every process follows the shell’s default php.
5. Run a store-specific acceptance checklist
We would require a recorded pass for:
- Checkout: guest and registered purchases, coupons, shipping, taxes, currencies, and rounding.
- Payments: success, decline, cancellation, authentication challenges, refunds, and delayed confirmation.
- Callbacks: valid signature verification, expected HTTP responses, retry handling, and duplicate delivery.
- Order integrity: correct transaction reference, totals, status, stock adjustment, and notification count.
- Administration: login, product editing, image processing, order updates, and exports.
- Background work: scheduled feeds, subscriptions, inventory synchronization, and queue processing.
Use your gateway’s sandbox tools for callback tests. Stripe’s documentation, for example, explicitly covers retries, duplicate events, and events arriving out of order; test equivalent behavior for whichever provider you use. (docs.stripe.com)
Run scheduled tasks under their normal service account with the intended PHP binary. Check exit status, logs, and resulting records—not merely whether the command started.
6. Deploy with a tested rollback path
Before switching production, we recommend:
- Back up files, database, configuration, and dependency manifests; verify restoration.
- Retain the previous supported runtime and known-good application build.
- Deploy the tested configuration and dependency set.
- Switch the intended HTTP handler and restart affected long-running workers.
- Recheck the HTTP runtime and repeat critical transaction tests.
- Monitor PHP errors, callback failures, checkout failures, and queue backlog.
Define rollback triggers beforehand. If rollback becomes necessary, reconcile payments and orders created since deployment; do not blindly restore an older database over new sales.
FAQ
Is OpenCart compatible with PHP 8.6?
Check your exact OpenCart release and every installed extension. We would not approve an upgrade based solely on a minimum PHP requirement or a successful homepage test.
Does a passing Composer check prove compatibility?
No. It validates declared platform requirements, not application behavior. You still need checkout, callback, and background-task tests. (getcomposer.org)
Must I upgrade to PHP 8.6 immediately?
Not solely because it has been released. Keep your current supported branch patched while testing; PHP lists security support for PHP 8.5 through December 31, 2029. (php.net)
Sources
- PHP 8.6 release announcement
- PHP 8.6 migration guide: incompatible changes, deprecations, and other changes
- PHP command-line options
- PHP configuration files, error logging, and FPM configuration
- Composer command documentation
- OpenCart releases and session implementation
- Adobe Commerce system requirements
- Stripe webhook documentation
- PHP supported versions

