-
Notifications
You must be signed in to change notification settings - Fork 217
Prepare Woo Blocks for PHP8 Compatibility #3220
Comments
See main Woo Core issue for PHP8 support in Woo Core: woocommerce/woocommerce#27674 |
Converting this to an epic so we can link all issues uncovered to this. |
I ran exakat against WooCommerce Blocks and there were no compatibility issues reported via the analyser. |
🤔 I'm puzzled why the php8 compat issues didn't show up for me initially, but I can confirm they show up now (maybe I was mixed up and viewing the results from another repo (which is likely because the only other project I have checked out currently is Product Addons and that has a clean bill for PHP 8). Thanks for catching this Rua.
This is only potentially issue if we used named arguments. Since that syntax is only available for PHP 8 and requiring PHP 8 as a minimum version is a long ways off, I don't see this as a high priority/necessary thing to fix (a lot can change between now and then). It doesn't cause php warnings or errors, it's mostly a preventative measure so someone using named arguments syntax has no ambiguity around what arguments to use.
Ya all of these should be addressed. However, this may be a bit of a false positive (especially for
These are all false positives.
This is a false positive. |
Thanks for investigating those @nerrad . Looks like there are common patterns for some of these across our code bases, so we should aim to consistently address (or ignore as appropriate) these across the different repos. For example, we're also getting It would be great if we can treat these all as valid warnings and work towards a clean Exakat pass in all repos, though I'm not sure if that's practical/possible - keen to hear your thoughts on that as a goal. |
They aren't valid though, I consider it a bug with the sniff because |
I've been testing with WooCommerce Blocks on PHP 8 for a couple weeks now including various types of purchases and blocks. No more critical errors have popped up for me so I'm happy to consider Blocks "PHP 8 ready" in terms of no critical errors present. |
PHP8 is on the horizon and there are multiple efforts happening across the WordPress and WooCommerce projects to ensure compatibility with it. Our PHP surface area is fairly small but nevertheless we should make sure we're tracking these efforts and that there is nothing in our code that is incompatible with PHP8. A brief itemized list of todos (not exhaustive):
The text was updated successfully, but these errors were encountered: