mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-24 02:58:43 +02:00
⬆️ N°4770 Update to latest Symfony 3.4
This commit is contained in:
@@ -65,7 +65,7 @@ abstract class Extension implements ExtensionInterface, ConfigurationExtensionIn
|
||||
*/
|
||||
public function getAlias()
|
||||
{
|
||||
$className = \get_class($this);
|
||||
$className = static::class;
|
||||
if ('Extension' != substr($className, -9)) {
|
||||
throw new BadMethodCallException('This extension does not follow the naming convention; you must overwrite the getAlias() method.');
|
||||
}
|
||||
@@ -79,7 +79,12 @@ abstract class Extension implements ExtensionInterface, ConfigurationExtensionIn
|
||||
*/
|
||||
public function getConfiguration(array $config, ContainerBuilder $container)
|
||||
{
|
||||
$class = \get_class($this);
|
||||
$class = static::class;
|
||||
|
||||
if (false !== strpos($class, "\0")) {
|
||||
return null; // ignore anonymous classes
|
||||
}
|
||||
|
||||
$class = substr_replace($class, '\Configuration', strrpos($class, '\\'));
|
||||
$class = $container->getReflectionClass($class);
|
||||
$constructor = $class ? $class->getConstructor() : null;
|
||||
|
||||
Reference in New Issue
Block a user