PHP 8.6 Security Defaults: Test Compatibility First, Patch Production Second

PHP 8.6 Security Defaults: Test Compatibility First, Patch Production Second

pr0h0••25 min read•coding
AI Usage (95%)
On this page

Two Headlines, Two Deadlines: Why PHP 8.6 Security Defaults and November Patches Need Separate Tracks

On 2026-11-20, NeoTeo published "PHP security updates November 2026: versions to patch." On 2026-11-21, Mezha.net published "PHP 8.6 tightens security defaults and adds new features." Both were news summaries: headline, snippet, and not much else. No named ini settings, no CVE identifiers, no version ranges, no fixed-version list.

You can't plan an upgrade from that. You can start one.

Here is the position I'm taking, and the rest of this post defends it: the November patch work and the PHP 8.6 migration are two separate tracks with two separate deadlines. Verified security fixes for the branches you already run should ship on the patch track, this week, on their own evidence. PHP 8.6 compatibility belongs on a migration track with a baseline, a candidate environment, and executable assertions. By the end, you'll have a source-verified change table, a runnable compatibility probe, and two independent promotion gates. Collapsing them into one "we're upgrading in Q1" project is how teams end up running a known-vulnerable runtime for two extra quarters while they argue about composer.lock.

I'll show the exact commands and probe code I use to keep those tracks apart. I'll also be explicit about which outputs below are constructed illustrations rather than captured results.

⚠️

Every JSON and terminal output block in this post is illustrative. I have not executed these probes against a released PHP 8.6 build, because I could not verify from the supplied material that one exists. The commands are real and runnable; the numbers are placeholders showing shape and labeling.

Two Upgrade Tracks, Not One Production Deadline

The reported timeline, attributed

The supplied material gives me two data points and nothing more:

  • NeoTeo, 2026-11-20T14:23:31Z — a summary about November 2026 PHP security updates and "versions to patch."
  • Mezha.net, 2026-11-21T01:10:35Z — a summary stating that PHP 8.6 tightens security defaults and adds new features.

I'm treating both as secondary reporting leads, not release facts. Neither snippet names a changed default, an affected version, or a CVE. The one-day offset is likely just publishing cadence — a security roundup and a release-adjacent feature piece landing together — but that's inference, not something the snippets establish.

The technical position

Patch the runtime you run today, using evidence that names the versions and the fixes. Test PHP 8.6 separately, using evidence that names the changed behavior.

The reason is asymmetric risk. A compatibility migration is a multi-week engineering project with a broad blast radius: dependencies, extensions, session semantics, TLS behavior, worker restarts. A security patch on a supported branch is a narrow, reversible change with a known fixed-version target. If you gate the patch on the migration, every day of migration work is also a day of unpatched exposure — and if the migration slips, the exposure quietly extends with it.

Put differently: your composer.json constraint is not a security control. It's a scheduling preference.

Verify the PHP 8.6 Claims Before Building a Migration Plan

The evidence limit

The supplied material contains a headline and a snippet for each source. It does not contain:

  • names of any tightened security defaults
  • affected or fixed version ranges
  • CVE identifiers
  • a confirmed release date or GA status for PHP 8.6
  • named new features

The right response to that gap is not to fill it in from memory. Write down what's missing and go get it from primary sources.

Where to verify the PHP 8.6 claims first

Before you describe PHP 8.6 as production-ready, establish three things from official sources:

  1. Release status — is it a GA announcement, a release candidate, or a scheduled branch? The PHP release announcements index and the supported versions page are the authoritative places to check, including the active-support and security-support windows for each branch.
  2. Changed behavior — the per-branch migration guide in the PHP manual's appendices, which is where Migrating from PHP 8.5.x to PHP 8.6.x would live if it exists. I'm deliberately not linking a migration page directly here, because I could not verify its URL from the supplied material and a 404 in a security post is worse than a missing link.
  3. Fixed issues — the PHP 8 changelog, plus php-src security advisories where the project published one for a given fix.

The evidence table you actually fill in

