PhpVersionsSyncTest
class PhpVersionsSyncTest extends TestCase (View source)
Guards against drift between PhpVersions.php and everything keyed off it: the reflection cache files, the pinned-patch manifest, the per-version Docker images, and the EARLIEST/LATEST boundary constants.
When a new PHP version is added to PhpVersions.php, the corresponding Reflection{X.Y}.json cache file must also be generated. These tests catch that omission in CI before validators silently skip the new version.
Constants
| private EXTENSION_SENTINELS |
One representative symbol per extension the per-version Docker images build, and the PHP
version that dropped the extension from core ( Every entry is a sentinel, not an inventory: if the symbol is in the cache the extension was loaded when that version's reflection cache was generated, and all of its symbols came with it. Extensions whose only symbols are PDO drivers (pdo_mysql, pdo_odbc, …) are absent from the list on purpose — they expose nothing reflectable of their own. |
Methods
No description
No description
EARLIEST/LATEST are hand-maintained, and ~456 CheckDescriptors are ranged against LATEST.
No description
No description
The per-version Dockerfiles are maintained by hand, and an extension that fails to build on one Alpine edge snapshot tends to get commented out to get the image green again. Nothing noticed: the cache for that version is simply generated without the extension, every entity it declares becomes invisible to the validators, and the suite goes green because there is nothing left to compare. 696 entities were missing at LATEST when this guard was written — tidy, odbc, xsl, ftp, gettext, exif and mbstring, all still bundled with PHP.
No description
Details
protected void
setUp()
No description
void
testEachPhpVersionHasReflectionCacheFile()
No description
void
testEarliestAndLatestPointAtTheBoundaryCases()
EARLIEST/LATEST are hand-maintained, and ~456 CheckDescriptors are ranged against LATEST.
Adding a case without bumping LATEST silently yields zero test cases for the new version (PhpVersionRange::includes() returns false) while every other test still passes.
void
testEachPhpVersionHasAPinnedPatchInTheManifest()
No description
void
testEachPhpVersionHasADockerImage()
No description
void
testExtensionCoverageNeverRegressesBetweenVersions()
The per-version Dockerfiles are maintained by hand, and an extension that fails to build on one Alpine edge snapshot tends to get commented out to get the image green again. Nothing noticed: the cache for that version is simply generated without the extension, every entity it declares becomes invisible to the validators, and the suite goes green because there is nothing left to compare. 696 entities were missing at LATEST when this guard was written — tidy, odbc, xsl, ftp, gettext, exif and mbstring, all still bundled with PHP.
The rule is monotonic coverage: once an extension appears in some version's cache it must appear in every later one, unless EXTENSION_SENTINELS declares the release that dropped it from core. That way a genuine unbundling (imap, pspell, wddx) is a one-line declaration and a broken image build is a failure.
void
testNoOrphanedReflectionCacheFiles()
No description