beyondcode / beyondcode/herd-community
[Bug]: Zend OPcache API version warning reappears after each PHP 8,5 update
- Dominant language
- No language data
- Stars
- 122
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
### 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](https://github.com/beyondcode/herd-community/issues/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
```shell
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.
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the PHP 8.5 install/update flow on Windows 11 and inspect the PHP 8.5 php.ini entry that loads OPcache. Compare the configuration before and after a patch update, using composer or php artisan to trigger the warning; done means the zend_extension=opcache line is no longer reintroduced for PHP 8.5+.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100