Build this table before writing a single line of migration code. If a row can't be completed, the change doesn't get a test yet — it gets a TODO and a name against it.

Reported changePrimary reference (URL + section)Previous behaviorNew behaviorAffected config keyApp impactTest ID
"tightens security defaults" (Mezha.net, 2026-11-21)unverified — no setting named in the supplied snippetunknownunknownunknownunknown—
"adds new features" (Mezha.net, 2026-11-21)unverified — no feature namedn/aunknownn/anone until adopted—
"versions to patch" (NeoTeo, 2026-11-20)unverified — no CVE, no version range in the snippetn/an/an/aunknown exposure—

A table where every row says "unverified" is a legitimate deliverable. It documents exactly how much work separates you from a plan. What's not legitimate is writing verify_peer or session.use_strict_mode into that table because it "sounds like a security default" — that's how a rumor becomes a Jira epic.

Inventory the Runtime That Actually Serves Requests

CLI, config, extensions, dependencies

The PHP version your shell sees is frequently not the version your users hit. Capture all four layers.

php -v
php --ini
php -m
composer check-platform-reqs

What each one establishes, and what it doesn't:

CommandEstablishesDoes not establish
php -vCLI binary version, build date, Zend/OPcache versionThe FPM or web-module version — those are separate binaries and can be out of sync
php --iniLoaded php.ini path, scan directory, every additional .iniWhich settings those files actually override at runtime
php -mExtensions compiled or loaded for the CLI SAPIExtensions available to FPM, which may use a different scan dir
composer check-platform-reqsInstalled PHP version and extensions vs. composer.lock requirementsAnything about non-Composer extensions loaded via dl() or a distro package

Map the binary back to its package before you trust the version string:

dpkg -S "$(readlink -f "$(command -v php)")"
apt-cache policy php8.4-fpm

Comparing CLI, FPM, and worker runtimes safely

For FPM, you want the effective configuration without ever publishing php -i output. Two rules that have never failed me:

  • Never expose phpinfo(), php -i, or php-fpm -i on a reachable URL. php -i prints environment variables, filesystem paths, and sometimes credentials that leaked into the environment.
  • Never run php-fpm -tt (config dump) into a shared log. php-fpm -t — syntax check only — is fine.

To read the effective FPM configuration from the safety of a shell, point the CLI at the same ini files FPM uses and run your own script against them:

PHP_INI_SCAN_DIR=/etc/php/8.4/fpm/conf.d \
  php -c /etc/php/8.4/fpm/php.ini compat-probe.php --label=fpm-effective

The paths are Debian-style; on RHEL-family images the scan dir is typically /etc/php.d. The trick is that ini_get() then reflects the FPM ini set, not your CLI's set, without ever exposing a web-accessible diagnostics page.

OS packages, container digests, and backports

An upstream version string is not a patch status. Distributions backport security fixes into older upstream versions, so PHP 8.3.x on Debian stable may carry fixes that the same upstream version elsewhere does not — and vice versa for an unpatched third-party build.

Record, per host or image:

docker image inspect --format '{{index .RepoDigests 0}}' php:8.4-fpm
rpm -q --changelog php-fpm | head -n 40
dnf updateinfo list --security

The first pins the exact artifact content. The other two show whether your vendor's changelog actually contains the fix, which is the only trustworthy answer for a distro package.

Build a Reproducible Baseline and Candidate Environment

Hold everything constant except the runtime

Baseline and candidate must differ in exactly one dimension. Concretely:

  • same application commit SHA
  • same composer.lock (byte-identical, verified by hash)
  • same sanitized database fixture, loaded from a seed script in the repo
  • same explicit configuration inputs, injected as env vars — not copied from a dev's php.ini

If you change the runtime and a composer update, a failure tells you nothing about which change caused it. That sounds obvious. It's still the most common mistake I see in upgrade branches.

Pin by digest; do not invent tags

Verify the image tag exists before you reference it. Never write php:8.6-fpm into a Dockerfile on the assumption that the tag will be there — and never assume a pre-release artifact reflects final release behavior.

