diff --git a/.phive/phars.xml b/.phive/phars.xml index d311bfa5..eaf11a6b 100644 --- a/.phive/phars.xml +++ b/.phive/phars.xml @@ -1,5 +1,5 @@ - + diff --git a/composer.json b/composer.json index 3ade071b..4c3866f8 100644 --- a/composer.json +++ b/composer.json @@ -17,12 +17,12 @@ } ], "require": { - "cakephp/cakephp": "^5.0" + "cakephp/cakephp": "^5.1" }, "require-dev": { - "phpunit/phpunit": "^10.1", + "phpunit/phpunit": "^10.5.5 || ^11.1.3", "cakephp/bake": "^3.0", - "cakephp/cakephp-codesniffer": "^5.0" + "cakephp/cakephp-codesniffer": "^5.1" }, "support": { "issues": "http://github.com/friendsofcake/bootstrap-ui/issues", diff --git a/src/View/Helper/FormHelper.php b/src/View/Helper/FormHelper.php index f239b314..5ad94347 100644 --- a/src/View/Helper/FormHelper.php +++ b/src/View/Helper/FormHelper.php @@ -901,7 +901,6 @@ protected function _ariaOptions(string $fieldName, array $options): array $options['type'] === 'hidden' || ($options['type'] === 'select' && isset($options['multiple']) && $options['multiple'] === 'checkbox') || ( - isset($options['aria-required']) && isset($options['aria-describedby']) && isset($options['aria-invalid']) ) diff --git a/tests/TestCase/Bake/BakeTest.php b/tests/TestCase/Bake/BakeTest.php index f2f9520f..4a07d12b 100644 --- a/tests/TestCase/Bake/BakeTest.php +++ b/tests/TestCase/Bake/BakeTest.php @@ -26,12 +26,6 @@ public function setUp(): void parent::setUp(); $this->_compareBasePath = Plugin::path('BootstrapUI') . 'tests' . DS . 'comparisons' . DS . 'Template' . DS; - - $this->loadPlugins([ - 'Cake/TwigView' => [ - 'bootstrap' => true, - ], - ]); } public function tearDown(): void diff --git a/tests/TestCase/Command/InstallCommandTest.php b/tests/TestCase/Command/InstallCommandTest.php index d88bd324..113648bd 100644 --- a/tests/TestCase/Command/InstallCommandTest.php +++ b/tests/TestCase/Command/InstallCommandTest.php @@ -574,12 +574,12 @@ public function testNPMInstallFailure() $command ->expects($this->once()) ->method('_runNPMInstall') - ->will($this->returnCallback(function (&$out, &$return) { + ->willReturnCallback(function (&$out, &$return) { $out = [ 'installer output', ]; $return = 1234; - })); + }); $out = new StubConsoleOutput(); $err = new StubConsoleOutput(); diff --git a/tests/TestCase/View/Helper/FlashHelperTest.php b/tests/TestCase/View/Helper/FlashHelperTest.php index 30f899dc..55ee5c1b 100644 --- a/tests/TestCase/View/Helper/FlashHelperTest.php +++ b/tests/TestCase/View/Helper/FlashHelperTest.php @@ -8,6 +8,7 @@ use Cake\Http\Session; use Cake\TestSuite\TestCase; use Cake\View\View; +use PHPUnit\Framework\Attributes\DataProvider; use UnexpectedValueException; /** @@ -63,11 +64,11 @@ public static function flashTypeDefaultsDataProvider(): array } /** - * @dataProvider flashTypeDefaultsDataProvider * @param string $type The flash type. * @param string $class The alert class. * @param string $icon The icon name. */ + #[DataProvider('flashTypeDefaultsDataProvider')] public function testRenderDefaults(string $type, string $class, string $icon) { $this->View->getRequest()->getSession()->write('Flash', [ @@ -445,9 +446,9 @@ public static function flashTypeDataProvider(): array } /** - * @dataProvider flashTypeDataProvider * @param string $type The flash type. */ + #[DataProvider('flashTypeDataProvider')] public function testCustomDefaultIcon(string $type) { $this->Flash->setConfig('icon', 'info'); @@ -466,9 +467,9 @@ public function testCustomDefaultIcon(string $type) } /** - * @dataProvider flashTypeDataProvider * @param string $type The flash type. */ + #[DataProvider('flashTypeDataProvider')] public function testDisableIconsViaConfig(string $type) { $this->Flash->setConfig('icon', false); @@ -490,6 +491,7 @@ public function testDisableIconsViaConfig(string $type) * @dataProvider flashTypeDataProvider * @param string $type The flash type. */ + #[DataProvider('flashTypeDataProvider')] public function testDisableIconViaParamsOption(string $type) { $this->View->getRequest()->getSession()->write('Flash', [ @@ -508,9 +510,9 @@ public function testDisableIconViaParamsOption(string $type) } /** - * @dataProvider flashTypeDataProvider * @param string $type The flash type. */ + #[DataProvider('flashTypeDataProvider')] public function testCustomIconClassMap(string $type) { $iconClassMap = [ @@ -540,9 +542,9 @@ public function testCustomIconClassMap(string $type) } /** - * @dataProvider flashTypeDataProvider * @param string $type The flash type. */ + #[DataProvider('flashTypeDataProvider')] public function testCustomIconClassMapOptions(string $type) { $options = [ diff --git a/tests/TestCase/View/Helper/Types/ClassesTest.php b/tests/TestCase/View/Helper/Types/ClassesTest.php index 901b5569..2223cc55 100644 --- a/tests/TestCase/View/Helper/Types/ClassesTest.php +++ b/tests/TestCase/View/Helper/Types/ClassesTest.php @@ -15,7 +15,6 @@ class ClassesTest extends TestCase * Test get elements * * @return void - * @covers \BootstrapUI\View\Helper\Types\Classes::values */ public function testGetElements() { diff --git a/tests/TestCase/View/Helper/Types/ElementTest.php b/tests/TestCase/View/Helper/Types/ElementTest.php index 461099de..22d352eb 100644 --- a/tests/TestCase/View/Helper/Types/ElementTest.php +++ b/tests/TestCase/View/Helper/Types/ElementTest.php @@ -15,7 +15,6 @@ class ElementTest extends TestCase * Test get elements * * @return void - * @covers \BootstrapUI\View\Helper\Types\Element::values */ public function testGetElements() {