Skip to content

Commit

Permalink
Merge branch '2.3' into 2.4
Browse files Browse the repository at this point in the history
* 2.3:
  [Validator] Backported constraint validator tests from 2.5
  Fix toolbar vertical alignment.
  [HttpFoundation] MongoDbSessionHandler supports auto expiry via configurable expiry_field
  [FrameworkBundle] add missing attribute to XSD
  Allow basic auth in url. Improve regex. Add tests.
  fix typos and syntax in Profiler controller method comments
  remove volatile tests
  [Console] fixed style creation when providing an unknown tag option
  [Validator] Convert objects to string in comparison validators. Reapplies 6cf5e0812e6f20d60acbc0324abf96475e89b6ef
  [HttpFoundation] Update QUERY_STRING when overrideGlobals

Conflicts:
	src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/UniqueValidatorTest.php
	src/Symfony/Component/HttpFoundation/Tests/RequestTest.php
	src/Symfony/Component/Validator/Constraints/AllValidator.php
	src/Symfony/Component/Validator/Constraints/CollectionValidator.php
	src/Symfony/Component/Validator/Tests/Constraints/AbstractComparisonValidatorTestCase.php
	src/Symfony/Component/Validator/Tests/Constraints/CallbackValidatorTest.php
	src/Symfony/Component/Validator/Tests/Constraints/EqualToValidatorTest.php
	src/Symfony/Component/Validator/Tests/Constraints/FileValidatorTest.php
	src/Symfony/Component/Validator/Tests/Constraints/GreaterThanValidatorTest.php
	src/Symfony/Component/Validator/Tests/Constraints/IdenticalToValidatorTest.php
	src/Symfony/Component/Validator/Tests/Constraints/ImageValidatorTest.php
	src/Symfony/Component/Validator/Tests/Constraints/LessThanOrEqualValidatorTest.php
	src/Symfony/Component/Validator/Tests/Constraints/LessThanValidatorTest.php
	src/Symfony/Component/Validator/Tests/Constraints/NotEqualToValidatorTest.php
	src/Symfony/Component/Validator/Tests/Constraints/NotIdenticalToValidatorTest.php
	src/Symfony/Component/Validator/Tests/Constraints/UrlValidatorTest.php
  • Loading branch information
webmozart committed Aug 14, 2014
2 parents 6fa9b33 + a2723f9 commit 6cdbe19
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion Formatter/OutputFormatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,11 @@ private function createStyleFromString($string)
} elseif ('bg' == $match[0]) {
$style->setBackground($match[1]);
} else {
$style->setOption($match[1]);
try {
$style->setOption($match[1]);
} catch (\InvalidArgumentException $e) {
return false;
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion Tests/Formatter/OutputFormatterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ public function testNonStyleTag()
{
$formatter = new OutputFormatter(true);

$this->assertEquals("\033[32msome \033[0m\033[32m<tag>\033[0m\033[32m styled \033[0m\033[32m<p>\033[0m\033[32msingle-char tag\033[0m\033[32m</p>\033[0m", $formatter->format('<info>some <tag> styled <p>single-char tag</p></info>'));
$this->assertEquals("\033[32msome \033[0m\033[32m<tag>\033[0m\033[32m \033[0m\033[32m<setting=value>\033[0m\033[32m styled \033[0m\033[32m<p>\033[0m\033[32msingle-char tag\033[0m\033[32m</p>\033[0m", $formatter->format('<info>some <tag> <setting=value> styled <p>single-char tag</p></info>'));
}

public function testFormatLongString()
Expand Down

0 comments on commit 6cdbe19

Please sign in to comment.