Repository navigation
4.7.2
4.7.2
Fixed
- Unhook core icon registration after the first
initin the bundled core PHPUnit suite, matching WordPress 7.1's test suite, to avoid duplicate icon registration errors wheninitre-fires (#819). (thanks @jonwaldstein) - The scaffold snapshot tests normalize
WORDPRESS_VERSIONintests/.envto a placeholder, so a new WordPress release no longer breaks them (#819). MysqlServerControllernow probes the configured port with a PDO handshake before starting a server: a MySQL instance reachable on the port is reused instead of racing to start (and download) a second one. Fixesparallel-runworkers, whose per-worker output dirs hid the shared server's PID file (#812).parallel-runprintsFAILURES!instead ofOKwhen a worker crashes before reporting results (#812).parallel-runresolves the managed MySQL data dir throughcodecept_output_dir()instead of a hardcodedvar/_outputpath that ignoredpaths.outputoverrides and broke the 103-char unix socket path limit on deep checkouts (#812).
Changed
-
The
integrationsuite now runs throughparallel-run --workers=autoin CI, like theunitsuite. Integration test classes that rebuilt an identical WordPress installation per test (theInstallationStategetter tests among others) now share a per-class cached installation; duplicated tests were merged into data providers and five DB-free test files moved to theunitsuite. Suite behavior and coverage are unchanged, wall time drops by several minutes per job (#815). -
The
unitsuite is split in two:tests/unitnow holds only real unit tests (no WordPress, no database, no managed services) and the newtests/integrationsuite holds the 33 test files that load WordPress, hit MySQL, or drive a real installation (allassertInIsolation-basedWPLoader*/LoadSandboxtests included). TheBuiltInServerController,ChromeDriverControllerandMysqlServerControllerextensions are now scoped via their existingsuitesoption socodecept run unitstarts no servers. -
Utils\Filesystem::rrmdir()andrecurseCopy()now delegate to the bundledsymfony/filesystemcomponent instead of a hand-rolled recursive delete and acp -R/xcopyshell-out; public signatures are unchanged, and failure paths that previously threw (unreadable dir, uncreatable destination) now returnfalselike the other failure modes (#812).
Removed
-
The unit test suite no longer loads
php-stubs/wordpress-stubsin the main process: the few WordPress functions the fork-based tests need are shimmed in the fork child, and a minimal autoloadablewpdbdouble replaces the stub class. Groundwork for fork-based test isolation, where a stub-free parent process is required to load real WordPress in children (#814). -
Remove dead code: the unused
Module\WPLoader\Filters/FiltersGroupclasses (not wired toWPLoadersince v4),WordPress\FileRequests\FilePostRequestwithFileRequestFactory::buildPostRequest(), the write-onlyFileRequest::setServerVar()/setConstant(), the decorativeWordPress\CodeExecution\CodeExecutionActionInterface,Utils\Composer::allowPluginsFromPackage()/getDecodedContents(),Generators\Date::zero(),Project\TestEnvironment::$dumpFile,ManagedProcessInterface::ERR_STOPand the unreachable PHPUnit<8.0branch ofWPTestCasePHPUnitMethodsTrait(the package requires PHP ^8.0). No user-facing API is affected (#813). -
Remove dead internal classes:
Utils\DockerCompose,Environment\Constants,Events\EventDispatcherException,Polyfills\Dotenv\Dotenvand theWordPress\CodeExecutionExitAction/ThrowActiontest doubles. No user-facing API is affected (#812). -
Drop the v3.5 downgrade Rector harness (
config/rector-35.php,config/composer-35.json, theRemoveTypeHinting/DowngradePhpOsFamily/SerializableThrowableCompatibilityRectorrules, thebin/build-35-*build scripts, and the deadbuild_35Makefile target) frommaster; it now lives entirely on the v3.5 branch (#810).