## Verify, then pin the digest you actually tested against
docker run --rm php:8.4-fpm php -v
docker image inspect --format '{{index .RepoDigests 0}}' php:8.4-fpm

Then reference the digest, not the tag, in the candidate compose file:

services:
  app:
    # illustrative shape — substitute the digest you verified on your own registry
    image: php:8.4-fpm@sha256:<digest-you-verified>

Two comparisons, not one

This is the part teams skip. The matrix has two independent axes:

ComparisonBaselineCandidateQuestion it answers
A — patchcurrently deployed buildsupported patched build on the same branchDid the security patch break anything?
B — migrationpatched build from Averified PHP 8.6 candidateDoes our code run on 8.6?

If you only run comparison B, you can't tell whether a failure came from the patch or the version bump. If you only run A, you ship security fixes but never learn your 8.6 readiness. Run A first; it has the nearer deadline.

Turn Confirmed Default Changes into Compatibility Tests

Trace default → effective config → behavior

A changed PHP default means nothing on its own. Three things can happen to it:

  1. It applies. No local override exists, so behavior changes silently.
  2. It's masked. An ini_set() call, a pool-level directive, or a .user.ini file overrides it — and the override may now be less secure than the new default, which is the interesting case nobody checks.
  3. It's frozen. php_admin_value / php_admin_flag in the FPM pool can't be overridden at runtime, so ini_set() in application code silently fails and the deployment config wins.

The third case matters: php_admin_value beats ini_set(). If your pool file pins a security-relevant setting, no amount of application-level hardening will move it. And .user.ini files only take effect under CGI/FastCGI SAPIs — they're ignored by CLI, which is a classic reason a fix "works in testing" and not in production.

Read the effective value, not the documented one. The probe below records both ini_get() (effective now) and get_cfg_var() (what php.ini said) for each key, so a divergence tells you who set it.

Concretely, here's how I'd trace a hypothetical tightened session default once it's verified — and the same method works today on settings you can check immediately, like session.use_strict_mode (documented default 0) and session.cookie_samesite:

LayerWhere it livesWins over
Compiled defaultphp-srcnothing
php.ini/etc/php/<v>/fpm/php.inicompiled default
Scan dir/etc/php/<v>/fpm/conf.d/*.iniphp.ini
.user.iniapp docroot, CGI/FastCGI onlyphp.ini and scan dir
ini_set()application codeeverything except php_admin_*
php_admin_value / php_admin_flagFPM pool configeverything
SetEnvweb server confignothing — it's $_SERVER, not ini_get()

That last row bites people. SetEnv APP_ENV=prod does not set an ini value, and ini_get('APP_ENV') returns false.

Pick test categories after verification, not before

Once a specific change is confirmed, the relevant categories follow from it. Reasonable buckets to have ready:

  • outbound TLS and certificate verification
  • session and cookie handling (strict mode, SameSite, Secure, regeneration)
  • input parsing and type juggling boundaries
  • filesystem and permission behavior
  • serialization and JSON edge cases

To be unambiguous: I am not claiming PHP 8.6 changes any of these. They're the categories where tightened defaults historically produce breakage, so they're the ones I instrument first. Which of them get a written test depends entirely on what the migration guide says.

Positive and negative assertions, both

Compatibility does not mean "the app works." It means valid workflows still succeed and unsafe ones are still rejected. A test suite that only asserts the happy path will happily pass on a runtime where certificate verification got disabled.

CheckPositive assertionNegative assertion
TLSvalid host over verified TLS succeedshostname-mismatched cert is rejected
Sessionlogin → session persists → logoutattacker-supplied unknown session ID is discarded
Deserializationknown-good payload restoresobject payload with allowed_classes=false yields incomplete class
Uploadsallowed MIME type accepteddisallowed type rejected with 4xx, not a warning

If the negative assertion fails after an upgrade, you have not found a compatibility problem. You've found a security regression, and it takes priority over everything else in this article.

Build One Executable PHP Compatibility Probe

The probe

One file, no Composer dependencies, JSON on stdout, non-zero exit on any failure. It captures runtime identity, effective settings, representative application behaviors, and — optionally, opt-in — two TLS assertions.

compat-probe.php
<?php
declare(strict_types=1);

/**
* compat-probe.php — dependency-light runtime + behavior probe.
* Usage: php compat-probe.php --label=baseline [--network] [--host=www.php.net]
*
* Writes JSON to stdout. Exit code 1 if any check fails or errors.
* Treat the output as internal: it contains filesystem paths, not secrets.
*/

final class CompatProbe
{
  /** @var array<int, array<string, mixed>> */
  private array $checks = [];

  public function __construct(
      private readonly string $label,
      private readonly bool $network,
      private readonly string $host,
  ) {}

  public function run(): array
  {
      $this->identity();
      $this->settings();
      $this->extensions();
      $this->behavior();

      if ($this->network) {
          $this->tls();
      }

      return [
          'label' => $this->label,
          'generated_at' => gmdate('c'),
          'checks' => $this->checks,
          'summary' => $this->summary(),
      ];
  }

  private function summary(): array
  {
      $counts = ['pass' => 0, 'fail' => 0, 'error' => 0, 'info' => 0];
      foreach ($this->checks as $check) {
          $counts[$check['status']]++;
      }
      return $counts;
  }

  private function info(string $name, mixed $value): void
  {
      $this->checks[] = [
          'check' => $name,
          'status' => 'info',
          'expected' => null,
          'actual' => $value,
      ];
  }

  private function assertSame(string $name, callable $fn, mixed $expected): void
  {
      try {
          $actual = $fn();
      } catch (Throwable $e) {
          $this->checks[] = [
              'check' => $name,
              'status' => 'error',
              'expected' => $expected,
              'actual' => $e::class . ': ' . $e->getMessage(),
          ];
          return;
      }

      $this->checks[] = [
          'check' => $name,
          'status' => $actual === $expected ? 'pass' : 'fail',
          'expected' => $expected,
          'actual' => $actual,
      ];
  }

  private function identity(): void
  {
      $this->info('php.version', PHP_VERSION);
      $this->info('php.version_id', PHP_VERSION_ID);
      $this->info('php.sapi', PHP_SAPI);
      $this->info('php.os', PHP_OS_FAMILY . ' ' . php_uname('m'));
      $this->info('php.int_size', PHP_INT_SIZE);
      $this->info('php.ini_loaded', php_ini_loaded_file() ?: null);
      $this->info('php.ini_scanned', php_ini_scanned_files() ?: null);
      $this->info('openssl.version', defined('OPENSSL_VERSION_TEXT') ? OPENSSL_VERSION_TEXT : null);
  }

  private function settings(): void
  {
      $keys = [
          'session.use_strict_mode',
          'session.use_only_cookies',
          'session.cookie_secure',
          'session.cookie_httponly',
          'session.cookie_samesite',
          'openssl.cafile',
          'openssl.capath',
          'allow_url_fopen',
          'allow_url_include',
          'open_basedir',
          'display_errors',
          'log_errors',
          'error_reporting',
          'zend.assertions',
          'serialize_precision',
          'default_socket_timeout',
          'date.timezone',
          'upload_max_filesize',
          'post_max_size',
          'memory_limit',
      ];

      $settings = [];
      foreach ($keys as $key) {
          $effective = ini_get($key);
          $fromIni = get_cfg_var($key);
          $settings[$key] = [
              'effective' => $effective === false ? null : $effective,
              'php_ini' => $fromIni === false ? null : $fromIni,
          ];
      }

      $this->info('ini.settings', $settings);
  }

  private function extensions(): void
  {
      $required = ['json', 'openssl', 'session', 'mbstring', 'pdo', 'tokenizer', 'ctype'];
      $state = [];
      foreach ($required as $ext) {
          $state[$ext] = extension_loaded($ext);
      }
      $this->info('ext.required', $state);

      // Report only the extensions that commonly differ across images.
      $watch = ['intl', 'sodium', 'zip', 'opcache', 'gd', 'imagick', 'pdo_mysql', 'pdo_pgsql', 'redis'];
      $this->info('ext.watched', array_values(array_intersect($watch, get_loaded_extensions())));

      $this->assertSame('ext.json_loaded', static fn (): bool => extension_loaded('json'), true);
  }

