When I select PHP 8.0.0 and open Site Shell, running any WP-CLI command results in the following being printed to STDERR:
Cannot load Zend OPcache - it was already loaded
And then the command runs as expected with the output to STDOUT.
Additionally, when I have selected PHP 7 I get a much larger warning:
Failed loading /Applications/Local.app/Contents/Resources/extraResources/lightning-services/php-7.4.1+16/bin/darwin/lib/php/extensions/no-debug-non-zts-20190902/opcache.so: dlopen(/Applications/Local.app/Contents/Resources/extraResources/lightning-services/php-7.4.1+16/bin/darwin/lib/php/extensions/no-debug-non-zts-20190902/opcache.so, 9): Symbol not found: _zif_display_disabled_function Referenced from: /Applications/Local.app/Contents/Resources/extraResources/lightning-services/php-7.4.1+16/bin/darwin/lib/php/extensions/no-debug-non-zts-20190902/opcache.so Expected in: flat namespace in /Applications/Local.app/Contents/Resources/extraResources/lightning-services/php-7.4.1+16/bin/darwin/lib/php/extensions/no-debug-non-zts-20190902/opcache.so Xdebug requires Zend Engine API version 320190902. The Zend Engine API version 420200930 which is installed, is newer. Contact Derick Rethans at https://xdebug.org/docs/faq#api for a later version of Xdebug. Warning: PHP Startup: imagick: Unable to initialize module Module compiled with module API=20190902 PHP compiled with module API=20200930 These options need to match in Unknown on line 0
Again, this is printed to STDERR but then the expected output is going to STDOUT.
This is similarly what is output in PHP 7.3.5.
So the WP-CLI commands are working, but there are troublesome PHP warnings being emitted.
Open Site Shell and run a WP-CLI command.
- MacOS Big Sur 11.6.3
- PHP 7.4.1 and 8.0.0
- Local 6.2.1+5711
The Local log just has messages related to MySQL.