Permalink
Browse files

Merge branch '2.1'

* 2.1: (24 commits)
  forced Travis to use source to workaround their not-up-to-date Composer on PHP 5.3.3
  [Routing] removed irrelevant string cast in Route
  Fixed typo
  Make YamlFileLoader and XmlFileLoader file loading extensible
  [HttpKernel] fix typo
  Fixed singularization of "prices"
  [Form] Removed an exception that prevented valid formats from being passed, e.g. "h" for the hour, "L" for the month etc.
  [HttpKernel] fixed Client when using StreamedResponses (closes #5370)
  fixed PDO session handler for Oracle (closes #5829)
  [HttpFoundation] fixed PDO session handler for Oracle (closes #5829)
  [Locale] removed a check that is done too early (and it is done twice anyways)
  Update src/Symfony/Component/Validator/Resources/translations/validators.fa.xlf
  Adding new localized strings for farsi validation.
  [HttpFoundation] moved the HTTP protocol check from StreamedResponse to Response (closes #5937)
  [Form] Fixed forms not to be marked invalid if their children are already marked invalid
  [Form] Excluded some tests in NumberToLocalizedStringTransformerTest which fail on ICU 4.4, but work on ICU 4.8
  added missing tests from previous merge
  [Form] Fixed NumberToLocalizedStringTransformer to accept both comma and dot as decimal separator, if possible
  Fix export-ignore on Windows
  Show correct class name InputArgument in error message
  ...

Conflicts:
	.travis.yml
	src/Symfony/Component/Form/Extension/Core/DataTransformer/NumberToLocalizedStringTransformer.php
  • Loading branch information...
2 parents 7907e71 + 528b030 commit 6da537054e8f9f795e64a5b02eb7f9646c9b59e7 @fabpot fabpot committed Nov 13, 2012
Showing with 5 additions and 5 deletions.
  1. +1 −1 .gitattributes
  2. +1 −1 Input/InputArgument.php
  3. +1 −1 Input/InputOption.php
  4. +1 −1 Tests/Input/InputArgumentTest.php
  5. +1 −1 Tests/Input/InputOptionTest.php
View
@@ -1,2 +1,2 @@
-Tests/ export-ignore
+/Tests export-ignore
phpunit.xml.dist export-ignore
@@ -96,7 +96,7 @@ public function isArray()
public function setDefault($default = null)
{
if (self::REQUIRED === $this->mode && null !== $default) {
- throw new \LogicException('Cannot set a default value except for Parameter::OPTIONAL mode.');
+ throw new \LogicException('Cannot set a default value except for InputArgument::OPTIONAL mode.');
}
if ($this->isArray()) {
@@ -156,7 +156,7 @@ public function isArray()
public function setDefault($default = null)
{
if (self::VALUE_NONE === (self::VALUE_NONE & $this->mode) && null !== $default) {
- throw new \LogicException('Cannot set a default value when using Option::VALUE_NONE mode.');
+ throw new \LogicException('Cannot set a default value when using InputOption::VALUE_NONE mode.');
}
if ($this->isArray()) {
@@ -89,7 +89,7 @@ public function testSetDefault()
$this->fail('->setDefault() throws a \LogicException if you give a default value for a required argument');
} catch (\Exception $e) {
$this->assertInstanceOf('\LogicException', $e, '->setDefault() throws a \LogicException exception if an invalid option is passed');
- $this->assertEquals('Cannot set a default value except for Parameter::OPTIONAL mode.', $e->getMessage());
+ $this->assertEquals('Cannot set a default value except for InputArgument::OPTIONAL mode.', $e->getMessage());
}
try {
@@ -154,7 +154,7 @@ public function testSetDefault()
$this->fail('->setDefault() throws a \LogicException if you give a default value for a VALUE_NONE option');
} catch (\Exception $e) {
$this->assertInstanceOf('\LogicException', $e, '->setDefault() throws a \LogicException if you give a default value for a VALUE_NONE option');
- $this->assertEquals('Cannot set a default value when using Option::VALUE_NONE mode.', $e->getMessage());
+ $this->assertEquals('Cannot set a default value when using InputOption::VALUE_NONE mode.', $e->getMessage());
}
$option = new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY);

0 comments on commit 6da5370

Please sign in to comment.