Automattic / wp-calypso

The JavaScript and API powered WordPress.com
https://developer.wordpress.com
GNU General Public License v2.0
12.41k stars 1.99k forks source link

PHP: Prepare dotcom projects for PHP 8 compatibility #46015

Closed mattwiebe closed 3 years ago

mattwiebe commented 4 years ago

This is a tracking issue for PHP 8 compatibility

Please add other PHP-based projects to the list as you become aware of them

simison commented 3 years ago

cc @sirreal anything to worry about CoBlocks?

simison commented 3 years ago

(PHP 8 is out)

sirreal commented 3 years ago

anything to worry about CoBlocks?

Good question… I think it's unlikely to have issues but we can do some testing. I've created an issue so CoBlocks is aware and can prepare automated testing.

I'll add this to @Automattic/good-mountain board to do some CoBlocks testing.

simison commented 3 years ago

@noahtallen do you happen to know how ready ETK is for PHP8, and if so, is it possible to keep it that way in current/future CI setup?

7.3 and 7.4 are other two versions we need to support on Atomic (https://wordpress.com/hosting-config):

noahtallen commented 3 years ago

I don't know if ETK is ready for PHP 8, but I can look into that this week. (CI sounds like a good way to track that)

simison commented 3 years ago

Thanks! Lemme know if you spot any changes needed and maintainers can help out. 👍

noahtallen commented 3 years ago

I've been able to successfully run the plugin with phpVersion: 8.0 in wp-env. (Verified the php version, and it is working well as far as I can tell.)

I need to do some more research on CI stuff. The underlying PHPCompatibility checker hasn't yet been updated with full PHP 8 support yet, so it's not that simple.

Some other suggestions were running phpunit tests in a PHP 8 environment, but we don't have a very extensive test suite, so that may not catch everything.

If anyone has more ideas, I'm all ears! I'll keep looking for some more suggestions around the web

simison commented 3 years ago

@Automattic/team-calypso-platform howdy! I'll close this up as it sounds like things are either tracked elsewhere (for CoBlocks) or already working (ETK). Feel free to re-open if you'd like to keep this for your work, tho!

noahtallen commented 3 years ago

Cool! I do want to note that we don't have any CI running it on PHP 8 yet, but I think ETK is low risk in general just because the amount of PHP code is fairly low