diff --git a/CHANGELOG.md b/CHANGELOG.md index c6e28d6..ea981a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,9 +2,11 @@ ## 1.0.1 under development -- Chg #64: Adopt configuration to changes in `yiisoft/form` (vjik) -- Chg: Allow yiisoft/arrays ^3.0 (samdark) -- Chg: Allow yiisoft/html ^3.0 (samdark) +- Chg #64: Adapt configuration to changes in `yiisoft/form` (@vjik) +- Enh: Allow `yiisoft/arrays` ^3.0 (@samdark) +- Enh: Allow `yiisoft/html` ^3.0 (@samdark) +- Enh #81: Add support for `yiisoft/assets` version `^3.0` (@vjik) +- Bug #81: Fixed publish options in assets (@vjik) - Chg #79: Raise version PHP 8.0, adopt last change `yiisoft/widget` (@terabytesoftw) ## 1.0.0 April 01, 2022 diff --git a/composer.json b/composer.json index a3f5af9..e9273b9 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,7 @@ "require": { "php": "^8.0", "yiisoft/arrays": "^2.0|^3.0", - "yiisoft/assets": "^2.0", + "yiisoft/assets": "^2.0|^3.0", "yiisoft/html": "^2.0|^3.0", "yiisoft/widget": "^2.0" }, diff --git a/src/Asset/BulmaAsset.php b/src/Asset/BulmaAsset.php index 4d89b96..257601e 100644 --- a/src/Asset/BulmaAsset.php +++ b/src/Asset/BulmaAsset.php @@ -5,6 +5,7 @@ namespace Yiisoft\Yii\Bulma\Asset; use Yiisoft\Assets\AssetBundle; +use Yiisoft\Files\PathMatcher\PathMatcher; final class BulmaAsset extends AssetBundle { @@ -16,9 +17,10 @@ final class BulmaAsset extends AssetBundle 'css/bulma.css', ]; - public array $publishOptions = [ - 'only' => [ - 'css/bulma.css', - ], - ]; + public function __construct() + { + $this->publishOptions = [ + 'filter' => (new PathMatcher())->only('css/bulma.css'), + ]; + } } diff --git a/src/Asset/BulmaHelpersAsset.php b/src/Asset/BulmaHelpersAsset.php index 5d9d11d..d226a39 100644 --- a/src/Asset/BulmaHelpersAsset.php +++ b/src/Asset/BulmaHelpersAsset.php @@ -5,6 +5,7 @@ namespace Yiisoft\Yii\Bulma\Asset; use Yiisoft\Assets\AssetBundle; +use Yiisoft\Files\PathMatcher\PathMatcher; final class BulmaHelpersAsset extends AssetBundle { @@ -16,9 +17,10 @@ final class BulmaHelpersAsset extends AssetBundle 'bulma-helpers.css', ]; - public array $publishOptions = [ - 'only' => [ - 'bulma-helpers.css', - ], - ]; + public function __construct() + { + $this->publishOptions = [ + 'filter' => (new PathMatcher())->only('bulma-helpers.css'), + ]; + } } diff --git a/src/Asset/BulmaJsAsset.php b/src/Asset/BulmaJsAsset.php index 4fe166c..db52d82 100644 --- a/src/Asset/BulmaJsAsset.php +++ b/src/Asset/BulmaJsAsset.php @@ -5,6 +5,7 @@ namespace Yiisoft\Yii\Bulma\Asset; use Yiisoft\Assets\AssetBundle; +use Yiisoft\Files\PathMatcher\PathMatcher; final class BulmaJsAsset extends AssetBundle { @@ -16,9 +17,10 @@ final class BulmaJsAsset extends AssetBundle 'dist/bulma.js', ]; - public array $publishOptions = [ - 'only' => [ - 'dist/bulma.js', - ], - ]; + public function __construct() + { + $this->publishOptions = [ + 'filter' => (new PathMatcher())->only('dist/bulma.js'), + ]; + } } diff --git a/src/Asset/DropdownAsset.php b/src/Asset/DropdownAsset.php index 1cf027e..49d7464 100644 --- a/src/Asset/DropdownAsset.php +++ b/src/Asset/DropdownAsset.php @@ -5,6 +5,7 @@ namespace Yiisoft\Yii\Bulma\Asset; use Yiisoft\Assets\AssetBundle; +use Yiisoft\Files\PathMatcher\PathMatcher; final class DropdownAsset extends AssetBundle { @@ -16,9 +17,10 @@ final class DropdownAsset extends AssetBundle 'dist/dropdown.js', ]; - public array $publishOptions = [ - 'only' => [ - 'dist/dropdown.js', - ], - ]; + public function __construct() + { + $this->publishOptions = [ + 'filter' => (new PathMatcher())->only('dist/dropdown.js'), + ]; + } } diff --git a/src/Asset/FilePluginAsset.php b/src/Asset/FilePluginAsset.php index 129273f..5719620 100644 --- a/src/Asset/FilePluginAsset.php +++ b/src/Asset/FilePluginAsset.php @@ -5,6 +5,7 @@ namespace Yiisoft\Yii\Bulma\Asset; use Yiisoft\Assets\AssetBundle; +use Yiisoft\Files\PathMatcher\PathMatcher; final class FilePluginAsset extends AssetBundle { @@ -16,9 +17,10 @@ final class FilePluginAsset extends AssetBundle 'dist/file.js', ]; - public array $publishOptions = [ - 'only' => [ - 'dist/file.js', - ], - ]; + public function __construct() + { + $this->publishOptions = [ + 'filter' => (new PathMatcher())->only('dist/file.js'), + ]; + } } diff --git a/src/Asset/MessagePluginAsset.php b/src/Asset/MessagePluginAsset.php index b4e47bf..ab88aea 100644 --- a/src/Asset/MessagePluginAsset.php +++ b/src/Asset/MessagePluginAsset.php @@ -5,6 +5,7 @@ namespace Yiisoft\Yii\Bulma\Asset; use Yiisoft\Assets\AssetBundle; +use Yiisoft\Files\PathMatcher\PathMatcher; final class MessagePluginAsset extends AssetBundle { @@ -16,9 +17,10 @@ final class MessagePluginAsset extends AssetBundle 'dist/message.js', ]; - public array $publishOptions = [ - 'only' => [ - 'dist/message.js', - ], - ]; + public function __construct() + { + $this->publishOptions = [ + 'filter' => (new PathMatcher())->only('dist/message.js'), + ]; + } } diff --git a/src/Asset/NavBarAsset.php b/src/Asset/NavBarAsset.php index bb4dbd2..2b32789 100644 --- a/src/Asset/NavBarAsset.php +++ b/src/Asset/NavBarAsset.php @@ -5,6 +5,7 @@ namespace Yiisoft\Yii\Bulma\Asset; use Yiisoft\Assets\AssetBundle; +use Yiisoft\Files\PathMatcher\PathMatcher; final class NavBarAsset extends AssetBundle { @@ -16,9 +17,10 @@ final class NavBarAsset extends AssetBundle 'dist/navbar.js', ]; - public array $publishOptions = [ - 'only' => [ - 'dist/navbar.js', - ], - ]; + public function __construct() + { + $this->publishOptions = [ + 'filter' => (new PathMatcher())->only('dist/navbar.js'), + ]; + } } diff --git a/src/Asset/PanelAsset.php b/src/Asset/PanelAsset.php index 6449d3d..55ab6ab 100644 --- a/src/Asset/PanelAsset.php +++ b/src/Asset/PanelAsset.php @@ -5,6 +5,7 @@ namespace Yiisoft\Yii\Bulma\Asset; use Yiisoft\Assets\AssetBundle; +use Yiisoft\Files\PathMatcher\PathMatcher; final class PanelAsset extends AssetBundle { @@ -16,9 +17,10 @@ final class PanelAsset extends AssetBundle 'dist/panel.js', ]; - public array $publishOptions = [ - 'only' => [ - 'dist/panel.js', - ], - ]; + public function __construct() + { + $this->publishOptions = [ + 'filter' => (new PathMatcher())->only('dist/panel.js'), + ]; + } }