Skip to content

Commit

Permalink
Update dependencies and fix DateTimePicker widget.
Browse files Browse the repository at this point in the history
  • Loading branch information
terabytesoftw committed Jan 2, 2024
1 parent b5c37c4 commit 7acdc6b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion infection.json.dist
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
]
},
"logs": {
"text": "php:\/\/stderr",
"text": "infection.log",
"stryker": {
"report": "main"
}
Expand Down
8 changes: 4 additions & 4 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -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

Expand Down
5 changes: 3 additions & 2 deletions src/DateTimePicker.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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()) {
Expand Down

0 comments on commit 7acdc6b

Please sign in to comment.