8000 Merge branch '2.3' into 2.4 · symfony/symfony@990267f · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit 990267f

Browse files
committed
Merge branch '2.3' into 2.4
* 2.3: Fixed mistake in upgrade docu Container::camelize also takes backslashes into consideration fixed typos fixed @ExpectedException class names fixed some typos fixed @ExpectedException class names Typo and better wording for german validator translation
2 parents 41b5c8e + da90eb9 commit 990267f

File tree

44 files changed

+84
-83
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+84
-83
lines changed

UPGRADE-2.3.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ Form
137137

138138
```
139139
$form = $factory->create('form');
140-
$form->add($factory->createNamed('field', 'text', array(
140+
$form->add($factory->createNamed('field', 'text', array(), array(
141141
'auto_initialize' => false,
142142
)));
143143
```
@@ -276,4 +276,4 @@ BrowserKit
276276

277277
If you were using responses with Location header and non-3xx Status Code,
278278
you have to update your code to manually create another request to URL
279-
grabbed from the Location header.
279+
grabbed from the Location header.

src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/UniqueValidatorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ public function testAssociatedCompositeEntity()
358358
public function testDedicatedEntityManagerNullObject()
359359
{
360360
$uniqueFields = array('name');
361-
$entityManagerName = 'foo';
361+
$entityManagerName = 'foo';
362362

363363
$registry = $this->getMock('Doctrine\Common\Persistence\ManagerRegistry');
364364

src/Symfony/Bundle/TwigBundle/Tests/Loader/FilesystemLoaderTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public function testExists()
5252
}
5353

5454
/**
55-
* @expectedException Twig_Error_Loader
55+
* @expectedException \Twig_Error_Loader
5656
*/
5757
public function testTwigErrorIfLocatorThrowsInvalid()
5858
{
@@ -76,7 +76,7 @@ public function testTwigErrorIfLocatorThrowsInvalid()
7676
}
7777

7878
/**
79-
* @expectedException Twig_Error_Loader
79+
* @expectedException \Twig_Error_Loader
8080
*/
8181
public function testTwigErrorIfLocatorReturnsFalse()
8282
{

src/Symfony/Component/ClassLoader/Tests/ClassCollectionLoaderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ public function getFixNamespaceDeclarationsDataWithoutTokenizer()
189189
}
190190

191191
/**
192-
* @expectedException InvalidArgumentException
192+
* @expectedException \InvalidArgumentException
193193
*/
194194
public function testUnableToLoadClassException()
195195
{

src/Symfony/Component/Config/Tests/Loader/LoaderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function testResolve()
4343
}
4444

4545
/**
46-
* @expectedException Symfony\Component\Config\Exception\FileLoaderLoadException
46+
* @expectedException \Symfony\Component\Config\Exception\FileLoaderLoadException
4747
*/
4848
public function testResolveWhenResolverCannotFindLoader()
4949
{

src/Symfony/Component/Console/Tests/Formatter/OutputFormatterStyleStackTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public function testPopNotLast()
5959
}
6060

6161
/**
62-
* @expectedException InvalidArgumentException
62+
* @expectedException \InvalidArgumentException
6363
*/
6464
public function testInvalidPop()
6565
{

src/Symfony/Component/DependencyInjection/Container.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@ public function isScopeActive($name)
525525
*/
526526
public static function camelize($id)
527527
{
528-
return strtr(ucwords(strtr($id, array('_' => ' ', '.' => '_ '))), array(' ' => ''));
528+
return strtr(ucwords(strtr($id, array('_' => ' ', '.' => '_ ', '\\' => '_ '))), array(' ' => ''));
529529
}
530530

531531
/**

src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ public function testMerge()
449449

450450
/**
451451
* @covers Symfony\Component\DependencyInjection\ContainerBuilder::merge
452-
* @expectedException LogicException
452+
* @expectedException \LogicException
453453
*/
454454
public function testMergeLogicException()
455455
{
@@ -649,7 +649,7 @@ public function testPrivateServiceUser()
649649
}
650650

651651
/**
652-
* @expectedException BadMethodCallException
652+
* @expectedException \BadMethodCallException
653653
*/
654654
public function testThrowsExceptionWhenSetServiceOnAFrozenContainer()
655655
{
@@ -661,7 +661,7 @@ public function testThrowsExceptionWhenSetServiceOnAFrozenContainer()
661661
}
662662

663663
/**
664-
* @expectedException BadMethodCallException
664+
* @expectedException \BadMethodCallException
665665
*/
666666
public function testThrowsExceptionWhenAddServiceOnAFrozenContainer()
667667
{
@@ -728,7 +728,7 @@ public function testSynchronizedServiceWithScopes()
728728
}
729729

730730
/**
731-
* @expectedException BadMethodCallException
731+
* @expectedException \BadMethodCallException
732732
*/
733733
public function testThrowsExceptionWhenSetDefinitionOnAFrozenContainer()
734734
{

src/Symfony/Component/DependencyInjection/Tests/ContainerTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ public function dataForTestCamelize()
5151
array('.foo', '_Foo'),
5252
array('foo_', 'Foo'),
5353
array('foo.', 'Foo_'),
54+
array('foo\bar', 'Foo_Bar'),
5455
);
5556
}
5657

