Skip to content

Commit 01f25b2

Browse files
authored
Fix bogus opcache handling in PHP 8.5
opcache is now statically built and always available
1 parent b6ff925 commit 01f25b2

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

compile.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ if [ "$HAVE_OPCACHE_JIT" == "yes" ]; then
315315
if [ $PHP_VERSION_ID -lt 80400 ]; then
316316
write_out "WARNING" "JIT in versions below PHP 8.4 is highly unstable and not recommended"
317317
else
318-
write_out "WARNING" "JIT in PHP 8.4 has not been tested, use it with caution"
318+
write_out "WARNING" "JIT in PHP 8.4+ may be unstable, use it with caution"
319319
fi
320320
else
321321
write_out "INFO" "JIT support in OPcache won't be compiled"
@@ -467,9 +467,11 @@ else
467467
fi
468468

469469
if [ "$DO_STATIC" == "yes" ]; then
470-
HAVE_OPCACHE="no" #doesn't work on static builds
471-
HAVE_OPCACHE_JIT="no"
472-
write_out "warning" "OPcache cannot be used on static builds; this may have a negative effect on performance"
470+
if [ "$PHP_VERSION_ID" -lt 80500 ]; then
471+
HAVE_OPCACHE="no"
472+
HAVE_OPCACHE_JIT="no"
473+
write_out "warning" "OPcache cannot be used on static builds prior to PHP 8.5; this may have a negative effect on performance"
474+
fi
473475
if [ "$FSANITIZE_OPTIONS" != "" ]; then
474476
write_out "warning" "Sanitizers cannot be used on static builds"
475477
fi

0 commit comments

Comments
 (0)