Update Composer, update everything

This commit is contained in:
Oliver Davies 2018-11-23 12:29:20 +00:00
parent ea3e94409f
commit dda5c284b6
19527 changed files with 1135420 additions and 351004 deletions

View file

@ -3,9 +3,7 @@
namespace Drupal\Component\DependencyInjection;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\DependencyInjection\IntrospectableContainerInterface;
use Symfony\Component\DependencyInjection\ResettableContainerInterface;
use Symfony\Component\DependencyInjection\ScopeInterface;
use Symfony\Component\DependencyInjection\Exception\LogicException;
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
@ -43,14 +41,10 @@ use Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceExce
* getAServiceWithAnIdByCamelCase().
* - The function getServiceIds() was added as it has a use-case in core and
* contrib.
* - Scopes are explicitly not allowed, because Symfony 2.8 has deprecated
* them and they will be removed in Symfony 3.0.
* - Synchronized services are explicitly not supported, because Symfony 2.8 has
* deprecated them and they will be removed in Symfony 3.0.
*
* @ingroup container
*/
class Container implements IntrospectableContainerInterface, ResettableContainerInterface {
class Container implements ContainerInterface, ResettableContainerInterface {
/**
* The parameters of the container.
@ -311,12 +305,8 @@ class Container implements IntrospectableContainerInterface, ResettableContainer
}
}
// Share the service if it is public.
if (!isset($definition['public']) || $definition['public'] !== FALSE) {
// Forward compatibility fix for Symfony 2.8 update.
if (!isset($definition['shared']) || $definition['shared'] !== FALSE) {
$this->services[$id] = $service;
}
if (!isset($definition['shared']) || $definition['shared'] !== FALSE) {
$this->services[$id] = $service;
}
if (isset($definition['calls'])) {
@ -361,11 +351,7 @@ class Container implements IntrospectableContainerInterface, ResettableContainer
/**
* {@inheritdoc}
*/
public function set($id, $service, $scope = ContainerInterface::SCOPE_CONTAINER) {
if (!in_array($scope, ['container', 'request']) || ('request' === $scope && 'request' !== $id)) {
@trigger_error('The concept of container scopes is deprecated since version 2.8 and will be removed in 3.0. Omit the third parameter.', E_USER_DEPRECATED);
}
public function set($id, $service) {
$this->services[$id] = $service;
}
@ -587,61 +573,6 @@ class Container implements IntrospectableContainerInterface, ResettableContainer
return $this->getAlternatives($name, array_keys($this->parameters));
}
/**
* {@inheritdoc}
*/
public function enterScope($name) {
if ('request' !== $name) {
@trigger_error('The ' . __METHOD__ . ' method is deprecated since version 2.8 and will be removed in 3.0.', E_USER_DEPRECATED);
}
throw new \BadMethodCallException(sprintf("'%s' is not supported by Drupal 8.", __FUNCTION__));
}
/**
* {@inheritdoc}
*/
public function leaveScope($name) {
if ('request' !== $name) {
@trigger_error('The ' . __METHOD__ . ' method is deprecated since version 2.8 and will be removed in 3.0.', E_USER_DEPRECATED);
}
throw new \BadMethodCallException(sprintf("'%s' is not supported by Drupal 8.", __FUNCTION__));
}
/**
* {@inheritdoc}
*/
public function addScope(ScopeInterface $scope) {
$name = $scope->getName();
if ('request' !== $name) {
@trigger_error('The ' . __METHOD__ . ' method is deprecated since version 2.8 and will be removed in 3.0.', E_USER_DEPRECATED);
}
throw new \BadMethodCallException(sprintf("'%s' is not supported by Drupal 8.", __FUNCTION__));
}
/**
* {@inheritdoc}
*/
public function hasScope($name) {
if ('request' !== $name) {
@trigger_error('The ' . __METHOD__ . ' method is deprecated since version 2.8 and will be removed in 3.0.', E_USER_DEPRECATED);
}
throw new \BadMethodCallException(sprintf("'%s' is not supported by Drupal 8.", __FUNCTION__));
}
/**
* {@inheritdoc}
*/
public function isScopeActive($name) {
@trigger_error('The ' . __METHOD__ . ' method is deprecated since version 2.8 and will be removed in 3.0.', E_USER_DEPRECATED);
throw new \BadMethodCallException(sprintf("'%s' is not supported by Drupal 8.", __FUNCTION__));
}
/**
* Gets all defined service IDs.
*
@ -655,8 +586,7 @@ class Container implements IntrospectableContainerInterface, ResettableContainer
/**
* Ensure that cloning doesn't work.
*/
private function __clone()
{
private function __clone() {
}
}

View file

@ -65,7 +65,7 @@ class OptimizedPhpArrayDumper extends Dumper {
$definition['aliases'] = $this->getAliases();
$definition['parameters'] = $this->getParameters();
$definition['services'] = $this->getServiceDefinitions();
$definition['frozen'] = $this->container->isFrozen();
$definition['frozen'] = $this->container->isCompiled();
$definition['machine_format'] = $this->supportsMachineFormat();
return $definition;
}
@ -103,8 +103,8 @@ class OptimizedPhpArrayDumper extends Dumper {
}
$parameters = $this->container->getParameterBag()->all();
$is_frozen = $this->container->isFrozen();
return $this->prepareParameters($parameters, $is_frozen);
$is_compiled = $this->container->isCompiled();
return $this->prepareParameters($parameters, $is_compiled);
}
/**
@ -237,18 +237,6 @@ class OptimizedPhpArrayDumper extends Dumper {
$service['calls'] = $this->dumpMethodCalls($definition->getMethodCalls());
}
if (($scope = $definition->getScope()) !== ContainerInterface::SCOPE_CONTAINER) {
if ($scope === ContainerInterface::SCOPE_PROTOTYPE) {
// Scope prototype has been replaced with 'shared' => FALSE.
// This is a Symfony 2.8 forward compatibility fix.
// Reference: https://github.com/symfony/symfony/blob/2.8/UPGRADE-2.8.md#dependencyinjection
$service['shared'] = FALSE;
}
else {
throw new InvalidArgumentException("The 'scope' definition is deprecated in Symfony 3.0 and not supported by Drupal 8.");
}
}
// By default services are shared, so just provide the flag, when needed.
if ($definition->isShared() === FALSE) {
$service['shared'] = $definition->isShared();
@ -294,7 +282,6 @@ class OptimizedPhpArrayDumper extends Dumper {
return $code;
}
/**
* Dumps a collection to a PHP array.
*
@ -321,10 +308,10 @@ class OptimizedPhpArrayDumper extends Dumper {
}
}
else {
if (is_object($value)) {
$code[$key] = $this->dumpValue($value);
if (is_object($code[$key])) {
$resolve = TRUE;
}
$code[$key] = $this->dumpValue($value);
}
}
@ -415,6 +402,9 @@ class OptimizedPhpArrayDumper extends Dumper {
elseif ($value instanceof Parameter) {
return $this->getParameterCall((string) $value);
}
elseif (is_string($value) && preg_match('/^\%(.*)\%$/', $value, $matches)) {
return $this->getParameterCall($matches[1]);
}
elseif ($value instanceof Expression) {
throw new RuntimeException('Unable to use expressions as the Symfony ExpressionLanguage component is not installed.');
}

View file

@ -136,12 +136,8 @@ class PhpArrayContainer extends Container {
}
}
// Share the service if it is public.
if (!isset($definition['public']) || $definition['public'] !== FALSE) {
// Forward compatibility fix for Symfony 2.8 update.
if (!isset($definition['shared']) || $definition['shared'] !== FALSE) {
$this->services[$id] = $service;
}
if (!isset($definition['shared']) || $definition['shared'] !== FALSE) {
$this->services[$id] = $service;
}
if (isset($definition['calls'])) {
@ -204,7 +200,7 @@ class PhpArrayContainer extends Container {
// The PhpArrayDumper just uses the hash of the private service
// definition to generate a unique ID.
//
// @see \Drupal\Component\DependecyInjection\Dumper\OptimizedPhpArrayDumper::getPrivateServiceCall
// @see \Drupal\Component\DependencyInjection\Dumper\OptimizedPhpArrayDumper::getPrivateServiceCall
if ($type == 'private_service') {
$id = $argument->id;

View file

@ -4,7 +4,7 @@
"keywords": ["drupal", "dependency injection"],
"type": "library",
"homepage": "https://www.drupal.org/project/drupal",
"license": "GPL-2.0+",
"license": "GPL-2.0-or-later",
"support": {
"issues": "https://www.drupal.org/project/issues/drupal",
"irc": "irc://irc.freenode.net/drupal-contribute",
@ -12,7 +12,7 @@
},
"require": {
"php": ">=5.5.9",
"symfony/dependency-injection": "~2.8"
"symfony/dependency-injection": ">=2.8 <4.0.0"
},
"suggest": {
"symfony/expression-language": "For using expressions in service container configuration"