composer update
This commit is contained in:
parent
f6abc3dce2
commit
71dfaca858
1753 changed files with 45274 additions and 14619 deletions
|
@ -26,7 +26,7 @@ interface ConfigCacheFactoryInterface
|
|||
* @param string $file The absolute cache file path
|
||||
* @param callable $callable The callable to be executed when the cache needs to be filled (i. e. is not fresh). The cache will be passed as the only parameter to this callback
|
||||
*
|
||||
* @return ConfigCacheInterface $configCache The cache instance
|
||||
* @return ConfigCacheInterface The cache instance
|
||||
*/
|
||||
public function cache($file, $callable);
|
||||
}
|
||||
|
|
|
@ -92,7 +92,7 @@ class ArrayNode extends BaseNode implements PrototypeNodeInterface
|
|||
/**
|
||||
* Gets the xml remappings that should be performed.
|
||||
*
|
||||
* @return array $remappings an array of the form array(array(string, string))
|
||||
* @return array an array of the form array(array(string, string))
|
||||
*/
|
||||
public function getXmlRemappings()
|
||||
{
|
||||
|
@ -292,7 +292,10 @@ class ArrayNode extends BaseNode implements PrototypeNodeInterface
|
|||
$normalized = array();
|
||||
foreach ($value as $name => $val) {
|
||||
if (isset($this->children[$name])) {
|
||||
$normalized[$name] = $this->children[$name]->normalize($val);
|
||||
try {
|
||||
$normalized[$name] = $this->children[$name]->normalize($val);
|
||||
} catch (UnsetKeyException $e) {
|
||||
}
|
||||
unset($value[$name]);
|
||||
} elseif (!$this->removeExtraKeys) {
|
||||
$normalized[$name] = $val;
|
||||
|
|
|
@ -282,7 +282,7 @@ abstract class BaseNode implements NodeInterface
|
|||
*
|
||||
* @param $value
|
||||
*
|
||||
* @return $value The normalized array value
|
||||
* @return The normalized array value
|
||||
*/
|
||||
protected function preNormalize($value)
|
||||
{
|
||||
|
|
|
@ -174,7 +174,7 @@ class ExprBuilder
|
|||
}
|
||||
|
||||
/**
|
||||
* Sets a closure marking the value as invalid at validation time.
|
||||
* Sets a closure marking the value as invalid at processing time.
|
||||
*
|
||||
* if you want to add the value of the node in your message just use a %s placeholder.
|
||||
*
|
||||
|
@ -192,7 +192,7 @@ class ExprBuilder
|
|||
}
|
||||
|
||||
/**
|
||||
* Sets a closure unsetting this key of the array at validation time.
|
||||
* Sets a closure unsetting this key of the array at processing time.
|
||||
*
|
||||
* @return $this
|
||||
*
|
||||
|
|
|
@ -133,7 +133,7 @@ class NodeBuilder implements NodeParentInterface
|
|||
/**
|
||||
* Returns the parent node.
|
||||
*
|
||||
* @return ParentNodeDefinitionInterface|NodeDefinition The parent node
|
||||
* @return NodeDefinition&ParentNodeDefinitionInterface The parent node
|
||||
*/
|
||||
public function end()
|
||||
{
|
||||
|
|
|
@ -345,7 +345,7 @@ abstract class NodeDefinition implements NodeParentInterface
|
|||
/**
|
||||
* Instantiate and configure the node according to this definition.
|
||||
*
|
||||
* @return NodeInterface $node The node instance
|
||||
* @return NodeInterface The node instance
|
||||
*
|
||||
* @throws InvalidDefinitionException When the definition is invalid
|
||||
*/
|
||||
|
|
2
vendor/symfony/config/LICENSE
vendored
2
vendor/symfony/config/LICENSE
vendored
|
@ -1,4 +1,4 @@
|
|||
Copyright (c) 2004-2018 Fabien Potencier
|
||||
Copyright (c) 2004-2019 Fabien Potencier
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
@ -231,6 +231,25 @@ class ArrayNodeDefinitionTest extends TestCase
|
|||
$this->assertFalse($this->getField($node, 'normalizeKeys'));
|
||||
}
|
||||
|
||||
public function testUnsetChild()
|
||||
{
|
||||
$node = new ArrayNodeDefinition('root');
|
||||
$node
|
||||
->children()
|
||||
->scalarNode('value')
|
||||
->beforeNormalization()
|
||||
->ifTrue(function ($value) {
|
||||
return empty($value);
|
||||
})
|
||||
->thenUnset()
|
||||
->end()
|
||||
->end()
|
||||
->end()
|
||||
;
|
||||
|
||||
$this->assertSame(array(), $node->getNode()->normalize(array('value' => null)));
|
||||
}
|
||||
|
||||
public function testPrototypeVariable()
|
||||
{
|
||||
$node = new ArrayNodeDefinition('root');
|
||||
|
|
2
vendor/symfony/config/phpunit.xml.dist
vendored
2
vendor/symfony/config/phpunit.xml.dist
vendored
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.1/phpunit.xsd"
|
||||
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/5.2/phpunit.xsd"
|
||||
backupGlobals="false"
|
||||
colors="true"
|
||||
bootstrap="vendor/autoload.php"
|
||||
|
|
Reference in a new issue