Update to laravel 7

This commit is contained in:
KodeStar
2022-03-10 11:54:29 +00:00
parent 61a5a1a8b0
commit f9a19fce91
7170 changed files with 274189 additions and 283773 deletions

View File

@@ -18,8 +18,7 @@ use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
/**
* An implementation of BundleInterface that adds a few conventions
* for DependencyInjection extensions and Console commands.
* An implementation of BundleInterface that adds a few conventions for DependencyInjection extensions.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
@@ -59,7 +58,7 @@ abstract class Bundle implements BundleInterface
/**
* Returns the bundle's container extension.
*
* @return ExtensionInterface|null The container extension
* @return ExtensionInterface|null
*
* @throws \LogicException
*/
@@ -70,7 +69,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_debug_type($extension)));
}
// check naming convention
@@ -87,9 +86,7 @@ abstract class Bundle implements BundleInterface
}
}
if ($this->extension) {
return $this->extension;
}
return $this->extension ?: null;
}
/**
@@ -119,10 +116,8 @@ abstract class Bundle implements BundleInterface
/**
* Returns the bundle name (the class short name).
*
* @return string The Bundle name
*/
final public function getName()
final public function getName(): string
{
if (null === $this->name) {
$this->parseClassName();
@@ -154,9 +149,7 @@ abstract class Bundle implements BundleInterface
*/
protected function createContainerExtension()
{
if (class_exists($class = $this->getContainerExtensionClass())) {
return new $class();
}
return class_exists($class = $this->getContainerExtensionClass()) ? new $class() : null;
}
private function parseClassName()

View File

@@ -42,21 +42,21 @@ interface BundleInterface extends ContainerAwareInterface
/**
* Returns the container extension that should be implicitly loaded.
*
* @return ExtensionInterface|null The default extension or null if there is none
* @return ExtensionInterface|null
*/
public function getContainerExtension();
/**
* Returns the bundle name (the class short name).
*
* @return string The Bundle name
* @return string
*/
public function getName();
/**
* Gets the Bundle namespace.
*
* @return string The Bundle namespace
* @return string
*/
public function getNamespace();
@@ -65,7 +65,7 @@ interface BundleInterface extends ContainerAwareInterface
*
* The path should always be returned as a Unix path (with /).
*
* @return string The Bundle absolute path
* @return string
*/
public function getPath();
}