From 579b5f6c0b21c1f84ded84b6a435387b614da0b9 Mon Sep 17 00:00:00 2001 From: Wilmer Arambula Date: Wed, 17 Apr 2024 06:06:12 -0400 Subject: [PATCH] Update composer.json dependencies. --- composer.json | 16 +++------------- src/FilePond.php | 9 +++------ tests/TestCase.php | 4 ++-- 3 files changed, 8 insertions(+), 21 deletions(-) diff --git a/composer.json b/composer.json index 207f393..bc6f198 100644 --- a/composer.json +++ b/composer.json @@ -23,9 +23,9 @@ "npm-asset/filepond-plugin-image-preview": "^4.6", "npm-asset/filepond-plugin-image-transform": "^3.8", "npm-asset/filepond-plugin-pdf-preview": "^1.0", - "oomphinc/composer-installers-extender": "^2.0", - "php-forge/awesome-widget": "dev-main", - "php-forge/html": "dev-main", + "php-forge/awesome-widget": "^0.1", + "ui-awesome/html": "^0.1", + "ui-awesome/html-helper": "^0.1", "yiisoft/yii2": "*" }, "require-dev": { @@ -55,16 +55,6 @@ }, "config-plugin-options": { "source-directory": "config" - }, - "installer-types": [ - "bower-asset", - "npm-asset" - ], - "installer-paths": { - "./node_modules/{$name}/": [ - "type:bower-asset", - "type:npm-asset" - ] } }, "config": { diff --git a/src/FilePond.php b/src/FilePond.php index 8ef925f..64488b5 100644 --- a/src/FilePond.php +++ b/src/FilePond.php @@ -5,11 +5,8 @@ namespace Yii2\Extensions\FilePond; use JsonException; -use PHPForge\Html\Helper\CssClass; -use PHPForge\Html\Helper\Utils; -use PHPForge\Html\Tag; -use Yii2\Extensions\FilePond\Asset\FilePondAsset; -use Yii2\Extensions\FilePond\Asset\FilePondCdnAsset; +use UIAwesome\Html\{FormControl\Input\File, Helper\CssClass, Helper\Utils}; +use Yii2\Extensions\FilePond\Asset\{FilePondAsset, FilePondCdnAsset}; use Yii; use yii\widgets\InputWidget; @@ -322,6 +319,6 @@ private function renderInputFile(): string // input type="file" not supported value attribute. unset($options['id'], $options['placeholder'], $options['value']); - return Tag::widget()->attributes($options)->id($this->id)->name($name)->tagName('input')->type('file')->render(); + return File::widget()->attributes($options)->id($this->id)->name($name)->render(); } } diff --git a/tests/TestCase.php b/tests/TestCase.php index 98ed89f..e03ce11 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -34,8 +34,8 @@ protected function mockApplication(): void [ 'id' => 'testapp', 'aliases' => [ - '@bower' => dirname(__DIR__) . '/node_modules', - '@npm' => dirname(__DIR__) . '/node_modules', + '@bower' => '@vendor/bower-asset', + '@npm' => '@vendor/npm-asset', ], 'basePath' => __DIR__, 'vendorPath' => dirname(__DIR__) . '/vendor',