Skip to content

4.7.2

Choose a tag to compare

@lucatume lucatume released this 26 Aug 08:36
· 3 commits to master since this release

4.7.2

Fixed

  • Unhook core icon registration after the first init in the bundled core PHPUnit suite, matching WordPress 7.1's test suite, to avoid duplicate icon registration errors when init re-fires (#819). (thanks @jonwaldstein)
  • The scaffold snapshot tests normalize WORDPRESS_VERSION in tests/.env to a placeholder, so a new WordPress release no longer breaks them (#819).
  • MysqlServerController now 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. Fixes parallel-run workers, whose per-worker output dirs hid the shared server's PID file (#812).
  • parallel-run prints FAILURES! instead of OK when a worker crashes before reporting results (#812).
  • parallel-run resolves the managed MySQL data dir through codecept_output_dir() instead of a hardcoded var/_output path that ignored paths.output overrides and broke the 103-char unix socket path limit on deep checkouts (#812).

Changed

  • The integration suite now runs through parallel-run --workers=auto in CI, like the unit suite. Integration test classes that rebuilt an identical WordPress installation per test (the InstallationState getter 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 the unit suite. Suite behavior and coverage are unchanged, wall time drops by several minutes per job (#815).

  • The unit suite is split in two: tests/unit now holds only real unit tests (no WordPress, no database, no managed services) and the new tests/integration suite holds the 33 test files that load WordPress, hit MySQL, or drive a real installation (all assertInIsolation-based WPLoader*/LoadSandbox tests included). The BuiltInServerController, ChromeDriverController and MysqlServerController extensions are now scoped via their existing suites option so codecept run unit starts no servers.

  • Utils\Filesystem::rrmdir() and recurseCopy() now delegate to the bundled symfony/filesystem component instead of a hand-rolled recursive delete and a cp -R/xcopy shell-out; public signatures are unchanged, and failure paths that previously threw (unreadable dir, uncreatable destination) now return false like the other failure modes (#812).

Removed

  • The unit test suite no longer loads php-stubs/wordpress-stubs in the main process: the few WordPress functions the fork-based tests need are shimmed in the fork child, and a minimal autoloadable wpdb double 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/FiltersGroup classes (not wired to WPLoader since v4), WordPress\FileRequests\FilePostRequest with FileRequestFactory::buildPostRequest(), the write-only FileRequest::setServerVar()/setConstant(), the decorative WordPress\CodeExecution\CodeExecutionActionInterface, Utils\Composer::allowPluginsFromPackage()/getDecodedContents(), Generators\Date::zero(), Project\TestEnvironment::$dumpFile, ManagedProcessInterface::ERR_STOP and the unreachable PHPUnit <8.0 branch of WPTestCasePHPUnitMethodsTrait (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\Dotenv and the WordPress\CodeExecution ExitAction/ThrowAction test doubles. No user-facing API is affected (#812).

  • Drop the v3.5 downgrade Rector harness (config/rector-35.php, config/composer-35.json, the RemoveTypeHinting/DowngradePhpOsFamily/SerializableThrowableCompatibilityRector rules, the bin/build-35-* build scripts, and the dead build_35 Makefile target) from master; it now lives entirely on the v3.5 branch (#810).