src/Symfony/Component/DependencyInjection/Tests/DefinitionDecoratorTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public function testSetArgument()
8181
}
8282

8383
/**
84-
* @expectedException InvalidArgumentException
84+
* @expectedException \InvalidArgumentException
8585
*/
8686
public function testReplaceArgumentShouldRequireIntegerIndex()
8787
{
@@ -106,7 +106,7 @@ public function testReplaceArgument()
106106
}
107107

108108
/**
109-
* @expectedException OutOfBoundsException
109+
* @expectedException \OutOfBoundsException
110110
*/
111111
public function testGetArgumentShouldCheckBounds()
112112
{

src/Symfony/Component/DependencyInjection/Tests/DefinitionTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ public function testSetArgument()
275275
}
276276

277277
/**
278-
* @expectedException OutOfBoundsException
278+
* @expectedException \OutOfBoundsException
279279
*/
280280
public function testGetArgumentShouldCheckBounds()
281281
{
@@ -286,7 +286,7 @@ public function testGetArgumentShouldCheckBounds()
286286
}
287287

288288
/**
289-
* @expectedException OutOfBoundsException
289+
* @expectedException \OutOfBoundsException
290290
*/
291291
public function testReplaceArgumentShouldCheckBounds()
292292
{

src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public function testDumpOptimizationString()
8181
}
8282

8383
/**
84-
* @expectedException InvalidArgumentException
84+
* @expectedException \InvalidArgumentException
8585
*/
8686
public function testExportParameters()
8787
{
@@ -121,7 +121,7 @@ public function testAddService()
121121
}
122122

123123
/**
124-
* @expectedException InvalidArgumentException
124+
* @expectedException \InvalidArgumentException
125125
* @expectedExceptionMessage Service id "bar$" cannot be converted to a valid PHP method name.
126126
*/
127127
public function testAddServiceInvalidServiceId()

src/Symfony/Component/Finder/Expression/Expression.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ public function isGlob()
130130
public function getGlob()
131131
{
132132
if (self::TYPE_GLOB !== $this->value->getType()) {
133-
throw new \LogicException('Regex cant be transformed to glob.');
133+
throw new \LogicException('Regex can\'t be transformed to glob.');
134134
}
135135

136136
return $this->value;

src/Symfony/Component/HttpFoundation/Tests/CookieTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public function invalidNames()
3838

3939
/**
4040
* @dataProvider invalidNames
41-
* @expectedException InvalidArgumentException
41+
* @expectedException \InvalidArgumentException
4242
* @covers Symfony\Component\HttpFoundation\Cookie::__construct
4343
*/
4444
public function testInstantiationThrowsExceptionIfCookieNameContainsInvalidCharacters($name)
@@ -47,7 +47,7 @@ public function testInstantiationThrowsExceptionIfCookieNameContainsInvalidChara
4747
}
4848

4949
/**
50-
* @expectedException InvalidArgumentException
50+
* @expectedException \InvalidArgumentException
5151
*/
5252
public function testInvalidExpiration()
5353
{

src/Symfony/Component/HttpFoundation/Tests/RequestTest.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -669,18 +669,18 @@ public function testGetHost()
669669
$request->initialize(array('foo' => 'bar'));
670670
$this->assertEquals('', $request->getHost(), '->getHost() return empty string if not initialized');
671671

672-
$request->initialize(array(), array(), array(), array(), array(), array('HTTP_HOST' => 'www.exemple.com'));
673-
$this->assertEquals('www.exemple.com', $request->getHost(), '->getHost() from Host Header');
672+
$request->initialize(array(), array(), array(), array(), array(), array('HTTP_HOST' => 'www.example.com'));
673+
$this->assertEquals('www.example.com', $request->getHost(), '->getHost() from Host Header');
674674

675675
// Host header with port number
676-
$request->initialize(array(), array(), array(), array(), array(), array('HTTP_HOST' => 'www.exemple.com:8080'));
677-
$this->assertEquals('www.exemple.com', $request->getHost(), '->getHost() from Host Header with port number');
676+
$request->initialize(array(), array(), array(), array(), array(), array('HTTP_HOST' => 'www.example.com:8080'));
677+
$this->assertEquals('www.example.com', $request->getHost(), '->getHost() from Host Header with port number');
678678

679679
// Server values
680-
$request->initialize(array(), array(), array(), array(), array(), array('SERVER_NAME' => 'www.exemple.com'));
681-
$this->assertEquals('www.exemple.com', $request->getHost(), '->getHost() from server name');
680+
$request->initialize(array(), array(), array(), array(), array(), array('SERVER_NAME' => 'www.example.com'));
681+
$this->assertEquals('www.example.com', $request->getHost(), '->getHost() from server name');
682682

683-
$request->initialize(array(), array(), array(), array(), array(), array('SERVER_NAME' => 'www.exemple.com', 'HTTP_HOST' => 'www.host.com'));
683+
$request->initialize(array(), array(), array(), array(), array(), array('SERVER_NAME' => 'www.example.com', 'HTTP_HOST' => 'www.host.com'));
684684
$this->assertEquals('www.host.com', $request->getHost(), '->getHost() value from Host header has priority over SERVER_NAME ');
685685
}
686686

@@ -739,7 +739,7 @@ public function testGetPort()
739739
}
740740

741741
/**
742-
* @expectedException RuntimeException
742+
* @expectedException \RuntimeException
743743
*/
744744
public function testGetHostWithFakeHttpHostValue()
745745
{
@@ -896,7 +896,7 @@ public function testGetContentReturnsResource()
896896
}
897897

898898
/**
899-
* @expectedException LogicException
899+
* @expectedException \LogicException
900900
* @dataProvider getContentCantBeCalledTwiceWithResourcesProvider
901901
*/
902902
public function testGetContentCantBeCalledTwiceWithResources($first, $second)

src/Symfony/Component/HttpFoundation/Tests/ResponseTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -724,7 +724,7 @@ public function testSetContent($content)
724724
}
725725

726726
/**
727-
* @expectedException UnexpectedValueException
727+
* @expectedException \UnexpectedValueException
728728
* @dataProvider invalidContentProvider
729729
*/
730730
public function testSetContentInvalid($content)

src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MongoDbSessionHandlerTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,15 @@ protected function setUp()
4949
}
5050

5151
/**
52-
* @expectedException InvalidArgumentException
52+
* @expectedException \InvalidArgumentException
5353
*/
5454
public function testConstructorShouldThrowExceptionForInvalidMongo()
5555
{
5656
new MongoDbSessionHandler(new \stdClass(), $this->options);
5757
}
5858

5959
/**
60-
* @expectedException InvalidArgumentException
60+
* @expectedException \InvalidArgumentException
6161
*/
6262
public function testConstructorShouldThrowExceptionForMissingOptions()
6363
{

src/Symfony/Component/HttpFoundation/Tests/Session/Storage/MockArraySessionStorageTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public function testGetId()
9797
}
9898

9999
/**
100-
* @expectedException RuntimeException
100+
* @expectedException \RuntimeException
101101
*/
102102
public function testUnstartedSave()
103103
{

src/Symfony/Component/HttpFoundation/Tests/Session/Storage/MockFileSessionStorageTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ public function testMultipleInstances()
107107
}
108108

