Making WordPress.org

Opened 5 years ago

Closed 7 months ago

#4621 closed enhancement (fixed)

Add support for 'Tested up to' header in the main plugin file

Reported by: sergeybiryukov's profile SergeyBiryukov Owned by: dd32's profile dd32
Milestone: Priority: normal
Component: Plugin Directory Keywords:
Cc:

Description

Background:

  • #2952 added support for Requires PHP plugin header in readme.txt.
  • #4514 added support for Requires at least and Requires PHP headers in the main plugin file.

Since [9050], the preferred placement for Requires at least and Requires PHP headers is the plugin's main file, rather than readme.txt.

(Per discussion with @Otto42 in #WP46938, WordPress core should read the headers it needs from the plugin's PHP file, while the readme.txt is intended for the WordPress.org directory.)

It occurred to me that the Tested up to header still can only be defined in readme.txt. Even though core doesn't read it from the file at the moment, I think it makes sense to be able to define all three headers (Requires at least, Tested up to, Requires PHP) in the same place, for consistency.

Otherwise, developers who define them in the plugin's main file could be confused as to why two of them work as expected, but the third one does not.

Change History (5)

This ticket was mentioned in Slack in #meta by tellyworth. View the logs.


5 years ago

This ticket was mentioned in Slack in #core-privacy by timothybjacobs. View the logs.


5 years ago

#3 in reply to: ↑ description @SergeyBiryukov
3 years ago

Replying to SergeyBiryukov:

Otherwise, developers who define them in the plugin's main file could be confused as to why two of them work as expected, but the third one does not.

See an example in #WP55694, where the Requires at least and Requires PHP headers work as expected in the main plugin file, but Tested up to does not.

#4 @ipajen
2 years ago

"Requires at least" is kind of helpful as minimum requirement Knowlege but with a “Tested up to PHP version” would let us know if a plugin is working with Major new PHP versions like 8.x

https://wordpress.org/support/topic/tested-up-to-php-version-for-plugins/?view=all#post-16121147

#5 @dd32
7 months ago

  • Owner set to dd32
  • Resolution set to fixed
  • Status changed from new to closed

In 13637:

Plugin Directory: Support the Tested Up To header in the main plugin file.

This is as the other similar metadata fields are preferred from the plugin file, so it makes sense to have all versions co-located.

Fixes #4621.

Note: See TracTickets for help on using tickets.