Skip to content

fix: opcache_preload in PHP 8.2#2284

Open
AlliBalliBaba wants to merge 7 commits intomainfrom
fix/opcache-preload-on-82
Open

fix: opcache_preload in PHP 8.2#2284
AlliBalliBaba wants to merge 7 commits intomainfrom
fix/opcache-preload-on-82

Conversation

@AlliBalliBaba
Copy link
Contributor

@AlliBalliBaba AlliBalliBaba commented Mar 14, 2026

Fixes the Docker image tests currently failing in CI.

@AlliBalliBaba
Copy link
Contributor Author

Looks like race condition in PHP 8.2, unrelated to any recent changes. Not sure if people are actually experiencing this or if it just happens in tests.

@henderkes
Copy link
Contributor

What's the point in moving the tests to caddy?

@AlliBalliBaba
Copy link
Contributor Author

Moving to caddy was just an experiment, will probably move them back.

@AlliBalliBaba AlliBalliBaba marked this pull request as ready for review March 15, 2026 19:07
@AlliBalliBaba
Copy link
Contributor Author

This branch now just deactivates the opcache_preload test in PHP 8.2 and fixes a test in the windows binary. The race condition probably only happens in tests since there were no related issues brought up yet, but we should keep it in mind if anything similar comes up in the future for 8.2.

@henderkes
Copy link
Contributor

henderkes commented Mar 16, 2026

I would hope not many people use FrankenPHP with PHP < 8.4 anyway. 8.2 also still had real differences in performance between NTS and ZTS.

So I think it's acceptable to skip the test on 8.2, though as it seems unrelated to frankenphp itself it should maybe be raised with php.

Edit: actually probably not, given that it's not a security issue, just a crash.

// setup custom environment var for TestWorkerHasOSEnvironmentVariableInSERVER
if os.Setenv("CUSTOM_OS_ENV_VARIABLE", "custom_env_variable_value") != nil {
// setup custom environment var for TestWorkerHasOSEnvironmentVariableInSERVER and TestPhpIni
if os.Setenv("CUSTOM_OS_ENV_VARIABLE", "custom_env_variable_value") != nil || os.Setenv("LITERAL_ONE", "1") != nil {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make this a LITERAL_ZERO instead, opcache is enabled by default so we should explicitly disable it here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants