#48520 closed defect (bug) (fixed)
Remove parsing of readme.txt files from `validate_plugin_requirements()`
Reported by: | afragen | Owned by: | afragen |
---|---|---|---|
Milestone: | 5.8 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Upgrade/Install | Keywords: | dev-feedback has-patch needs-docs needs-codex |
Focuses: | administration | Cc: |
Description
Per discussion in #48515 we are removing the parsing of a plugin readme.txt
file.
Everything should belong in the main plugin file headers.
Attachments (1)
Change History (23)
#2
@
5 years ago
- Milestone 5.4 deleted
Because the prerequisites are still unresolved, I am going to move this to Future Release
. @SergeyBiryukov @afragen feel free to re-milestone this when those are addressed!
#4
@
4 years ago
Is it really necessary to have Tested up to
defined in the main plugin/theme file? For the purposes of this patch the only utilized headers, Requires at least
and Requires PHP
are already resolved to be required in the main plugin file. https://developer.wordpress.org/plugins/plugin-basics/header-requirements/
While I understand the desire for consistency, the Tested up to
header only has relevance to the plugin directory and the plugin directory doesn't parse the main plugin file.
#6
@
4 years ago
It seems like a similar change should also be made to validate_theme_requirements()
for consistency, which currently reads the Requires at least
and Requires PHP
headers from the theme's style.css
file, and if they are not present there, also checks readme.txt
as a fallback.
Since readme.txt
is only used as a fallback in both cases, I'm not sure I see a strong benefit in removing it, but if it helps reduce the confusion of putting these headers into the correct place as outlined in #48515, then it might be a good idea.
That said, as of this time, the Requires at least
and Requires PHP
headers are included as suggested examples both in Header Requirements and Plugin Readmes articles. If we proceed with only recommending a single place for them, I guess they should be removed from the latter.
#7
@
4 years ago
PR in https://github.com/WordPress/wordpress-develop/pull/1026
Removes checks on readme.txt
files.
This ticket was mentioned in PR #1026 on WordPress/wordpress-develop by afragen.
4 years ago
#8
- Keywords has-patch added; needs-refresh removed
Remove check in readme.txt file for Requires at least
and Requires PHP
headers in plugins and themes for validation. While these headers may be in the readme.txt files, they should be in the main plugin file and the theme's style.css file.
#10
@
4 years ago
Requires at least
and Requires PHP
also required in Theme Header Requirements to be included in style.css
.
This ticket was mentioned in Slack in #core by afragen. View the logs.
4 years ago
This ticket was mentioned in Slack in #core by hellofromtonya. View the logs.
4 years ago
This ticket was mentioned in Slack in #core-auto-updates by afragen. View the logs.
4 years ago
This ticket was mentioned in Slack in #core by chaion07. View the logs.
3 years ago
#16
@
3 years ago
- Keywords needs-docs needs-codex added
The PR looks good to me 👍
Adding needs-docs
and needs-codex
workflow keywords as some articles will need to be updated in both helphub and devhub.
#17
@
3 years ago
I'm not advocating removing any headers from the readme.txt file.
I am advocating better messaging to developers that any WP or PHP requirements for the plugin or theme are placed in the plugin/theme headers.
This means that requirements data for plugins and themes for validate_plugin_requirements()
and validate_theme_requirements()
are only gathered from the file headers.
I hope that's more clear. If not, let me know and I'll try to clarify.
This ticket was mentioned in Slack in #core by sergey. View the logs.
3 years ago
#20
@
3 years ago
This file serves as readme standard for plugins and probably should be updated accordingly: https://wordpress.org/plugins/readme.txt
#21
@
16 months ago
if someone wanted to standardize lookup for
Requires PHP
Requires at least
it would need to be in readme.txt
since you have no way of knowing which file is the main plugin file?
https://plugins.svn.wordpress.org/wordpress-seo/tags/20.6/readme.txt (predictable)
https://plugins.svn.wordpress.org/wordpress-seo/tags/20.6/??.php (unpredictable)
or is there away around this when using svn urls only?
refs:
Some prerequisites, per comment:25:ticket:48515:
Requires at least
,Tested up to
,Requires PHP
) could be defined in the same place.style.css
file, and remove them fromreadme.txt
.