diff --git a/.phive/phars.xml b/.phive/phars.xml index 1f56b2bc..da575cba 100644 --- a/.phive/phars.xml +++ b/.phive/phars.xml @@ -1,5 +1,5 @@ - - + + diff --git a/phpstan.neon b/phpstan.neon index a1af9249..32434594 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -3,8 +3,9 @@ includes: parameters: level: 6 - checkMissingIterableValueType: false paths: - src/ bootstrapFiles: - tests/bootstrap.php + ignoreErrors: + - identifier: missingType.iterableValue diff --git a/src/BakePlugin.php b/src/BakePlugin.php index 5cba4765..9e491904 100644 --- a/src/BakePlugin.php +++ b/src/BakePlugin.php @@ -23,6 +23,7 @@ use Cake\Core\Configure; use Cake\Core\Plugin; use Cake\Core\PluginApplicationInterface; +use Cake\Http\BaseApplication; use DirectoryIterator; use ReflectionClass; use ReflectionException; @@ -55,7 +56,11 @@ class BakePlugin extends BasePlugin */ public function bootstrap(PluginApplicationInterface $app): void { - $app->addPlugin('Cake/TwigView'); + assert($app instanceof BaseApplication); + + if (!$app->getPlugins()->has('Cake/TwigView')) { + $app->addPlugin('Cake/TwigView'); + } } /**