diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3a9f666..5301470 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,7 +20,7 @@ jobs: php-version: '8.1' extensions: mbstring, intl coverage: none - tools: vimeo/psalm:5, phpstan:1.9, cs2pr + tools: vimeo/psalm:5, phpstan:1.10, cs2pr - name: Composer Install run: composer require --dev cakephp/cakephp-codesniffer:^5.0 diff --git a/.gitignore b/.gitignore index 5209c91..ad93557 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ vendor/ composer.lock tmp .phpunit.result.cache +.phpunit.cache diff --git a/composer.json b/composer.json index 4f9bed6..786e3c7 100644 --- a/composer.json +++ b/composer.json @@ -36,7 +36,7 @@ "require-dev": { "friendsofcake/cakephp-test-utilities": "dev-cake-5.x", "markstory/asset_compress": "5.x-dev", - "phpunit/phpunit": "^9.5.19" + "phpunit/phpunit": "^10.1" }, "autoload": { "psr-4": { diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 10712c9..f6a7ea0 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,27 +1,19 @@ - + ./tests/TestCase - - + - - - - src/ - - - + + + src/ + + diff --git a/src/Action/DashboardAction.php b/src/Action/DashboardAction.php index b8e89fd..9001fe8 100644 --- a/src/Action/DashboardAction.php +++ b/src/Action/DashboardAction.php @@ -6,6 +6,7 @@ use Crud\Action\BaseAction; use Crud\Traits\ViewTrait; use CrudView\Dashboard\Dashboard; +use function Cake\I18n\__d; class DashboardAction extends BaseAction { diff --git a/src/Dashboard/Dashboard.php b/src/Dashboard/Dashboard.php index 9afd487..68c10dc 100644 --- a/src/Dashboard/Dashboard.php +++ b/src/Dashboard/Dashboard.php @@ -6,6 +6,7 @@ use Cake\Datasource\EntityTrait; use Cake\View\Cell; use InvalidArgumentException; +use function Cake\I18n\__d; class Dashboard { diff --git a/src/Listener/Traits/FormTypeTrait.php b/src/Listener/Traits/FormTypeTrait.php index d2e84a7..e00d40a 100644 --- a/src/Listener/Traits/FormTypeTrait.php +++ b/src/Listener/Traits/FormTypeTrait.php @@ -6,6 +6,7 @@ use Cake\Controller\Controller; use Crud\Action\BaseAction; use Crud\Action\EditAction; +use function Cake\I18n\__d; trait FormTypeTrait { diff --git a/src/Listener/ViewListener.php b/src/Listener/ViewListener.php index e2add62..60de271 100644 --- a/src/Listener/ViewListener.php +++ b/src/Listener/ViewListener.php @@ -15,6 +15,7 @@ use CrudView\Listener\Traits\SiteTitleTrait; use CrudView\Listener\Traits\UtilityNavigationTrait; use CrudView\Traits\CrudViewConfigTrait; +use function Cake\I18n\__d; class ViewListener extends BaseListener { diff --git a/src/View/Helper/CrudViewHelper.php b/src/View/Helper/CrudViewHelper.php index f6a9bd5..6595e1d 100644 --- a/src/View/Helper/CrudViewHelper.php +++ b/src/View/Helper/CrudViewHelper.php @@ -9,6 +9,7 @@ use Cake\Utility\Text; use Cake\View\Helper; use Cake\View\Helper\FormHelper; +use function Cake\I18n\__d; /** * @property \BootstrapUI\View\Helper\FormHelper $Form diff --git a/tests/TestCase/Dashboard/DashboardTest.php b/tests/TestCase/Dashboard/DashboardTest.php index b885b60..06dd42a 100644 --- a/tests/TestCase/Dashboard/DashboardTest.php +++ b/tests/TestCase/Dashboard/DashboardTest.php @@ -9,6 +9,7 @@ use CrudView\Dashboard\Dashboard; use CrudView\View\Cell\DashboardTableCell; use InvalidArgumentException; +use function Cake\I18n\__d; /** * DashboardTest class diff --git a/tests/TestCase/View/Widget/DateTimeWidgetTest.php b/tests/TestCase/View/Widget/DateTimeWidgetTest.php index 55c440c..8abd06d 100644 --- a/tests/TestCase/View/Widget/DateTimeWidgetTest.php +++ b/tests/TestCase/View/Widget/DateTimeWidgetTest.php @@ -55,7 +55,7 @@ public function testRenderSimple($compareFileName, $data) * * @return array */ - public function renderProvider() + public static function renderProvider() { return [ [