Skip to content

Commit e9533b8

Browse files
committed
dont even run the test
1 parent 7cb94e6 commit e9533b8

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

caddy/caddy_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import (
1616

1717
"github.com/caddyserver/caddy/v2"
1818
"github.com/caddyserver/caddy/v2/caddytest"
19+
"github.com/dunglas/frankenphp"
1920
"github.com/dunglas/frankenphp/internal/fastabs"
2021
"github.com/prometheus/client_golang/prometheus/testutil"
2122
"github.com/stretchr/testify/require"
@@ -1544,6 +1545,9 @@ func TestDd(t *testing.T) {
15441545

15451546
// test to force the opcache segfault race condition under concurrency (~1.7s)
15461547
func TestOpcacheReset(t *testing.T) {
1548+
if frankenphp.Version().VersionID < 80300 {
1549+
t.Skip("opcache reset test requires PHP 8.3+")
1550+
}
15471551
tester := caddytest.NewTester(t)
15481552
tester.InitServer(`
15491553
{

frankenphp.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ zif_handler orig_opcache_reset;
9191
/* Forward declaration */
9292
PHP_FUNCTION(frankenphp_opcache_reset);
9393

94+
#if PHP_VERSION_ID >= 80300
9495
/* Try to override opcache_reset if opcache is loaded.
9596
* Safe to call multiple times - skips if already overridden in this function
9697
* table. Uses handler comparison instead of orig_opcache_reset check so that
@@ -106,6 +107,7 @@ static void frankenphp_override_opcache_reset(void) {
106107
ZEND_FN(frankenphp_opcache_reset);
107108
}
108109
}
110+
#endif
109111

110112
void frankenphp_update_local_thread_context(bool is_worker) {
111113
is_worker_thread = is_worker;

0 commit comments

Comments
 (0)