mirror of
https://github.com/linuxserver/Heimdall.git
synced 2025-12-02 21:19:58 +09:00
update to laravel 5.7 and try getting autologin saved
This commit is contained in:
79
vendor/symfony/http-kernel/Bundle/Bundle.php
vendored
79
vendor/symfony/http-kernel/Bundle/Bundle.php
vendored
@@ -11,11 +11,10 @@
|
||||
|
||||
namespace Symfony\Component\HttpKernel\Bundle;
|
||||
|
||||
use Symfony\Component\Console\Application;
|
||||
use Symfony\Component\DependencyInjection\Container;
|
||||
use Symfony\Component\DependencyInjection\ContainerAwareTrait;
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
use Symfony\Component\DependencyInjection\Container;
|
||||
use Symfony\Component\Console\Application;
|
||||
use Symfony\Component\Finder\Finder;
|
||||
use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
|
||||
|
||||
/**
|
||||
@@ -34,23 +33,21 @@ abstract class Bundle implements BundleInterface
|
||||
private $namespace;
|
||||
|
||||
/**
|
||||
* Boots the Bundle.
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Shutdowns the Bundle.
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function shutdown()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Builds the bundle.
|
||||
*
|
||||
* It is only ever called once when the cache is empty.
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* This method can be overridden to register compilation passes,
|
||||
* other extensions, ...
|
||||
@@ -73,7 +70,7 @@ abstract class Bundle implements BundleInterface
|
||||
|
||||
if (null !== $extension) {
|
||||
if (!$extension instanceof ExtensionInterface) {
|
||||
throw new \LogicException(sprintf('Extension %s must implement Symfony\Component\DependencyInjection\Extension\ExtensionInterface.', get_class($extension)));
|
||||
throw new \LogicException(sprintf('Extension %s must implement Symfony\Component\DependencyInjection\Extension\ExtensionInterface.', \get_class($extension)));
|
||||
}
|
||||
|
||||
// check naming convention
|
||||
@@ -81,10 +78,7 @@ abstract class Bundle implements BundleInterface
|
||||
$expectedAlias = Container::underscore($basename);
|
||||
|
||||
if ($expectedAlias != $extension->getAlias()) {
|
||||
throw new \LogicException(sprintf(
|
||||
'Users will expect the alias of the default extension of a bundle to be the underscored version of the bundle name ("%s"). You can override "Bundle::getContainerExtension()" if you want to use "%s" or another alias.',
|
||||
$expectedAlias, $extension->getAlias()
|
||||
));
|
||||
throw new \LogicException(sprintf('Users will expect the alias of the default extension of a bundle to be the underscored version of the bundle name ("%s"). You can override "Bundle::getContainerExtension()" if you want to use "%s" or another alias.', $expectedAlias, $extension->getAlias()));
|
||||
}
|
||||
|
||||
$this->extension = $extension;
|
||||
@@ -99,9 +93,7 @@ abstract class Bundle implements BundleInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the Bundle namespace.
|
||||
*
|
||||
* @return string The Bundle namespace
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getNamespace()
|
||||
{
|
||||
@@ -113,29 +105,18 @@ abstract class Bundle implements BundleInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the Bundle directory path.
|
||||
*
|
||||
* @return string The Bundle absolute path
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getPath()
|
||||
{
|
||||
if (null === $this->path) {
|
||||
$reflected = new \ReflectionObject($this);
|
||||
$this->path = dirname($reflected->getFileName());
|
||||
$this->path = \dirname($reflected->getFileName());
|
||||
}
|
||||
|
||||
return $this->path;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the bundle parent name.
|
||||
*
|
||||
* @return string|null The Bundle parent name it overrides or null if no parent
|
||||
*/
|
||||
public function getParent()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the bundle name (the class short name).
|
||||
*
|
||||
@@ -150,48 +131,8 @@ abstract class Bundle implements BundleInterface
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds and registers Commands.
|
||||
*
|
||||
* Override this method if your bundle commands do not follow the conventions:
|
||||
*
|
||||
* * Commands are in the 'Command' sub-directory
|
||||
* * Commands extend Symfony\Component\Console\Command\Command
|
||||
*/
|
||||
public function registerCommands(Application $application)
|
||||
{
|
||||
if (!is_dir($dir = $this->getPath().'/Command')) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!class_exists('Symfony\Component\Finder\Finder')) {
|
||||
throw new \RuntimeException('You need the symfony/finder component to register bundle commands.');
|
||||
}
|
||||
|
||||
$finder = new Finder();
|
||||
$finder->files()->name('*Command.php')->in($dir);
|
||||
|
||||
$prefix = $this->getNamespace().'\\Command';
|
||||
foreach ($finder as $file) {
|
||||
$ns = $prefix;
|
||||
if ($relativePath = $file->getRelativePath()) {
|
||||
$ns .= '\\'.str_replace('/', '\\', $relativePath);
|
||||
}
|
||||
$class = $ns.'\\'.$file->getBasename('.php');
|
||||
if ($this->container) {
|
||||
$commandIds = $this->container->hasParameter('console.command.ids') ? $this->container->getParameter('console.command.ids') : array();
|
||||
$alias = 'console.command.'.strtolower(str_replace('\\', '_', $class));
|
||||
if (isset($commandIds[$alias]) || $this->container->has($alias)) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
$r = new \ReflectionClass($class);
|
||||
if ($r->isSubclassOf('Symfony\\Component\\Console\\Command\\Command') && !$r->isAbstract() && !$r->getConstructor()->getNumberOfRequiredParameters()) {
|
||||
@trigger_error(sprintf('Auto-registration of the command "%s" is deprecated since Symfony 3.4 and won\'t be supported in 4.0. Use PSR-4 based service discovery instead.', $class), E_USER_DEPRECATED);
|
||||
|
||||
$application->add($r->newInstance());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user