  private function behavior(): void
  {
      $this->assertSame(
          'json.encode_stable',
          static fn (): string => json_encode(['a' => 1, 'b' => [1, 2]], JSON_THROW_ON_ERROR),
          '{"a":1,"b":[1,2]}'
      );

      // Informational: depends on serialize_precision. A diff between
      // baseline and candidate is a lead, not automatically a regression.
      $this->info('json.float_repr', json_encode(['v' => 0.1 + 0.2]));

      $this->assertSame(
          'password.hash_roundtrip',
          static function (): bool {
              $hash = password_hash('probe-not-a-secret', PASSWORD_DEFAULT);
              return is_string($hash) && password_verify('probe-not-a-secret', $hash);
          },
          true
      );

      $this->assertSame(
          'hash.timing_safe_compare',
          static fn (): bool => hash_equals('abc', 'abc') && !hash_equals('abc', 'abd'),
          true
      );

      $this->assertSame(
          'datetime.utc_format',
          static fn (): string => (new DateTimeImmutable('2026-11-21T01:10:35+00:00'))
              ->setTimezone(new DateTimeZone('UTC'))
              ->format('Y-m-dTH:i:sZ'),
          '2026-11-21T01:10:35Z'
      );

      $this->assertSame(
          'datetime.epoch_parse',
          static fn (): int => strtotime('2026-11-21T01:10:35Z'),
          1795223435
      );

      $this->assertSame(
          'serialize.allowed_classes_guard',
          static function (): int {
              $payload = serialize(new ArrayObject([1, 2, 3]));
              $restored = unserialize($payload, ['allowed_classes' => false]);
              return $restored instanceof __PHP_Incomplete_Class ? 0 : 1;
          },
          0
      );

      $this->assertSame(
          'mb.substr_utf8',
          static fn (): ?string => function_exists('mb_substr')
              ? mb_substr('naïve', 1, 2, 'UTF-8')
              : null,
          'aï'
      );

      // Only meaningful if intl is a declared dependency of the project.
      $this->assertSame(
          'intl.normalizer',
          static fn (): ?bool => class_exists('Normalizer')
              ? Normalizer::normalize("é", Normalizer::FORM_C) === "é"
              : null,
          true
      );

      $this->assertSame(
          'fs.temp_roundtrip',
          static function (): string {
              $path = tempnam(sys_get_temp_dir(), 'probe');
              if ($path === false) {
                  throw new RuntimeException('tempnam failed');
              }
              try {
                  file_put_contents($path, "probe
");
                  return trim((string) file_get_contents($path));
              } finally {
                  @unlink($path);
              }
          },
          'probe'
      );
  }

  private function tls(): void
  {
      $this->assertSame(
          'tls.valid_host_accepted',
          fn (): string => $this->tlsFetch($this->host, $this->host),
          'ok'
      );

      $this->assertSame(
          'tls.mismatched_hostname_rejected',
          function (): string {
              try {
                  $this->tlsFetch($this->host, 'wrong.example.invalid');
              } catch (RuntimeException) {
                  return 'rejected';
              }
              return 'accepted';
          },
          'rejected'
      );
  }

  private function tlsFetch(string $host, string $peerName): string
  {
      $context = stream_context_create([
          'ssl' => [
              'verify_peer' => true,
              'verify_peer_name' => true,
              'peer_name' => $peerName,
              'SNI_enabled' => true,
          ],
          'http' => [
              'method' => 'HEAD',
              'timeout' => 5,
              'user_agent' => 'hackyjs-compat-probe/1',
          ],
      ]);

      $response = @file_get_contents('https://' . $host, false, $context);
      if ($response === false) {
          throw new RuntimeException(error_get_last()['message'] ?? 'TLS request failed');
      }
      return 'ok';
  }
}

$options = getopt('', ['label:', 'network', 'host:']);

$probe = new CompatProbe(
  label: $options['label'] ?? 'unlabeled',
  network: array_key_exists('network', $options),
  host: $options['host'] ?? 'www.php.net',
);

$report = $probe->run();

echo json_encode($report, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_THROW_ON_ERROR), PHP_EOL;

$failures = $report['summary']['fail'] + $report['summary']['error'];
exit($failures > 0 ? 1 : 0);

Two deliberate design choices worth calling out. First, the TLS checks are opt-in via --network, so the probe runs in an air-gapped CI job and only makes outbound requests when you ask. Second, the certificate-mismatch test uses peer_name rather than a self-signed local server — it needs no infrastructure and it directly asserts that name verification is on.

Run it on both sides and diff

php compat-probe.php --label=baseline  > baseline.json;  echo "baseline exit=$?"
php compat-probe.php --label=candidate > candidate.json; echo "candidate exit=$?"

diff <(jq -S . baseline.json) <(jq -S . candidate.json)
jq -r '.checks[] | select(.status != "pass" and .status != "info") | [.check, .status] | @tsv' candidate.json

Expected output, failure output, and what they mean

Illustrative pass shape — note that every entry carries expected and actual so a diff is self-describing:

{
  "label": "candidate",
  "checks": [
    { "check": "php.version", "status": "info", "expected": null, "actual": "8.4.<patch>" },
    { "check": "json.encode_stable", "status": "pass", "expected": "{\"a\":1,\"b\":[1,2]}", "actual": "{\"a\":1,\"b\":[1,2]}" },
    { "check": "serialize.allowed_classes_guard", "status": "pass", "expected": 0, "actual": 0 },
    { "check": "tls.mismatched_hostname_rejected", "status": "pass", "expected": "rejected", "actual": "rejected" }
  ],
  "summary": { "pass": 10, "fail": 0, "error": 0, "info": 4 }
}

Illustrative failure — this is what a verification regression looks like, and it is not a compatibility bug:

{ "check": "tls.mismatched_hostname_rejected", "status": "fail", "expected": "rejected", "actual": "accepted" }

And an illustrative error, which is usually a missing extension rather than a code problem:

{ "check": "mb.substr_utf8", "status": "error", "expected": "aï", "actual": "Error: Call to undefined function mb_substr()" }

Interpretation limits

Be honest about what this buys you. A configuration difference between baseline and candidate is a lead: it tells you which setting to investigate. It does not tell you whether a user workflow broke. Only the application-level assertions — session continuity, authenticated requests, background jobs — establish that. The probe narrows the search space; it doesn't close it.

The same applies to any behavior I claimed above. strtotime('2026-11-21T01:10:35Z') === 1795223435 is arithmetic, not a PHP 8.6 claim. Everything in the probe is either documented current behavior or baseline-relative comparison.

Exercise Application Boundaries in Staging

Dependencies and the real test suite

composer check-platform-reqs --lock
composer why-not php 8.6.0
php -d error_reporting=E_ALL -d display_errors=stderr \
  vendor/bin/phpunit --display-deprecations --fail-on-deprecation

--lock checks the platform requirements recorded in composer.lock rather than the installed set, which is what you want for a hermetic CI gate. composer why-not does constraint analysis against your dependency graph — it tells you which packages are blocking the version bump, without asserting anything about whether that version has been released. The PHPUnit flags require 10.5+/11; on older versions, parse deprecations out of the JUnit XML instead.

Read the output as four separate streams, because they have four different owners:

SignalMeaningOwner
E_DEPRECATEDAPI scheduled for removalapplication code
E_WARNING / noticesbehavior that changed under youapplication code
Uncaught exceptionhard breakapplication or dependency
"extension not loaded"environment/package problemplatform

Lumping all four into "tests failed" wastes a day.

php -l across the tree only catches parse errors — it will not surface a single deprecation. Don't use it as a compatibility gate.

Boundaries worth exercising

Where the verified change list or your architecture makes them relevant:

  • authenticated request flows, including session ID rotation at login
  • session continuity across a rolling restart
  • background workers and queue consumers (these run their own long-lived PHP process — often the oldest binary in the fleet)
  • cron and scheduled commands
  • file uploads, including a rejected-type case
  • outbound integrations against local mock services

Example staging checks with placeholder hosts:

curl -sS -o /dev/null -w '%{http_code}\n' https://staging.example.test/health
curl -sS -c cookies.txt -b cookies.txt \
  -H 'Content-Type: application/json' \
  -d @login-fixture.json \
  -X POST https://staging.example.test/api/login

Negative-test safety rules

These are non-negotiable for me:

  • use synthetic accounts and local mock services, never production credentials
  • never point a negative TLS test at a third party you don't control
  • never "fix" a TLS failure with verify_peer => false — not in tests, not temporarily

That last one deserves its own callout.

⚠️

If an outbound TLS call starts failing after a runtime upgrade, the cause is almost always a CA bundle path, a hostname, or a protocol/cipher change — not a reason to disable verification. Fix openssl.cafile/openssl.capath, pin the private CA explicitly, or correct peer_name. Turning off verify_peer converts a compatibility incident into an interception vulnerability.

Fix Compatibility Without Undoing the Security Improvement

Classify before you patch

Failure classTypical symptomCorrect fixWrong fix
Application assumptioncode relies on a behavior the default changedupdate the code, add regression testrestore the old default globally
Dependency limitationa library caps the PHP version or uses a removed APIupgrade the library, or pin and file upstreamfork silently
Extension issueCall to undefined functioninstall/pin the extension in the imagepolyfill a security-relevant primitive
Configuration mismatcheffective value differs from expectationcorrect the pool/ini sourceadd ini_set() that php_admin_value overrides
Intentional security rejectiona connection or input is now refusedfix the caller/payloadswitch verification or validation off

Prefer code over relaxation

When a private CA is the issue, scope it to the one host and keep verification on:

// scoped exception: trust a partner's private CA for one outbound host only
$context = stream_context_create([
    'ssl' => [
        'verify_peer' => true,
        'verify_peer_name' => true,
        'cafile' => '/etc/ssl/private/partner-ca.pem',
    ],
]);

$response = file_get_contents('https://partner.internal/api/health', false, $context);

Compare that to the version someone always proposes in the incident channel: a blanket verify_peer => false in a shared HTTP client, which disables verification for every outbound call in the application. The first is a scoped compatibility fix. The second is a new vulnerability with a Jira ticket.

Make every exception expire

Any temporary compatibility exception needs a record, or it becomes permanent:

FieldValue
Ownernamed engineer, not a team alias
Scopeexact config key / host / code path
Justificationlink to the verified change that caused it
Expirydate, with a calendar reminder
Regression coveragetest ID that fails if the exception is removed

And every fix needs its evidence trail: failing assertion → official change reference → remediation → passing result on both the patched supported branch and the candidate. If it only passes on one, it isn't fixed, it's relocated.

Patch Existing Production Deployments on Their Own Track

Derive versions from primary sources

The supplied NeoTeo summary says "November 2026 PHP security updates: versions to patch." It does not say which versions, which CVEs, or which fixed builds. I cannot derive an affected or fixed version list from that. Neither can you. Get it from:

If the advisory names a fixed version you can't get from your vendor, that's a migration forcing function, not a reason to wait.

Validate the patch in staging

Focused smoke tests, scaled to exposure and severity:

  • health endpoint and one authenticated read/write path
  • the extension or feature named in the advisory
  • a documented security regression test, where a safe one exists
  • error rate and worker restart behavior for 15 minutes of real-shaped traffic

Add the probe run before and after, gated on exit code:

php compat-probe.php --label=pre-patch  > pre.json  || exit 1
## deploy patched package
php compat-probe.php --label=post-patch > post.json || exit 1
diff <(jq -S . pre.json) <(jq -S . post.json)

A same-branch patch should produce an identical probe diff except for php.version. If it doesn't, you've found something more interesting than a version bump.

Handle unsupported branches explicitly

If a deployed branch is past end-of-life, upstream will not fix it. The supported versions page is the authority on that. Your options are vendor-maintained extended support (commercial distro LTS programs exist for exactly this), or migration to a supported branch. What isn't an option is assuming the next upstream point release covers you — it won't, and a distro version string that "looks current" doesn't change that.

Roll Out with Explicit Gates and a Tested Rollback

Promotion gates

Measure the baseline first, then require the candidate to match it. No invented percentages — use your own numbers.

GateThreshold (set from your baseline)Evidence source
Probe exit code0, and no new fail/errorprobe JSON diff
Platform requirementscomposer check-platform-reqs --lock exit 0CI log
Test suitepass, zero new deprecationsPHPUnit output
HTTP 5xx ratewithin the pre-change bandaccess logs
Worker failuresno new failure classqueue/worker logs
p95 latencywithin the pre-change bandyour APM

Canary the two tracks separately

If you can, canary the patched runtime first — it's the narrow change. Ship it, let it run through at least one full scheduled-job cycle, and only then start the 8.6 canary. Combining them means a rollback reverts both and you learn nothing about either.

Watch real traffic and real scheduled workloads. And resist the urge to claim a performance win from a version bump you haven't benchmarked; a number without a machine, a command, and a comparison point is a rumor.

Rollback that you've actually tested

