fix deprecations (move same controller) (#2440)

This commit is contained in:
Kevin Papst
2021-03-16 14:06:15 +01:00
committed by GitHub
parent 75e62b800c
commit 16e8e8a5e5
11 changed files with 128 additions and 34 deletions

View File

@@ -115,15 +115,13 @@ class Kernel extends BaseKernel
yield new $class();
}
}
return;
}
// ... or we load them dynamically from the plugins directory
foreach ($this->getBundleDirectories() as $bundleDir) {
$bundleName = $bundleDir->getRelativePathname();
$pluginClass = 'KimaiPlugin\\' . $bundleName . '\\' . $bundleName;
yield new $pluginClass();
} else {
// ... or we load them dynamically from the plugins directory
foreach ($this->getBundleDirectories() as $bundleDir) {
$bundleName = $bundleDir->getRelativePathname();
$pluginClass = 'KimaiPlugin\\' . $bundleName . '\\' . $bundleName;
yield new $pluginClass();
}
}
}
@@ -209,7 +207,6 @@ class Kernel extends BaseKernel
// some routes are based on app configs and will be imported manually
$this->configureFosUserRoutes($routes);
$this->configureSamlRoutes($routes);
// load bundle specific route files
if (is_dir($confDir . '/routes/')) {
@@ -251,15 +248,4 @@ class Kernel extends BaseKernel
);
}
}
protected function configureSamlRoutes(RouteCollectionBuilder $routes)
{
$saml = $this->getContainer()->getParameter('kimai.saml');
if (!$saml['activate']) {
return;
}
$routes->import('../src/Saml/Controller/SamlController.php', '/auth', 'annotation');
}
}