Skip to content

[Bug]: Zend OPcache API version warning reappears after each PHP 8,5 update #1737

Description

@sakihl

Platform

Windows

Operating system version

Windows 11

System architecture

Windows

Herd Version

1.29.0

PHP Version

PHP 8.5.9 (recurred after updating from a previous 8.5.x build via Herd)

Bug description

After updating PHP 8.5 through Herd, composer and php artisan commands print an OPcache API mismatch warning. This appears to be caused by a stale php.ini entry loading OPcache as an extension — as of PHP 8.5, OPcache is compiled directly into core and no longer needs to be loaded via zend_extension. It looks like Herd's PHP 8.5 install still writes/retains that line on update, so each PHP release breaks it again since the bundled extension file doesn't match the new Zend Engine API version.

This is the same error as reported in #1699, which appears to be closed without a resolution. I am opening it here since it recurs on every PHP 8.5 update, not just a one-off install.

Steps to reproduce

  1. Install PHP 8.5 via Herd
  2. Run composer install or php artisan in a project
  3. If warning appears fix php.ini - see workaround below
  4. Update PHP 8.5 to a newer patch version via Herd (e.g. 8.5.8 → 8.5.9)
  5. Run composer or php artisan again — warning reappears

Workaround found: removing/commenting the zend_extension=opcache line in the PHP 8.5 php.ini resolves it, since OPcache is now built-in and doesn't need to be loaded separately. It would be good if Herd's installer stopped writing that line for PHP 8.5+, or carried over the fact that it is commented out on update.

Relevant log output

Zend OPcache requires Zend Engine API version 420240925.
The Zend Engine API version 420250925 which is installed, is newer.
Contact Zend Technologies at http://www.zend.com/ for a later version of Zend OPcache.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions