Merge branch '3.1'

* 3.1:
  [PropertyAccess] Fix for PHP 7.0.7
  [Yaml] search for colons in strings only
  bumped Symfony version to 3.1.0
  updated VERSION for 3.1.0-RC1
  updated CHANGELOG for 3.1.0-RC1
  fixed PHP 5.3 compat in tests
This commit is contained in:
Nicolas Grekas 2016-05-29 11:50:57 +02:00
commit bfdd905744
5 changed files with 45 additions and 5 deletions

View File

@ -7,6 +7,27 @@ in 3.1 minor versions.
To get the diff for a specific change, go to https://github.com/symfony/symfony/commit/XXX where XXX is the change hash
To get the diff between two versions, go to https://github.com/symfony/symfony/compare/v3.1.0...v3.1.1
* 3.1.0-RC1 (2016-05-26)
* bug #18879 [Console] SymfonyStyle: Align multi-line/very-long-line blocks (chalasr)
* bug #18881 [Security][Ldap] Fixed issue with password attribute containing an array of values. (csarrazi)
* bug #18864 [Console][DX] Fixed ambiguous error message when using a duplicate option shortcut (peterrehm)
* bug #18883 Fix js comment in profiler (linnaea)
* feature #18867 [Cache] Drop counting hit/miss in ProxyAdapter (nicolas-grekas)
* bug #18837 [Serializer] AbstractObjectNormalizer: be sure that isAllowedAttribute is called (dunglas)
* bug #18838 [Serializer] ObjectNormalizer: add missing parameters (dunglas)
* bug #18844 [Yaml] fix exception contexts (xabbuh)
* bug #18840 [Yaml] properly handle unindented collections (xabbuh)
* bug #18765 Catch \Throwable (fprochazka)
* bug #18813 Catch \Throwable (fprochazka)
* bug #18839 People - person singularization (Keeo)
* bug #18820 [Config] Allow schemed paths in FileResource (nicolas-grekas)
* bug #18828 [Yaml] chomp newlines only at the end of YAML documents (xabbuh)
* bug #18814 Fixed server status command when port has been omitted (peterrehm)
* bug #18759 [Validator] Support for DateTimeImmutable (krzysiekpiasecki)
* bug #18799 Use levenshtein level for better Bundle matching (j0k3r)
* bug #18413 [WebProfilerBundle] Fix CORS ajax security issues (romainneutron)
* 3.1.0-BETA1 (2016-05-13)
* feature #18725 [Ldap] Added the possibility to configure all available Ldap options for connection (csarrazi)

View File

@ -7,5 +7,5 @@ use Symfony\Component\Console\Tests\Style\SymfonyStyleWithForcedLineLength;
//Ensure that all lines are aligned to the begin of the first line in a multi-line block
return function (InputInterface $input, OutputInterface $output) {
$output = new SymfonyStyleWithForcedLineLength($input, $output);
$output->block(['Custom block', 'Second custom block line'], 'CUSTOM', 'fg=white;bg=green', 'X ', true);
$output->block(array('Custom block', 'Second custom block line'), 'CUSTOM', 'fg=white;bg=green', 'X ', true);
};

View File

@ -242,7 +242,9 @@ class PropertyAccessorTest extends \PHPUnit_Framework_TestCase
*/
public function testSetValueThrowsExceptionIfNotArrayAccess()
{
$this->propertyAccessor->setValue(new \stdClass(), '[index]', 'Updated');
$object = new \stdClass();
$this->propertyAccessor->setValue($object, '[index]', 'Updated');
}
public function testSetValueUpdatesMagicSet()
@ -259,7 +261,9 @@ class PropertyAccessorTest extends \PHPUnit_Framework_TestCase
*/
public function testSetValueThrowsExceptionIfThereAreMissingParameters()
{
$this->propertyAccessor->setValue(new TestClass('Bernhard'), 'publicAccessorWithMoreRequiredParameters', 'Updated');
$object = new TestClass('Bernhard');
$this->propertyAccessor->setValue($object, 'publicAccessorWithMoreRequiredParameters', 'Updated');
}
/**
@ -527,7 +531,9 @@ class PropertyAccessorTest extends \PHPUnit_Framework_TestCase
*/
public function testThrowTypeError()
{
$this->propertyAccessor->setValue(new TypeHinted(), 'date', 'This is a string, \DateTime expected.');
$object = new TypeHinted();
$this->propertyAccessor->setValue($object, 'date', 'This is a string, \DateTime expected.');
}
public function testSetTypeHint()

View File

@ -539,7 +539,7 @@ class Parser
try {
$parsedValue = Inline::parse($value, $flags, $this->refs);
if ('mapping' === $context && '"' !== $value[0] && "'" !== $value[0] && '[' !== $value[0] && '{' !== $value[0] && '!' !== $value[0] && false !== strpos($parsedValue, ': ')) {
if ('mapping' === $context && is_string($parsedValue) && '"' !== $value[0] && "'" !== $value[0] && '[' !== $value[0] && '{' !== $value[0] && '!' !== $value[0] && false !== strpos($parsedValue, ': ')) {
throw new ParseException('A colon cannot be used in an unquoted mapping value.');
}

View File

@ -1251,6 +1251,19 @@ EOT
),
);
}
public function testParseDateAsMappingValue()
{
$yaml = <<<EOT
date: 2002-12-14
EOT;
$expectedDate = new \DateTime();
$expectedDate->setTimeZone(new \DateTimeZone('UTC'));
$expectedDate->setDate(2002, 12, 14);
$expectedDate->setTime(0, 0, 0);
$this->assertEquals(array('date' => $expectedDate), $this->parser->parse($yaml, Yaml::PARSE_DATETIME));
}
}
class B