Update to Drupal 8.0.0 beta 14. For more information, see https://drupal.org/node/2544542
This commit is contained in:
parent
3b2511d96d
commit
81ccda77eb
2155 changed files with 54307 additions and 46870 deletions
|
@ -126,10 +126,11 @@ class XmlFileLoader extends FileLoader
|
|||
* Parses an individual Definition.
|
||||
*
|
||||
* @param \DOMElement $service
|
||||
* @param string $file
|
||||
*
|
||||
* @return Definition|null
|
||||
*/
|
||||
private function parseDefinition(\DOMElement $service)
|
||||
private function parseDefinition(\DOMElement $service, $file)
|
||||
{
|
||||
if ($alias = $service->getAttribute('alias')) {
|
||||
$public = true;
|
||||
|
@ -149,13 +150,22 @@ class XmlFileLoader extends FileLoader
|
|||
|
||||
foreach (array('class', 'scope', 'public', 'factory-class', 'factory-method', 'factory-service', 'synthetic', 'lazy', 'abstract') as $key) {
|
||||
if ($value = $service->getAttribute($key)) {
|
||||
if (in_array($key, array('factory-class', 'factory-method', 'factory-service'))) {
|
||||
@trigger_error(sprintf('The "%s" attribute of service "%s" in file "%s" is deprecated since version 2.6 and will be removed in 3.0. Use the "factory" element instead.', $key, (string) $service->getAttribute('id'), $file), E_USER_DEPRECATED);
|
||||
}
|
||||
$method = 'set'.str_replace('-', '', $key);
|
||||
$definition->$method(XmlUtils::phpize($value));
|
||||
}
|
||||
}
|
||||
|
||||
if ($value = $service->getAttribute('synchronized')) {
|
||||
$definition->setSynchronized(XmlUtils::phpize($value), 'request' !== (string) $service->getAttribute('id'));
|
||||
$triggerDeprecation = 'request' !== (string) $service->getAttribute('id');
|
||||
|
||||
if ($triggerDeprecation) {
|
||||
@trigger_error(sprintf('The "synchronized" attribute of service "%s" in file "%s" is deprecated since version 2.7 and will be removed in 3.0.', (string) $service->getAttribute('id'), $file), E_USER_DEPRECATED);
|
||||
}
|
||||
|
||||
$definition->setSynchronized(XmlUtils::phpize($value), $triggerDeprecation);
|
||||
}
|
||||
|
||||
if ($files = $this->getChildren($service, 'file')) {
|
||||
|
@ -173,7 +183,7 @@ class XmlFileLoader extends FileLoader
|
|||
$factoryService = $this->getChildren($factory, 'service');
|
||||
|
||||
if (isset($factoryService[0])) {
|
||||
$class = $this->parseDefinition($factoryService[0]);
|
||||
$class = $this->parseDefinition($factoryService[0], $file);
|
||||
} elseif ($childService = $factory->getAttribute('service')) {
|
||||
$class = new Reference($childService, ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE, false);
|
||||
} else {
|
||||
|
@ -192,7 +202,7 @@ class XmlFileLoader extends FileLoader
|
|||
$configuratorService = $this->getChildren($configurator, 'service');
|
||||
|
||||
if (isset($configuratorService[0])) {
|
||||
$class = $this->parseDefinition($configuratorService[0]);
|
||||
$class = $this->parseDefinition($configuratorService[0], $file);
|
||||
} elseif ($childService = $configurator->getAttribute('service')) {
|
||||
$class = new Reference($childService, ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE, false);
|
||||
} else {
|
||||
|
@ -233,7 +243,7 @@ class XmlFileLoader extends FileLoader
|
|||
}
|
||||
|
||||
/**
|
||||
* Parses a XML file to a \DOMDocument
|
||||
* Parses a XML file to a \DOMDocument.
|
||||
*
|
||||
* @param string $file Path to a file
|
||||
*
|
||||
|
@ -392,7 +402,7 @@ class XmlFileLoader extends FileLoader
|
|||
}
|
||||
|
||||
/**
|
||||
* Get child elements by name
|
||||
* Get child elements by name.
|
||||
*
|
||||
* @param \DOMNode $node
|
||||
* @param mixed $name
|
||||
|
|
|
@ -172,6 +172,7 @@ class YamlFileLoader extends FileLoader
|
|||
}
|
||||
|
||||
if (isset($service['synchronized'])) {
|
||||
@trigger_error(sprintf('The "synchronized" key of service "%s" in file "%s" is deprecated since version 2.7 and will be removed in 3.0.', $id, $file), E_USER_DEPRECATED);
|
||||
$definition->setSynchronized($service['synchronized'], 'request' !== $id);
|
||||
}
|
||||
|
||||
|
@ -201,14 +202,17 @@ class YamlFileLoader extends FileLoader
|
|||
}
|
||||
|
||||
if (isset($service['factory_class'])) {
|
||||
@trigger_error(sprintf('The "factory_class" key of service "%s" in file "%s" is deprecated since version 2.6 and will be removed in 3.0. Use "factory" instead.', $id, $file), E_USER_DEPRECATED);
|
||||
$definition->setFactoryClass($service['factory_class']);
|
||||
}
|
||||
|
||||
if (isset($service['factory_method'])) {
|
||||
@trigger_error(sprintf('The "factory_method" key of service "%s" in file "%s" is deprecated since version 2.6 and will be removed in 3.0. Use "factory" instead.', $id, $file), E_USER_DEPRECATED);
|
||||
$definition->setFactoryMethod($service['factory_method']);
|
||||
}
|
||||
|
||||
if (isset($service['factory_service'])) {
|
||||
@trigger_error(sprintf('The "factory_service" key of service "%s" in file "%s" is deprecated since version 2.6 and will be removed in 3.0. Use "factory" instead.', $id, $file), E_USER_DEPRECATED);
|
||||
$definition->setFactoryService($service['factory_service']);
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue