[wp-trac] [WordPress Trac] #46938: Add Requires WP and Requires PHP headers for plugin compatibility tests
WordPress Trac
noreply at wordpress.org
Thu May 23 01:56:25 UTC 2019
#46938: Add Requires WP and Requires PHP headers for plugin compatibility tests
-------------------------------------------------+-------------------------
Reporter: afragen | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting
| Review
Component: Plugins | Version:
Severity: normal | Resolution:
Keywords: servehappy has-patch dev-feedback | Focuses:
needs-testing |
-------------------------------------------------+-------------------------
Comment (by SergeyBiryukov):
Replying to [comment:14 Otto42]:
> Realistically, I'm surprised that we added parsing of the readme.txt for
these in the first place. They should have been in the plugin's main PHP
file all along.
>
> Historically, the readme.txt for plugins has only been used by the
WordPress.org directory. This provided a clear separation. WordPress reads
the PHP file, the directory reads the readme.txt file for other things not
in the PHP file's headers.
Thanks for the context. Just to clarify, the `Requires PHP` header was
introduced in #meta2952 for the directory first, so it made more sense to
have it defined in the same place as `Requires at least`, which only
exists in `readme.txt`. Otherwise it would confusing and inconsistent to
define requirement headers in two different places, one in `readme.txt`
and one in the plugin's main PHP file, especially if each only works in
that specific place.
> So, my 2 cents is to instead add reading these headers to the plugin's
PHP file, and give precedence to that instead of the readme.txt file.
If that's the preferred way forward, sounds good. Plugin Directory would
need the same change as well for consistency.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/46938#comment:21>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list