From 1e5654d8ac9a2af436583e31c352b21101da735b Mon Sep 17 00:00:00 2001 From: Dimitrios Pantazis Date: Mon, 15 Jun 2026 23:39:35 +0300 Subject: [PATCH 1/3] fix: deprecation notices --- src/Assets/Asset.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Assets/Asset.php b/src/Assets/Asset.php index 72dba3f..4417cfd 100644 --- a/src/Assets/Asset.php +++ b/src/Assets/Asset.php @@ -303,7 +303,7 @@ class Asset { * @param string|null $version The asset version. * @param string|null $root_path The path to the root of the plugin. */ - public function __construct( string $slug, string $file, string $version = null, string $root_path = null ) { + public function __construct( string $slug, string $file, ?string $version = null, ?string $root_path = null ) { $this->slug = sanitize_key( $slug ); $this->file = $file; $this->version = $version ?? Config::get_version(); From e2a5f425e8ca7aff19929f2bdac1bdd0de7ecf26 Mon Sep 17 00:00:00 2001 From: Dimitrios Pantazis Date: Mon, 15 Jun 2026 23:41:07 +0300 Subject: [PATCH 2/3] fix: more deprecation notices removed --- src/Assets/Asset.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Assets/Asset.php b/src/Assets/Asset.php index 4417cfd..3778768 100644 --- a/src/Assets/Asset.php +++ b/src/Assets/Asset.php @@ -345,7 +345,7 @@ public function add_to_group_path( string $group_path_name ) { * @param string|null $version The asset version. * @param string|null $root_path The path to the root of the plugin. */ - public static function add( string $slug, string $file, string $version = null, $root_path = null ) { + public static function add( string $slug, string $file, ?string $version = null, ?string $root_path = null ) { return Assets::init()->add( new self( $slug, $file, $version, $root_path ) ); } From 2b6351355caaa98cd401cac0e93dadfb21f942b4 Mon Sep 17 00:00:00 2001 From: Dimitrios Pantazis Date: Mon, 15 Jun 2026 23:43:49 +0300 Subject: [PATCH 3/3] chore: bump version to 1.5.2 --- assets.php | 2 +- src/Assets/Asset.php | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/assets.php b/assets.php index e8005e7..16ed9ad 100644 --- a/assets.php +++ b/assets.php @@ -2,7 +2,7 @@ /** * Plugin Name: Assets * Description: Asset library with a plugin bootstrap file for automated testing. - * Version: 1.5.1 + * Version: 1.5.2 * Author: StellarWP * Author URI: https://stellarwp.com */ diff --git a/src/Assets/Asset.php b/src/Assets/Asset.php index 3778768..986a222 100644 --- a/src/Assets/Asset.php +++ b/src/Assets/Asset.php @@ -298,6 +298,9 @@ class Asset { /** * Constructor. * + * @since 1.0.0 + * @since 1.5.2 Added nullable type hints for the version and root path parameters. + * * @param string $slug The asset slug. * @param string $file The asset file path. * @param string|null $version The asset version. @@ -340,6 +343,9 @@ public function add_to_group_path( string $group_path_name ) { /** * Registers an asset. * + * @since 1.0.0 + * @since 1.5.2 Added nullable type hints for the version and root path parameters. + * * @param string $slug The asset slug. * @param string $file The asset file path. * @param string|null $version The asset version.