Skip to content

Commit 406c249

Browse files
Merge branch '4.3' into 4.4
* 4.3: Fix inconsistent return points. pass translation parameters to the trans filter [Mime] fixed wrong mimetype [ProxyManagerBridge] Polyfill for unmaintained version [HttpClient] Declare `$active` first to prevent weird issue Remove deprecated assertContains [HttpClient] fix tests SCA: dropped unused mocks, duplicate import and a function alias usage Added correct plural for box -> boxes [Config] fix test Fix remaining tests Improve fa (persian) translation
2 parents 5adc4a2 + 32fa79a commit 406c249

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

Tests/Definition/Builder/NumericNodeDefinitionTest.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,22 @@
1414
use PHPUnit\Framework\TestCase;
1515
use Symfony\Component\Config\Definition\Builder\FloatNodeDefinition;
1616
use Symfony\Component\Config\Definition\Builder\IntegerNodeDefinition;
17-
use Symfony\Component\Config\Definition\Builder\IntegerNodeDefinition as NumericNodeDefinition;
1817

1918
class NumericNodeDefinitionTest extends TestCase
2019
{
2120
public function testIncoherentMinAssertion()
2221
{
2322
$this->expectException('InvalidArgumentException');
2423
$this->expectExceptionMessage('You cannot define a min(4) as you already have a max(3)');
25-
$def = new NumericNodeDefinition('foo');
24+
$def = new IntegerNodeDefinition('foo');
2625
$def->max(3)->min(4);
2726
}
2827

2928
public function testIncoherentMaxAssertion()
3029
{
3130
$this->expectException('InvalidArgumentException');
3231
$this->expectExceptionMessage('You cannot define a max(2) as you already have a min(3)');
33-
$node = new NumericNodeDefinition('foo');
32+
$node = new IntegerNodeDefinition('foo');
3433
$node->min(3)->max(2);
3534
}
3635

@@ -84,7 +83,7 @@ public function testCannotBeEmptyThrowsAnException()
8483
{
8584
$this->expectException('Symfony\Component\Config\Definition\Exception\InvalidDefinitionException');
8685
$this->expectExceptionMessage('->cannotBeEmpty() is not applicable to NumericNodeDefinition.');
87-
$def = new NumericNodeDefinition('foo');
86+
$def = new IntegerNodeDefinition('foo');
8887
$def->cannotBeEmpty();
8988
}
9089
}

Tests/Fixtures/Resource/.hiddenFile

Whitespace-only changes.

Util/XmlUtils.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ public static function phpize($value)
234234
return true;
235235
case 'false' === $lowercaseValue:
236236
return false;
237-
case isset($value[1]) && '0b' == $value[0].$value[1]:
237+
case isset($value[1]) && '0b' == $value[0].$value[1] && preg_match('/^0b[01]*$/', $value):
238238
return bindec($value);
239239
case is_numeric($value):
240240
return '0x' === $value[0].$value[1] ? hexdec($value) : (float) $value;

0 commit comments

Comments
 (0)