Skip to content

Commit 262499c

Browse files
committed
fix: add Requires header fields and resolve implicit-nullable deprecations
Add "Requires at least" / "Requires PHP" to the plugin header to match the versions already documented in README.md. Also explicitly mark Term_Manager::__construct()'s $time and Term\UI::add_column_value()'s $column_value / $custom_column parameters as nullable, since PHP 8.4+ deprecates relying on a "= null" default to imply a nullable type.
1 parent 6bb917b commit 262499c

3 files changed

Lines changed: 7 additions & 5 deletions

File tree

includes/Term/UI.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -225,13 +225,13 @@ abstract protected function format_output( $value ): string;
225225
/**
226226
* Output the value for the custom column
227227
*
228-
* @param string $column_value Custom column output. Default empty.
229-
* @param string $custom_column Name of the column.
230-
* @param int $term_id Term ID.
228+
* @param string|null $column_value Custom column output. Default empty.
229+
* @param string|null $custom_column Name of the column.
230+
* @param int $term_id Term ID.
231231
*
232232
* @return string|void
233233
*/
234-
public function add_column_value( string $column_value = null, string $custom_column = null, int $term_id = 0 ) {
234+
public function add_column_value( ?string $column_value = null, ?string $custom_column = null, int $term_id = 0 ) {
235235
if ( ! filter_input( INPUT_GET, 'taxonomy' ) && ! filter_input( INPUT_POST, 'taxonomy' ) ) {
236236
return $column_value ?? '';
237237
}

includes/Term_Manager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class Term_Manager {
4545
* @param string $term_meta_key Term meta key.
4646
* @param int|null $time timestamp.
4747
*/
48-
public function __construct( string $post_meta_key, string $term_meta_key, int $time = null ) {
48+
public function __construct( string $post_meta_key, string $term_meta_key, ?int $time = null ) {
4949
$this->post_meta_key = $post_meta_key;
5050
$this->term_meta_key = $term_meta_key;
5151
$this->time = $time ?? time();

schedule-terms.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
* Text Domain: schedule-terms
1111
* Domain Path: /languages
1212
* Version: 1.3.2
13+
* Requires at least: 6.7
14+
* Requires PHP: 8.2
1315
*
1416
* @package Schedule_Terms
1517
*/

0 commit comments

Comments
 (0)