109109
/**
110-
* @expectedException RuntimeException
110+
* @expectedException \RuntimeException
111111
*/
112112
public function testSaveWithoutStart()
113113
{

src/Symfony/Component/HttpKernel/Tests/Fragment/FragmentHandlerTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function testRenderWhenRendererDoesNotExist()
4242
}
4343

4444
/**
45-
* @expectedException InvalidArgumentException
45+
* @expectedException \InvalidArgumentException
4646
*/
4747
public function testRenderWithUnknownRenderer()
4848
{
@@ -52,7 +52,7 @@ public function testRenderWithUnknownRenderer()
5252
}
5353

5454
/**
55-
* @expectedException RuntimeException
55+
* @expectedException \RuntimeException
5656
* @expectedExceptionMessage Error when rendering "http://localhost/" (Status code is 404).
5757
*/
5858
public function testDeliverWithUnsuccessfulResponse()

src/Symfony/Component/HttpKernel/Tests/HttpCache/EsiTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ public function testProcessEscapesPhpTags()
126126
}
127127

128128
/**
129-
* @expectedException RuntimeException
129+
* @expectedException \RuntimeException
130130
*/
131131
public function testProcessWhenNoSrcInAnEsi()
132132
{
@@ -166,7 +166,7 @@ public function testHandle()
166166
}
167167

168168
/**
169-
* @expectedException RuntimeException
169+
* @expectedException \RuntimeException
170170
*/
171171
public function testHandleWhenResponseIsNot200()
172172
{

src/Symfony/Component/HttpKernel/Tests/HttpKernelTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
class HttpKernelTest extends \PHPUnit_Framework_TestCase
2525
{
2626
/**
27-
* @expectedException RuntimeException
27+
* @expectedException \RuntimeException
2828
*/
2929
public function testHandleWhenControllerThrowsAnExceptionAndRawIsTrue()
3030
{
@@ -34,7 +34,7 @@ public function testHandleWhenControllerThrowsAnExceptionAndRawIsTrue()
3434
}
3535

3636
/**
37-
* @expectedException RuntimeException
37+
* @expectedException \RuntimeException
3838
*/
3939
public function testHandleWhenControllerThrowsAnExceptionAndRawIsFalseAndNoListenerIsRegistered()
4040
{
@@ -136,7 +136,7 @@ public function testHandleWhenNoControllerIsFound()
136136
}
137137

138138
/**
139-
* @expectedException LogicException
139+
* @expectedException \LogicException
140140
*/
141141
public function testHandleWhenTheControllerIsNotACallable()
142142
{
@@ -188,7 +188,7 @@ public function testHandleWhenTheControllerIsAStaticArray()
188188
}
189189

190190
/**
191-
* @expectedException LogicException
191+
* @expectedException \LogicException
192192
*/
193193
public function testHandleWhenTheControllerDoesNotReturnAResponse()
194194
{

src/Symfony/Component/Process/Tests/AbstractProcessTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,7 @@ public function testExitCodeIsAvailableAfterSignal()
621621
}
622622

623623
/**
624-
* @expectedException Symfony\Component\Process\Exception\LogicException
624+
* @expectedException \Symfony\Component\Process\Exception\LogicException
625625
*/
626626
public function testSignalProcessNotRunning()
627627
{
@@ -641,7 +641,7 @@ private function verifyPosixIsEnabled()
641641
}
642642

643643
/**
644-
* @expectedException Symfony\Component\Process\Exception\RuntimeException
644+
* @expectedException \Symfony\Component\Process\Exception\RuntimeException
645645
*/
646646
public function testSignalWithWrongIntSignal()
647647
{
@@ -655,7 +655,7 @@ public function testSignalWithWrongIntSignal()
655655
}
656656

657657
/**
658-
* @expectedException Symfony\Component\Process\Exception\RuntimeException
658+
* @expectedException \Symfony\Component\Process\Exception\RuntimeException
659659
*/
660660
public function testSignalWithWrongNonIntSignal()
661661
{

0 commit comments

Comments
 (0)
0