fix deprecations (move same controller) (#2440)
This commit is contained in:
@@ -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');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user