8000 Merge branch '2.7' into 2.8 · lrlopez/symfony@3bae5f7 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3bae5f7

Browse files
committed
Merge branch '2.7' into 2.8
Conflicts: src/Symfony/Component/HttpKernel/Kernel.php
2 parents 685a1cf + 4ecbc70 commit 3bae5f7

File tree

26 files changed

+137
-47
lines changed

26 files changed

+137
-47
lines changed

CHANGELOG-2.7.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,49 @@ in 2.7 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.7.0...v2.7.1
99

10+
* 2.7.4 (2015-09-08)
11+
12+
* bug #15552 [ExpressionLanguage] Fixed expressions cache key generation (inso)
13+
* bug #15527 [Translator][fallback catalogues] fixed circular reference. (aitboudad)
14+
* bug #15662 [Form][ Choice type] fixed groups with empty array. (aitboudad)
15+
* bug #15601 [console] Use the description when no help is available (Nicofuma)
16+
* bug #15649 [VarDumper] Fix missing support for dumping PHP7 return type (nicolas-grekas)
17+
* bug #15603 [HttpKernel] Do not normalize the kernel root directory path #15567 (leofeyer)
18+
* bug #15647 [Debug] Ignore silencing for deprecations (nicolas-grekas)
19+
* bug #15625 Various fixes esp. on Windows (nicolas-grekas)
20+
* bug #15428 Fix the validation of form resources to register the default theme (stof)
21+
* bug #15623 Fix the retrieval of the value with property path when using a loader (stof)
22+
* bug #15619 [Translation] Fix the string casting in the XliffFileLoader (stof)
23+
* bug #15575 Add appveyor.yml for C.I. on Windows (nicolas-grekas)
24+
* bug #15493 [VarDumper] fixed HtmlDumper to target specific the head tag (SaschaDens)
25+
* bug #15611 [Translation][Xliff Loader] Support omitting the <target> node in an .xlf file. (leofeyer)
26+
* bug #15608 [Form] Fix the handling of values for multiple choice types (stof)
27+
* bug #15549 [FrameworkBundle] Fix precedence of xdebug.file_link_format (nicolas-grekas)
28+
* bug #15589 made Symfony compatible with both Twig 1.x and 2.x (fabpot)
29+
* bug #15590 Made Symfony 2.7 compatible with Twig 2.0 (fabpot)
30+
* bug #15535 made Symfony compatible with both Twig 1.x and 2.x (fabpot)
31+
* bug #15561 [Form] only use PropertyPath if not already callable (Tobion)
32+
* bug #15588 [WebProfilerBundle] add import for Twig macro (xabbuh)
33+
* bug #15546 [Form] fixed BC-break on grouped choice lists (origaminal)
34+
* bug #15515 [Console] Fixed warning when command alias is longer than command name (dosten)
35+
* bug #15251 [DoctrineBridge][Form] Fix IdReader when indexing by primary foreign key (giosh94mhz)
36+
* bug #14372 [DoctrineBridge][Form] fix EntityChoiceList when indexing by primary foreign key (giosh94mhz)
37+
* bug #15514 removed _self usage when not needed (fabpot)
38+
* bug #15489 Implement the support of timezone objects in the stub IntlDateFormatter (stof)
39+
* bug #15426 [Serializer] Add support for variadic arguments in the GetSetNormalizer (stof)
40+
* bug #15480 [< 10000 /span>Yaml] Nested merge keys (mathroc)
41+
* bug #15443 [Debug] Enhance DebugClassLoader performance on MacOSX (nicolas-grekas)
42+
* bug #15445 do not remove space between attributes (greg0ire)
43+
* bug #15263 [HttpFoundation] fixed the check of 'proxy-revalidate' in Response::mustRevalidate() (axiac)
44+
* bug #15425 [Routing] Fix the retrieval of the default value for variadic arguments in the annotation loader (wdalmut, stof)
45+
* bug #15074 Fixing DbalSessionHandler to work with a Oracle "limitation" or bug? (nuncanada)
46+
* bug #13828 [Validator] Improve Iban Validation (afurculita)
47+
* bug #15380 do not dump leading backslashes in class names (xabbuh)
48+
* bug #15376 [ClassMapGenerator] Skip ::class constant (WouterJ)
49+
* bug #15389 [securityBundle] Compare roles strictly when computing inherited roles (bokonet)
50+
* bug #15170 [Config] type specific check for emptiness (xabbuh)
51+
* bug #15411 Fix the handling of null as locale in the stub intl classes (stof)
52+
1053
* 2.7.3 (2015-07-31)
1154

1255
* bug #15413 Fix the return value on error for intl methods returning arrays (stof)

src/Symfony/Bridge/Doctrine/Tests/DependencyInjection/DoctrineExtensionTest.php

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

5151
/**
52-
* @expectedException LogicException
52+
* @expectedException \LogicException
5353
*/
5454
public function testFixManagersAutoMappingsWithTwoAutomappings()
5555
{
@@ -239,7 +239,7 @@ public function testServiceCacheDriver()
239239
}
240240

241241
/**
242-
* @expectedException InvalidArgumentException
242+
* @expectedException \InvalidArgumentException
243243
* @expectedExceptionMessage "unrecognized_type" is an unrecognized Doctrine cache driver.
244244
*/
245245
public function testUnrecognizedCacheDriverException()

src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ public function testClassOptionIsRequired()
130130
}
131131

132132
/**
133-
* @expectedException Symfony\Component\Form\Exception\RuntimeException
133+
* @expectedException \Symfony\Component\Form\Exception\RuntimeException
134134
*/
135135
public function testInvalidClassOption()
136136
{

src/Symfony/Bundle/FrameworkBundle/Controller/ControllerResolver.php

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,17 +70,20 @@ protected function createController($controller)
7070
}
7171
}
7272

73-
list($class, $method) = explode('::', $controller, 2);
73+
return parent::createController($controller);
74+
}
7475

75-
if (!class_exists($class)) {
76-
throw new \InvalidArgumentException(sprintf('Class "%s" does not exist.', $class));
77-
}
76+
/**
77+
* {@inheritdoc}
78+
*/
79+
protected function instantiateController($class)
80+
{
81+
$controller = parent::instantiateController($class);
7882

79-
$controller = $this->instantiateController($class);
8083
if ($controller instanceof ContainerAwareInterface) {
8184
$controller->setContainer($this->container);
8285
}
8386

84-
return array($controller, $method);
87+
return $controller;
8588
}
8689
}

src/Symfony/Bundle/FrameworkBundle/Tests/Controller/ControllerResolverTest.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numb 179B erDiff line change
@@ -33,6 +33,18 @@ public function testGetControllerOnContainerAware()
3333
$this->assertSame('testAction', $controller[1]);
3434
}
3535

36+
public function testGetControllerOnContainerAwareInvokable()
37+
{
38+
$resolver = $this->createControllerResolver();
39+
$request = Request::create('/');
40+
$request->attributes->set('_controller', 'Symfony\Bundle\FrameworkBundle\Tests\Controller\ContainerAwareController');
41+
42+
$controller = $resolver->getController($request);
43+
44+
$this->assertInstanceOf('Symfony\Bundle\FrameworkBundle\Tests\Controller\ContainerAwareController', $controller);
45+
$this->assertInstanceOf('Symfony\Component\DependencyInjection\ContainerInterface', $controller->getContainer());
46+
}
47+
3648
public function testGetControllerWithBundleNotation()
3749
{
3850
$shortName = 'FooBundle:Default:test';
@@ -161,4 +173,8 @@ public function getContainer()
161173
public function testAction()
162174
{
163175
}
176+
177+
public function __invoke()
178+
{
179+
}
164180
}

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/AddConsoleCommandPassTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function testProcess()
4040
}
4141

4242
/**
43-
* @expectedException InvalidArgumentException
43+
* @expectedException \InvalidArgumentException
4444
* @expectedExceptionMessage The service "my-command" tagged "console.command" must be public.
4545
*/
4646
public function testProcessThrowAnExceptionIfTheServiceIsNotPublic()
@@ -57,7 +57,7 @@ public function testProcessThrowAnExceptionIfTheServiceIsNotPublic()
5757
}
5858

5959
/**
60-
* @expectedException InvalidArgumentException
60+
* @expectedException \InvalidArgumentException
6161
* @expectedExceptionMessage The service "my-command" tagged "console.command" must not be abstract.
6262
*/
6363
public function testProcessThrowAnExceptionIfTheServiceIsAbstract()
@@ -74,7 +74,7 @@ public function testProcessThrowAnExceptionIfTheServiceIsAbstract()
7474
}
7575

7676
/**
77-
* @expectedException InvalidArgumentException
77+
* @expectedException \InvalidArgumentException
7878
* @expectedExceptionMessage The service "my-command" tagged "console.command" must be a subclass of "Symfony\Component\Console\Command\Command".
7979
*/
8080
public function testProcessThrowAnExceptionIfTheServiceIsNotASubclassOfCommand()

src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/MainConfigurationTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public function testCsrfAliases()
9292
}
9393

9494
/**
95-
* @expectedException InvalidArgumentException
95+
* @expectedException \InvalidArgumentException
9696
*/
9797
public function testCsrfOriginalAndAliasValueCausesException()
9898
{

src/Symfony/Component/Console/Helper/ProgressBar.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ public function clear()
476476
/**
477477
* Sets the progress bar maximal steps.
478478
*
479-
* @param int The progress bar max steps
479+
* @param int $max The progress bar max steps
480480
*/
481481
private function setMaxSteps($max)
482482
{

src/Symfony/Component/Console/Helper/Table.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ private function buildTableRows($rows)
378378
* fill rows that contains rowspan > 1.
379379
*
380380
* @param array $rows
381-
* @param array $line
381+
* @param int $line
382382
*
383383
* @return array
384384
*/
@@ -431,7 +431,7 @@ private function fillNextRows($rows, $line)
431431
* fill cells for a row that contains colspan > 1.
432432
*
433433
* @param array $row
434-
* @param array $column
434+
* @param int $column
435435
*
436436
* @return array
437437
*/

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,7 @@ public function testHasScope()
617617
}
618618

619619
/**
620-
* @expectedException Exception
620+
* @expectedException \Exception
621621
* @expectedExceptionMessage Something went terribly wrong!
622622
*/
623623
public function testGetThrowsException()

src/Symfony/Component/DomCrawler/Tests/FormTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -820,7 +820,7 @@ public function testFormRegistrySetValueOnCompoundField()
820820
}
821821

822822
/**
823-
* @expectedException InvalidArgumentException
823+
* @expectedException \InvalidArgumentException
824824
* @expectedExceptionMessage Unreachable field "0"
825825
*/
826826
public function testFormRegistrySetArrayOnNotCompoundField()

src/Symfony/Component/EventDispatcher/Tests/AbstractEventDispatcherTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
namespace Symfony\Component\EventDispatcher\Tests;
1313

1414
use Symfony\Component\EventDispatcher\Event;
15+
use Symfony\Component\EventDispatcher\EventDispatcher;
1516
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
1617

1718
abstract class AbstractEventDispatcherTest extends \PHPUnit_Framework_TestCase

src/Symfony/Component/ExpressionLanguage/ExpressionLanguage.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,14 @@ public function parse($expression, $names)
8484
return $expression;
8585
}
8686

87-
$key = $expression.'//'.implode('-', $names);
87+
asort($names);
88+
$cacheKeyItems = array();
89+
90+
foreach ($names as $nameKey => $name) {
91+
$cacheKeyItems[] = is_int($nameKey) ? $name : $nameKey.':'.$name;
92+
}
93+
94+
$key = $expression.'//'.implode('|', $cacheKeyItems);
8895

8996
if (null === $parsedExpression = $this->cache->fetch($key)) {
9097
$nodes = $this->getParser()->parse($this->getLexer()->tokenize((string) $expression), $names);

src/Symfony/Component/ExpressionLanguage/Parser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public function __construct(array $functions)
8888
* @param TokenStream $stream A token stream instance
8989
* @param array $names An array of valid names
9090
*
91-
* @return Node A node tree
91+
* @return Node\Node A node tree
9292
*
9393
* @throws SyntaxError
9494
*/

src/Symfony/Component/ExpressionLanguage/Tests/ExpressionLanguageTest.php

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,4 +104,38 @@ public function shortCircuitProviderCompile()
104104
array('true or foo', array('foo' => 'foo'), true),
105105
);
106106
}
107+
108+
public function testCachingForOverriddenVariableNames()
109+
{
110+
$expressionLanguage = new ExpressionLanguage();
111+
$expression = 'a + b';
112+
$expressionLanguage->evaluate($expression, array('a' => 1, 'b' => 1));
113+
$result = $expressionLanguage->compile($expression, array('a', 'B' => 'b'));
114+
$this->assertSame('($a + $B)', $result);
115+
}
116+
117+
public function testCachingWithDifferentNamesOrder()
118+
{
119+
$cacheMock = $this->getMock('Symfony\Component\ExpressionLanguage\ParserCache\ParserCacheInterface');
120+
$expressionLanguage = new ExpressionLanguage($cacheMock);
121+
$savedParsedExpressions = array();
122+
$cacheMock
123+
->expects($this->exactly(2))
124+
->method('fetch')
125+
->will($this->returnCallback(function ($key) use (&$savedParsedExpressions) {
126+
return isset($savedParsedExpressions[$key]) ? $savedParsedExpressions[$key] : null;
127+
}))
128+
;
129+
$cacheMock
130+
->expects($this->exactly(1))
131+
->method('save')
132+
->will($this->returnCallback(function ($key, $expression) use (&$savedParsedExpressions) {
133+
$savedParsedExpressions[$key] = $expression;
134+
}))
135+
;
136+
137+
$expression = 'a + b';
138+
$expressionLanguage->compile($expression, array('a', 'B' => 'b'));
139+
$expressionLanguage->compile($expression, array('B' => 'b', 'a'));
140+
}
107141
}

src/Symfony/Component/Filesystem/Tests/LockHandlerTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
class LockHandlerTest extends \PHPUnit_Framework_TestCase
88
{
99
/**
10-
* @expectedException Symfony\Component\Filesystem\Exception\IOException
10+
* @expectedException \Symfony\Component\Filesystem\Exception\IOException
1111
* @expectedExceptionMessage Failed to create "/a/b/c/d/e": mkdir(): Permission denied.
1212
*/
1313
public function testConstructWhenRepositoryDoesNotExist()
@@ -19,7 +19,7 @@ public function testConstructWhenRepositoryDoesNotExist()
1919
}
2020

2121
/**
22-
* @expectedException Symfony\Component\Filesystem\Exception\IOException
22+
* @expectedException \Symfony\Component\Filesystem\Exception\IOException
2323
* @expectedExceptionMessage The directory "/" is not writable.
2424
*/
2525
public function testConstructWhenRepositoryIsNotWriteable()

src/Symfony/Component/Form/Tests/Extension/Core/DataMapper/PropertyPathMapperTest.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -77,14 +77,6 @@ private function getForm(FormConfigInterface $config, $synchronized = true, $sub
7777
return $form;
7878
}
7979

80-
/**
81-
* @return \PHPUnit_Framework_MockObject_MockObject
82-
*/
83-
private function getDataMapper()
84-
{
85-
return $this->getMock('Symfony\Component\Form\DataMapperInterface');
86-
}
87-
8880
public function testMapDataToFormsPassesObjectRefIfByReference()
8981
{
9082
$car = new \stdClass();

src/Symfony/Component/Form/Tests/FormFactoryTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -786,9 +786,4 @@ private function getMockResolvedType()
786786
{
787787
return $this->getMock('Symfony\Component\Form\ResolvedFormTypeInterface');
788788
}
789-
790-
private function getMockType()
791-
{
792-
return $this->getMock('Symfony\Component\Form\FormTypeInterface');
793-
}
794789
}

src/Symfony/Component/HttpKernel/Kernel.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,10 @@ abstract class Kernel implements KernelInterface, TerminableInterface
6363
protected $loadClassCache;
6464

6565
const VERSION = '2.8.0-DEV';
66-
const VERSION_ID = '20800';
67-
const MAJOR_VERSION = '2';
68-
const MINOR_VERSION = '8';
69-
const RELEASE_VERSION = '0';
66+
const VERSION_ID = 20800;
67+
const MAJOR_VERSION = 2;
68+
const MINOR_VERSION = 8;
69+
const RELEASE_VERSION = 0;
7070
const EXTRA_VERSION = 'DEV';
7171

7272
const END_OF_MAINTENANCE = '05/2018';

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public function testGenerateFragmentUriWithARequest()
5555
}
5656

5757
/**
58-
* @expectedException LogicException
58+
* @expectedException \LogicException
5959
* @dataProvider getGenerateFragmentUriDataWithNonScalar
6060
*/
6161
public function testGenerateFragmentUriWithNonScalar($controller)

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
namespace Symfony\Component\HttpKernel\Tests;
1313

1414
use Symfony\Component\DependencyInjection\ContainerBuilder;
15+
use Symfony\Component\HttpKernel\Bundle\BundleInterface;
1516
use Symfony\Component\HttpKernel\Config\EnvParametersResource;
1617
use Symfony\Component\HttpKernel\Kernel;
1718
use Symfony\Component\HttpKernel\HttpKernelInterface;

src/Symfony/Component/Intl/Resources/stubs/Collator.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,11 @@
1010
*/
1111

1212
use Symfony\Component\Intl\Collator\Collator as IntlCollator;
13-
use Symfony\Component\Intl\Collator\StubCollator;
1413

1514
/**
1615
* Stub implementation for the Collator class of the intl extension.
1716
*
1817
* @author Bernhard Schussek <bschussek@gmail.com>
19-
*
20-
* @see StubCollator
2118
*/
2219
class Collator extends IntlCollator
2320
{

src/Symfony/Component/Security/Core/Tests/Encoder/EncoderFactoryTest.php

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

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

src/Symfony/Component/Security/Http/Tests/RememberMe/AbstractRememberMeServicesTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ public function testEncodeCookieAndDecodeCookieAreInvertible()
250250
}
251251

252252
/**
253-
* @expectedException InvalidArgumentException
253+
* @expectedException \InvalidArgumentException
254254
* @expectedExceptionMessage cookie delimiter
255255
*/
256256
public function testThereShouldBeNoCookieDelimiterInCookieParts()

0 commit comments

Comments
 (0)
0