8000 Merge branch '2.4' · symfony/symfony@1fcc7c5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1fcc7c5

Browse files
committed
Merge branch '2.4'
* 2.4: [HttpKernel] fixed regression introduced in 2.4 in the base DataCollector class. Added more unit tests coverage for the RequestDataCollector object. Fixed mistake in upgrade docu bumped Symfony version to 2.4.0 updated VERSION for 2.4.0-RC1 updated CHANGELOG for 2.4.0-RC1 Container::camelize also takes backslashes into consideration fixed typos fixed @ExpectedException class names Fix an issue when overriding Client::setServerParameters() and using the getContainer() method in it. fixed some typos fixed @ExpectedException class names Typo and better wording for german validator translation
2 parents 4aab341 + 990267f commit 1fcc7c5

File tree

48 files changed

+146
-102
lines changed

Some content is hidden

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

48 files changed

+146
-102
lines changed

CHANGELOG-2.4.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,44 @@ in 2.4 minor versions.
77
To get the diff for a specific change, go to https://github.com/symfony/symfony/commit/XXX where XXX is the change hash
88
To get the diff between two versions, go to https://github.com/symfony/symfony/compare/v2.4.0...v2.4.1
99

10+
* 2.4.0-RC1 (2013-11-25)
11+
12+
* bug #9607 [HttpKernel] Fix a bug when using the kernel property in overridden method Client::setServerParameters() (gnutix)
13+
* bug #9597 [Security] Typos in Security's ExpressionLanguage (ovrflo)
14+
* feature #9587 [SecurityBundle] Added csrf_token_generator and csrf_token_id as new (shieldo)
15+
* feature #9578 [DomCrawler] Fixes `attr` method returning empty string for missing attributes (aik099)
16+
* bug #9565 [Debug] Fixed ClassNotFoundFatalErrorHandler which could cause a fatal error (jakzal)
17+
* bug #9525 Cache Warmup Breaks Namespaced Kernel (rdohms)
18+
* bug #9447 [BrowserKit] fixed protocol-relative url redirection (jong99)
19+
* bug #9535 No Entity Manager defined exception (armetiz)
20+
* bug #9485 [Acl] Fix for issue #9433 (guilro)
21+
* bug #9516 [AclProvider] Fix incorrect behavior when partial results returned from cache (superdav42)
22+
* feature #9546 [FrameworkBundle] use the new request_stack service in the GlobalVariables object (hhamon)
23+
* bug #9566 [Console] Revert BC-break for verbose option value (chEbba)
24+
* bug #9553 [FrameworkBundle] use the new request_stack service to get the Request object in the base Controller class (hhamon)
25+
* feature #9541 [Translation] make IdentityTranslater consistent with normal translator (Tobion)
26+
* bug #9536 [FrameworkBundle] Update 2 dependencies (currently broken) (asm89)
27+
* bug #9352 [Intl] make currency bundle merge fallback locales when accessing data, ... (shieldo)
28+
* bug #9537 [FrameworkBundle] Fix mistake in translation's service definition. (phpmike)
29+
* bug #9529 [ExpressionLanguage] Fixed conflict between punctation and range (WouterJ)
30+
* bug #9367 [Process] Check if the pipe array is empty before calling stream_select() (jfposton)
31+
* bug #9211 [Form] Fixed memory leak in FormValidator (bschussek)
32+
* bug #9469 [Propel1] re-factor Propel1 ModelChoiceList (havvg)
33+
* bug #9499 Request::overrideGlobals() may call invalid ini value (denkiryokuhatsuden)
34+
* feature #9494 made Router implement RequestMatcherInterface (fabpot)
35+
* bug #9420 [Console][ProgressHelper] Fix ProgressHelper redraw when redrawFreq is greater than 1 (giosh94mhz)
36+
* bug #9212 [Validator] Force Luhn Validator to only work with strings (Richtermeister)
37+
* bug #9476 Fixed bug with lazy services (peterrehm)
38+
* bug #9461 set mergeFallback to true, (ychadwick)
39+
* bug #9451 Fix bug with variable named context to securityContext (mieszko4)
40+
* feature #9434 moved logic for the session listeners into the HttpKernel component (fabpot)
41+
* bug #9431 [DependencyInjection] fixed YamlDumper did not make services private. (realityking)
42+
* bug #9332 [Config] Quoting reserved characters (WouterJ)
43+
* bug #9416 fixed issue with clone now the children of the original form are preserved and the clone form is given new children (yjv)
44+
* bug #9423 [Form] fix CsrfProviderAdapter (Tobion)
45+
* feature #9342 Add X-Debug-Url profiler url header (adrienbrault)
46+
* bug #9412 [HttpFoundation] added content length header to BinaryFileResponse (kbond)
47+
1048
* 2.4.0-BETA2 (2013-10-30)
1149

1250
* bug #9408 [Form] Fixed failing FormDataExtractorTest (bschussek)

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< F438 /span>');
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/Client.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,11 @@ class Client extends BaseClient
4343
*/
4444
public function __construct(HttpKernelInterface $kernel, array $server = array(), History $history = null, CookieJar $cookieJar = null)
4545
{
46-
parent::__construct($server, $history, $cookieJar);
47-
46+
// These class properties must be set before calling the parent constructor, as it may depend on it.
4847
$this->kernel = $kernel;
4948
$this->followRedirects = false;
49+
50+
parent::__construct($server, $history, $cookieJar);
5051
}
5152

5253
/**

src/Symfony/Component/HttpKernel/DataCollector/DataCollector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,6 @@ protected function varToString($var)
5353
$this->valueExporter = new ValueExporter();
5454
}
5555

56-
$this->valueExporter->exportValue($var);
56+
return $this->valueExporter->exportValue($var);
5757
}
5858
}

0 commit comments

Comments
 (0)
0