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

Plugin header does not include requirements used by core #5076

Closed
aaemnnosttv opened this issue Apr 11, 2022 · 2 comments
Closed

Plugin header does not include requirements used by core #5076

aaemnnosttv opened this issue Apr 11, 2022 · 2 comments
Labels
P1 Medium priority QA: Eng Requires specialized QA by an engineer Type: Bug Something isn't working

Comments

@aaemnnosttv
Copy link
Collaborator

aaemnnosttv commented Apr 11, 2022

Bug Description

As per https://developer.wordpress.org/plugins/wordpress-org/how-your-readme-txt-works/, as of 5.8 WordPress core no longer sources plugin requirements from its readme.txt file, but instead from the plugin's header in its main php entrypoint.


Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance criteria

  • The following headers should be mirrored from the readme.txt to google-site-kit.php
    • Requires at least Minimum required version of WP
    • Requires PHP Minimum required version of PHP

Implementation Brief

  • Copy the headers and their current values in the ACs from readme.txt to google-site-kit.php
    • Note the readme is plain text where as the headers in the plugin php file need to be added to the existing plugin header comment block. E.g.
      * Text Domain: google-site-kit

Test Coverage

  • No changes needed

QA Brief

  • It's difficult to QA this change until the plugin is installed, because the data isn't displayed in the UI until the plugin is installed/the data is viewed on the WordPress plugin site. So there's really no QA to do for this issue and QA can be skipped for this one.

UPDATE: This is still odd to QA outside code, so I wrote a unit test that verifies the info we provided is used. If the PHP Unit tests for test_plugin_data pass, then if you change the value for Requires at least: in google-site-kit.php to 5.0 and the tests fails: this is good 🙂

Changelog entry

  • Add required versions of PHP and WP to plugin header.
@aaemnnosttv aaemnnosttv added Type: Bug Something isn't working P1 Medium priority labels Apr 11, 2022
@aaemnnosttv aaemnnosttv self-assigned this Apr 11, 2022
@aaemnnosttv aaemnnosttv added the QA: Eng Requires specialized QA by an engineer label Apr 13, 2022
@aaemnnosttv aaemnnosttv removed their assignment Apr 13, 2022
@eugene-manuilov eugene-manuilov self-assigned this Apr 14, 2022
@eugene-manuilov
Copy link
Collaborator

IB ✔️

@eugene-manuilov eugene-manuilov removed their assignment Apr 14, 2022
@tofumatt tofumatt self-assigned this Apr 28, 2022
@tofumatt tofumatt removed their assignment Apr 28, 2022
@tofumatt tofumatt assigned aaemnnosttv and unassigned tofumatt May 2, 2022
@aaemnnosttv aaemnnosttv assigned tofumatt and unassigned aaemnnosttv May 2, 2022
@tofumatt tofumatt assigned aaemnnosttv and unassigned tofumatt May 2, 2022
@aaemnnosttv
Copy link
Collaborator Author

QA ✅

Plugin data now includes the proper values for RequiresWP and RequiresPHP

wp> get_plugin_data( GOOGLESITEKIT_PLUGIN_MAIN_FILE )
=> array(14) {
  ["Name"]=>
  string(18) "Site Kit by Google"
  ["PluginURI"]=>
  string(30) "https://sitekit.withgoogle.com"
  ["Version"]=>
  string(6) "1.73.0"
  ["Description"]=>
  string(193) "Site Kit is a one-stop solution for WordPress users to use everything Google has to offer to make them successful on the web. <cite>By <a href="https://opensource.google.com">Google</a>.</cite>"
  ["Author"]=>
  string(50) "<a href="https://opensource.google.com">Google</a>"
  ["AuthorURI"]=>
  string(29) "https://opensource.google.com"
  ["TextDomain"]=>
  string(15) "google-site-kit"
  ["DomainPath"]=>
  string(0) ""
  ["Network"]=>
  bool(false)
  ["RequiresWP"]=>
  string(3) "4.7"
  ["RequiresPHP"]=>
  string(3) "5.6"
  ["UpdateURI"]=>
  string(0) ""
  ["Title"]=>
  string(63) "<a href="https://sitekit.withgoogle.com">Site Kit by Google</a>"
  ["AuthorName"]=>
  string(6) "Google"
}

@aaemnnosttv aaemnnosttv removed their assignment May 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 Medium priority QA: Eng Requires specialized QA by an engineer Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants