update2
This commit is contained in:
parent
98419bd18d
commit
8a69e45efa
4919 changed files with 28311 additions and 224136 deletions
16
pfosten/vendor/symfony/http-kernel/Bundle/Bundle.php
vendored
Executable file → Normal file
16
pfosten/vendor/symfony/http-kernel/Bundle/Bundle.php
vendored
Executable file → Normal file
|
|
@ -11,12 +11,12 @@
|
|||
|
||||
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;
|
||||
use Symfony\Component\Finder\Finder;
|
||||
|
||||
/**
|
||||
* An implementation of BundleInterface that adds a few conventions
|
||||
|
|
@ -54,8 +54,6 @@ abstract class Bundle implements BundleInterface
|
|||
*
|
||||
* This method can be overridden to register compilation passes,
|
||||
* other extensions, ...
|
||||
*
|
||||
* @param ContainerBuilder $container A ContainerBuilder instance
|
||||
*/
|
||||
public function build(ContainerBuilder $container)
|
||||
{
|
||||
|
|
@ -75,7 +73,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
|
||||
|
|
@ -123,7 +121,7 @@ abstract class Bundle implements BundleInterface
|
|||
{
|
||||
if (null === $this->path) {
|
||||
$reflected = new \ReflectionObject($this);
|
||||
$this->path = dirname($reflected->getFileName());
|
||||
$this->path = \dirname($reflected->getFileName());
|
||||
}
|
||||
|
||||
return $this->path;
|
||||
|
|
@ -159,8 +157,6 @@ abstract class Bundle implements BundleInterface
|
|||
*
|
||||
* * Commands are in the 'Command' sub-directory
|
||||
* * Commands extend Symfony\Component\Console\Command\Command
|
||||
*
|
||||
* @param Application $application An Application instance
|
||||
*/
|
||||
public function registerCommands(Application $application)
|
||||
{
|
||||
|
|
@ -191,6 +187,8 @@ abstract class Bundle implements BundleInterface
|
|||
}
|
||||
$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());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
4
pfosten/vendor/symfony/http-kernel/Bundle/BundleInterface.php
vendored
Executable file → Normal file
4
pfosten/vendor/symfony/http-kernel/Bundle/BundleInterface.php
vendored
Executable file → Normal file
|
|
@ -36,8 +36,6 @@ interface BundleInterface extends ContainerAwareInterface
|
|||
* Builds the bundle.
|
||||
*
|
||||
* It is only ever called once when the cache is empty.
|
||||
*
|
||||
* @param ContainerBuilder $container A ContainerBuilder instance
|
||||
*/
|
||||
public function build(ContainerBuilder $container);
|
||||
|
||||
|
|
@ -56,6 +54,8 @@ interface BundleInterface extends ContainerAwareInterface
|
|||
* bundle.
|
||||
*
|
||||
* @return string The Bundle name it overrides or null if no parent
|
||||
*
|
||||
* @deprecated This method is deprecated as of 3.4 and will be removed in 4.0.
|
||||
*/
|
||||
public function getParent();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue