pattern-directory icon indicating copy to clipboard operation
pattern-directory copied to clipboard

The code requires PHP 8, so tell wp-env to use it.

Open tellyworth opened this issue 3 years ago • 2 comments

The codebase includes a couple of calls to str_contains(), which is PHP 8.0+ only. It's possible to get a fatal error when running the local environment on 7.4, but that will be the default for some users.

This one-liner tells wp-env to use PHP 8.0.

tellyworth avatar Nov 21 '22 06:11 tellyworth

WordPress contains a compat version of the str_* functions for older PHP releases.

Any reason this shouldn't be bumped to PHP 8.1 though? (The next version we'll use on WordPress.org)

dd32 avatar Nov 21 '22 06:11 dd32

Is that code outside of WordPress? Asking because of https://github.com/WordPress/wordpress-develop/blob/d2f420493d87465c323190892d4e7a6e4c6070a7/src/wp-includes/compat.php#L440.

ocean90 avatar Nov 21 '22 06:11 ocean90