From 7acdc6b8fb8f08d9277dae6b46d71d19b1891da4 Mon Sep 17 00:00:00 2001 From: Wilmer Arambula Date: Tue, 2 Jan 2024 13:25:53 -0300 Subject: [PATCH] Update dependencies and fix DateTimePicker widget. --- composer.json | 4 ++-- infection.json.dist | 2 +- phpstan.neon | 8 ++++---- src/DateTimePicker.php | 5 +++-- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/composer.json b/composer.json index ab11a1e..b5097ac 100644 --- a/composer.json +++ b/composer.json @@ -22,8 +22,8 @@ "require-dev": { "maglnet/composer-require-checker": "^4.6", "php-forge/support": "dev-main", - "phpunit/phpunit": "^10.2", - "roave/infection-static-analysis-plugin": "^1.32", + "phpunit/phpunit": "10.5.3", + "roave/infection-static-analysis-plugin": "^1.34", "yii2-extensions/phpstan": "dev-main" }, "autoload": { diff --git a/infection.json.dist b/infection.json.dist index d06b334..ee3bcc3 100644 --- a/infection.json.dist +++ b/infection.json.dist @@ -5,7 +5,7 @@ ] }, "logs": { - "text": "php:\/\/stderr", + "text": "infection.log", "stryker": { "report": "main" } diff --git a/phpstan.neon b/phpstan.neon index 0b239cb..6719314 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -1,12 +1,12 @@ includes: - vendor/yii2-extensions/phpstan/extension.neon + parameters: + bootstrapFiles: + - tests/Support/bootstrap.php + dynamicConstantNames: - - YII_DEBUG - YII_ENV - - YII_ENV_DEV - - YII_ENV_PROD - - YII_ENV_TEST level: 2 diff --git a/src/DateTimePicker.php b/src/DateTimePicker.php index 1bd082a..dc8c94b 100644 --- a/src/DateTimePicker.php +++ b/src/DateTimePicker.php @@ -6,9 +6,9 @@ use PHPForge\Html\Div; use PHPForge\Html\Helper\CssClass; -use PHPForge\Html\Input; use PHPForge\Html\Label; use PHPForge\Html\Span; +use PHPForge\Html\Tag; use Yii; use yii\helpers\Html; use yii\widgets\InputWidget; @@ -137,9 +137,10 @@ private function renderDateTimePicker(): string ->dataAttributes(['td-target' => "#$this->id", 'td-toggle' => 'datetimepicker']) ->class($this->spanClass) ->content($this->icon); - $input = Input::widget() + $input = Tag::widget() ->attributes($this->options) ->dataAttributes(['td-target' => "#$this->id"]) + ->tagName('input') ->type('text'); $input = match ($this->hasModel()) {