Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update "Supports PHP:" value for all themes #7785

Open
creativecoder opened this issue Apr 29, 2024 · 12 comments
Open

Update "Supports PHP:" value for all themes #7785

creativecoder opened this issue Apr 29, 2024 · 12 comments
Labels
Customer Report Issues or PRs that were reported via Happiness. Previously known as "Happiness Request". [Pri] TBD [Type] Bug Something isn't working

Comments

@creativecoder
Copy link
Contributor

creativecoder commented Apr 29, 2024

We've been adding declare( strict_types=1 ); to theme PHP files because of WP.com deploy requirements.

This mode was added in PHP 7. Currently most (all?) themes in this repo declare "Support PHP: 5.x" in the style.css header.

We need to update this to correctly require PHP 7.0+, to indicate that themes may trigger errors if used with older PHP versions.

@creativecoder creativecoder added the [Type] Bug Something isn't working label Apr 29, 2024
@mrfoxtalbot mrfoxtalbot added [Type] Enhancement New feature or request and removed [Type] Bug Something isn't working labels Apr 30, 2024
@mrfoxtalbot mrfoxtalbot moved this from Needs Triage to Triaged in Automattic Prioritization: The One Board ™ Apr 30, 2024
@creativecoder creativecoder added [Type] Bug Something isn't working and removed [Type] Enhancement New feature or request labels May 23, 2024
@creativecoder
Copy link
Contributor Author

I've restored [Type] Bug for this issue--fixing incorrect PHP compatibility information is not an enhancement.

@inaikem
Copy link

inaikem commented Dec 10, 2024

@iamtakashi, do you have a sense of who/which team this issue would be assigned to now?

@Automattic/fusion: Same question to you + how would you rate the priority of this now our minimum requirement on Dotcom is PHP 8.x?

@iamtakashi
Copy link
Contributor

We need to update this to correctly require PHP 7.0+

That's good to know. We'll make sure about the themes going forward. cc @beafialho @iamarinoh

do you have a sense of who/which team this issue would be assigned to now?

Thanks for the ping. The decision that I know about is that; (pNEWy-i6e-p2#comment-57267)

  • The themes launched before 2023 will be maintained by dotcom teams (Marvel? T-rex?)
  • The themes launched after 2023 will be maintained by dotorg teams, including the theme designers

Copy link
Contributor

Support References

This comment is automatically generated. Please do not edit it.

  • pNEWy-i6e-p2#comment-57267

@github-actions github-actions bot added the Customer Report Issues or PRs that were reported via Happiness. Previously known as "Happiness Request". label Dec 10, 2024
@inaikem
Copy link

inaikem commented Dec 11, 2024

@iamtakashi 👋 We currently support PHP 8.1, 8.2, 8.3 on WPcom. It's highly possible 8.1 will be deprecated next year.

Question: What's the best way for us to loop in your team with the most up-to-date guidance?

@inaikem
Copy link

inaikem commented Dec 11, 2024

@Automattic/t-rex, based on Takashi's comment above, are you able to pick up all pre-2023 theme updates?

@dsas
Copy link
Contributor

dsas commented Dec 11, 2024

We need to update this to correctly require PHP 7.0+, to indicate that themes may trigger errors if used with older PHP versions.

Clarification: so far as I know a strict types declaration will trigger a warning, not an error. The impact is a lot of noisy messages, not a fatal error stopping the site from being displayed.

This affects pre-2023 themes that were updated within roughly the last 12 months that are being used on non-dotcom site using a PHP version that was EOL by PHP six years ago, and widely EOL'd in linux distros more than four years ago. Unless there's something I'm missing, it seems like a very low priority for us.

@Automattic/t-rex, based on Takashi's comment above, are you able to pick up all pre-2023 theme updates?

I'd say pre-2023 theme updates in general is a marvel responsibility, certainly not just a t-rex one. I can add this specific issue to our backlog but I don't anticipate getting to it anytime soon.

@iamtakashi
Copy link
Contributor

We currently support PHP 8.1, 8.2, 8.3 on WPcom. It's highly possible 8.1 will be deprecated next year.

@inaikem Oh, should we add 8.2 as the minimum PHP version going forward?

Question: What's the best way for us to loop in your team with the most up-to-date guidance?

I think a quick post on the themedevp2 should work 👍

@iamtakashi
Copy link
Contributor

@mikachan Since the author might not be able to reply here, I'm asking for your advice.

I'm a little confused about the minimum version of PHP we need to state in our themes. Please advise. Thanks in advance, as always 🙇‍♂

@mikachan
Copy link
Member

👋 As it's the minimum version that needs to be updated, I believe it should be fine to update it to anything above 7, as that's when the strict_types support starts.

For now, I think I'd recommend updating it to 8.2 based on this comment, saying that 8.1 will soon be deprecated on wpcom, and hopefully as it's a minimum version, 8.2 being eventually deprecated won't matter as much.

However, I'd also echo @dsas's comment here that I don't think this needs to be prioritised. Although, for new themes, I'd recommend using 8.2.

@iamtakashi
Copy link
Contributor

Understood. Thank you, @mikachan!

@iamtakashi
Copy link
Contributor

for new themes, I'd recommend using 8.2 (as the minimum PHP version.)

FYI @beafialho @henriqueiamarino

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Customer Report Issues or PRs that were reported via Happiness. Previously known as "Happiness Request". [Pri] TBD [Type] Bug Something isn't working
Projects
Development

No branches or pull requests

6 participants