Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrap addPlugin() call in has() check. #983

Open
wants to merge 1 commit into
base: 3.next
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/BakePlugin.php
Expand Up @@ -55,7 +55,9 @@
*/
public function bootstrap(PluginApplicationInterface $app): void
{
$app->addPlugin('Cake/TwigView');
if (!$app->getPlugins()->has('Cake/TwigView')) {

Check failure on line 58 in src/BakePlugin.php

View workflow job for this annotation

GitHub Actions / cs-stan / Coding Standard & Static Analysis

Call to an undefined method Cake\Core\PluginApplicationInterface::getPlugins().

Check failure on line 58 in src/BakePlugin.php

View workflow job for this annotation

GitHub Actions / cs-stan / Coding Standard & Static Analysis

UndefinedInterfaceMethod

src/BakePlugin.php:58:20: UndefinedInterfaceMethod: Method Cake\Core\PluginApplicationInterface::getPlugins does not exist (see https://psalm.dev/181)
$app->addPlugin('Cake/TwigView');
}
}

/**
Expand Down