  • Retain the previous image digest and package version. A rollback you can't execute in ten minutes isn't a rollback.
  • Check session and data-format compatibility before you need to roll back. If the candidate wrote session data or serialized payloads the old runtime can't read, rollback is one-way.
  • Document the uncomfortable case: rolling back to a known-vulnerable build re-opens the vulnerability. If that's the only option, the rollback plan needs compensating controls — WAF rules, feature disablement, or tightened network policy — written down in advance, not improvised at 3am.
📝

A rollback plan that silently restores a known-vulnerable runtime is an incident plan, not a deployment plan. Say so in the change record so nobody discovers it during the rollback.

Final Decision Checklist: Patch Verified Exposure, Migrate Verified Behavior

Approve only when every line below has an answer and an owner.

Evidence

  • PHP 8.6 release status confirmed from the official releases page — GA, RC, or scheduled
  • Migration guide located and read; every affected default copied into the evidence table with a URL and section
  • Security fixes attributed to specific CVEs and fixed versions from PHP changelogs or the distro tracker
  • No row in the evidence table still says "unverified" for anything a decision depends on

Runtime inventory

  • CLI, FPM, web-integration, and worker versions recorded separately
  • Effective ini settings captured for each SAPI, with php_admin_value overrides identified
  • Extensions, OS packages, vendor support status, and image digests recorded

Compatibility

  • Baseline and candidate use the same commit, composer.lock, and fixtures
  • Comparison A (deployed vs. patched) passed and shipped
  • Comparison B (patched vs. 8.6 candidate) passed, with positive and negative assertions
  • No verify_peer => false, no disabled input validation, no unpinned temporary exceptions

Rollout

  • Promotion gates derived from a measured baseline, not a guess
  • Canary covers scheduled and background workloads, not just HTTP
  • Rollback tested, with the known-vulnerability case documented

The point, restated: the November 2026 headlines are investigation leads. They are not evidence of a specific PHP 8.6 default change, and they are not evidence of which versions need patching. Patch the exposure you can verify, on the branch you actually run, this week. Migrate the behavior you can verify, on a candidate you can reproduce, when the evidence exists to test it.

Further Reading

Primary sources for this topic

Distribution trackers

Secondary reporting (leads, not evidence)

These are the two summaries that prompted this post. Both were supplied as headline-and-snippet items; I used them to decide what to investigate and did not use them to justify any technical recommendation above.

  • Mezha.net, 2026-11-21 — "PHP 8.6 tightens security defaults and adds new features" — discovery link
  • NeoTeo, 2026-11-20 — "PHP security updates November 2026: versions to patch" — discovery link

Share this post

More posts

Loading comments…