Allow Unit (Core) tests to reuse the CLI OPcache file cache

Unit (Core) installs dependencies as root and runs PHPUnit as www-data. The PHP 8.5 image change enables a CLI OPcache file cache and creates its directory, but PHP creates private 0700 cache subdirectories. A cache populated by Composer is therefore inaccessible to the test user, which recompiles the scripts instead.

Include /var/cache/opcache-cli in the existing directory creation and ownership setup after Composer. This lets www-data reuse the scripts cached by Composer. Creating the directory on an image without that cache configured is harmless; it does not enable file caching.

Validation: reproduced the ownership failure and confirmed that the handoff enables cache writes by www-data. Compile-time deprecation output is identical with cold and warm caches. Performance measurements are available in !17363 (closed) and its measurement pipeline.

The Views modal-title test also waits for visibility before reading the title. Its AJAX wait can finish before the deferred dialog resize, leaving the heading outside the clipped viewport. The diagnostic job reproduced the failure in all 12 repetitions with CLI caching enabled and all 12 with it disabled; the visibility-wait validation passed all repetitions and the normal shard.

Closes #3628411

Edited by Andrey Postnikov

Merge request reports

Loading
Loading