Merge branch '2.7' into 2.8
Conflicts: src/Symfony/Component/HttpKernel/Kernel.php
This commit is contained in:
commit
3bae5f7aa9
@ -7,6 +7,49 @@ in 2.7 minor versions.
|
||||
To get the diff for a specific change, go to https://github.com/symfony/symfony/commit/XXX where XXX is the change hash
|
||||
To get the diff between two versions, go to https://github.com/symfony/symfony/compare/v2.7.0...v2.7.1
|
||||
|
||||
* 2.7.4 (2015-09-08)
|
||||
|
||||
* bug #15552 [ExpressionLanguage] Fixed expressions cache key generation (inso)
|
||||
* bug #15527 [Translator][fallback catalogues] fixed circular reference. (aitboudad)
|
||||
* bug #15662 [Form][ Choice type] fixed groups with empty array. (aitboudad)
|
||||
* bug #15601 [console] Use the description when no help is available (Nicofuma)
|
||||
* bug #15649 [VarDumper] Fix missing support for dumping PHP7 return type (nicolas-grekas)
|
||||
* bug #15603 [HttpKernel] Do not normalize the kernel root directory path #15567 (leofeyer)
|
||||
* bug #15647 [Debug] Ignore silencing for deprecations (nicolas-grekas)
|
||||
* bug #15625 Various fixes esp. on Windows (nicolas-grekas)
|
||||
* bug #15428 Fix the validation of form resources to register the default theme (stof)
|
||||
* bug #15623 Fix the retrieval of the value with property path when using a loader (stof)
|
||||
* bug #15619 [Translation] Fix the string casting in the XliffFileLoader (stof)
|
||||
* bug #15575 Add appveyor.yml for C.I. on Windows (nicolas-grekas)
|
||||
* bug #15493 [VarDumper] fixed HtmlDumper to target specific the head tag (SaschaDens)
|
||||
* bug #15611 [Translation][Xliff Loader] Support omitting the <target> node in an .xlf file. (leofeyer)
|
||||
* bug #15608 [Form] Fix the handling of values for multiple choice types (stof)
|
||||
* bug #15549 [FrameworkBundle] Fix precedence of xdebug.file_link_format (nicolas-grekas)
|
||||
* bug #15589 made Symfony compatible with both Twig 1.x and 2.x (fabpot)
|
||||
* bug #15590 Made Symfony 2.7 compatible with Twig 2.0 (fabpot)
|
||||
* bug #15535 made Symfony compatible with both Twig 1.x and 2.x (fabpot)
|
||||
* bug #15561 [Form] only use PropertyPath if not already callable (Tobion)
|
||||
* bug #15588 [WebProfilerBundle] add import for Twig macro (xabbuh)
|
||||
* bug #15546 [Form] fixed BC-break on grouped choice lists (origaminal)
|
||||
* bug #15515 [Console] Fixed warning when command alias is longer than command name (dosten)
|
||||
* bug #15251 [DoctrineBridge][Form] Fix IdReader when indexing by primary foreign key (giosh94mhz)
|
||||
* bug #14372 [DoctrineBridge][Form] fix EntityChoiceList when indexing by primary foreign key (giosh94mhz)
|
||||
* bug #15514 removed _self usage when not needed (fabpot)
|
||||
* bug #15489 Implement the support of timezone objects in the stub IntlDateFormatter (stof)
|
||||
* bug #15426 [Serializer] Add support for variadic arguments in the GetSetNormalizer (stof)
|
||||
* bug #15480 [Yaml] Nested merge keys (mathroc)
|
||||
* bug #15443 [Debug] Enhance DebugClassLoader performance on MacOSX (nicolas-grekas)
|
||||
* bug #15445 do not remove space between attributes (greg0ire)
|
||||
* bug #15263 [HttpFoundation] fixed the check of 'proxy-revalidate' in Response::mustRevalidate() (axiac)
|
||||
* bug #15425 [Routing] Fix the retrieval of the default value for variadic arguments in the annotation loader (wdalmut, stof)
|
||||
* bug #15074 Fixing DbalSessionHandler to work with a Oracle "limitation" or bug? (nuncanada)
|
||||
* bug #13828 [Validator] Improve Iban Validation (afurculita)
|
||||
* bug #15380 do not dump leading backslashes in class names (xabbuh)
|
||||
* bug #15376 [ClassMapGenerator] Skip ::class constant (WouterJ)
|
||||
* bug #15389 [securityBundle] Compare roles strictly when computing inherited roles (bokonet)
|
||||
* bug #15170 [Config] type specific check for emptiness (xabbuh)
|
||||
* bug #15411 Fix the handling of null as locale in the stub intl classes (stof)
|
||||
|
||||
* 2.7.3 (2015-07-31)
|
||||
|
||||
* bug #15413 Fix the return value on error for intl methods returning arrays (stof)
|
||||
|
@ -49,7 +49,7 @@ class DoctrineExtensionTest extends \PHPUnit_Framework_TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException LogicException
|
||||
* @expectedException \LogicException
|
||||
*/
|
||||
public function testFixManagersAutoMappingsWithTwoAutomappings()
|
||||
{
|
||||
@ -239,7 +239,7 @@ class DoctrineExtensionTest extends \PHPUnit_Framework_TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException InvalidArgumentException
|
||||
* @expectedException \InvalidArgumentException
|
||||
* @expectedExceptionMessage "unrecognized_type" is an unrecognized Doctrine cache driver.
|
||||
*/
|
||||
public function testUnrecognizedCacheDriverException()
|
||||
|
@ -130,7 +130,7 @@ class EntityTypeTest extends TypeTestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException Symfony\Component\Form\Exception\RuntimeException
|
||||
* @expectedException \Symfony\Component\Form\Exception\RuntimeException
|
||||
*/
|
||||
public function testInvalidClassOption()
|
||||
{
|
||||
|
@ -70,17 +70,20 @@ class ControllerResolver extends BaseControllerResolver
|
||||
}
|
||||
}
|
||||
|
||||
list($class, $method) = explode('::', $controller, 2);
|
||||
return parent::createController($controller);
|
||||
}
|
||||
|
||||
if (!class_exists($class)) {
|
||||
throw new \InvalidArgumentException(sprintf('Class "%s" does not exist.', $class));
|
||||
}
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function instantiateController($class)
|
||||
{
|
||||
$controller = parent::instantiateController($class);
|
||||
|
||||
$controller = $this->instantiateController($class);
|
||||
if ($controller instanceof ContainerAwareInterface) {
|
||||
$controller->setContainer($this->container);
|
||||
}
|
||||
|
||||
return array($controller, $method);
|
||||
return $controller;
|
||||
}
|
||||
}
|
||||
|
@ -33,6 +33,18 @@ class ControllerResolverTest extends BaseControllerResolverTest
|
||||
$this->assertSame('testAction', $controller[1]);
|
||||
}
|
||||
|
||||
public function testGetControllerOnContainerAwareInvokable()
|
||||
{
|
||||
$resolver = $this->createControllerResolver();
|
||||
$request = Request::create('/');
|
||||
$request->attributes->set('_controller', 'Symfony\Bundle\FrameworkBundle\Tests\Controller\ContainerAwareController');
|
||||
|
||||
$controller = $resolver->getController($request);
|
||||
|
||||
$this->assertInstanceOf('Symfony\Bundle\FrameworkBundle\Tests\Controller\ContainerAwareController', $controller);
|
||||
$this->assertInstanceOf('Symfony\Component\DependencyInjection\ContainerInterface', $controller->getContainer());
|
||||
}
|
||||
|
||||
public function testGetControllerWithBundleNotation()
|
||||
{
|
||||
$shortName = 'FooBundle:Default:test';
|
||||
@ -161,4 +173,8 @@ class ContainerAwareController implements ContainerAwareInterface
|
||||
public function testAction()
|
||||
{
|
||||
}
|
||||
|
||||
public function __invoke()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ class AddConsoleCommandPassTest extends \PHPUnit_Framework_TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException InvalidArgumentException
|
||||
* @expectedException \InvalidArgumentException
|
||||
* @expectedExceptionMessage The service "my-command" tagged "console.command" must be public.
|
||||
*/
|
||||
public function testProcessThrowAnExceptionIfTheServiceIsNotPublic()
|
||||
@ -57,7 +57,7 @@ class AddConsoleCommandPassTest extends \PHPUnit_Framework_TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException InvalidArgumentException
|
||||
* @expectedException \InvalidArgumentException
|
||||
* @expectedExceptionMessage The service "my-command" tagged "console.command" must not be abstract.
|
||||
*/
|
||||
public function testProcessThrowAnExceptionIfTheServiceIsAbstract()
|
||||
@ -74,7 +74,7 @@ class AddConsoleCommandPassTest extends \PHPUnit_Framework_TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException InvalidArgumentException
|
||||
* @expectedException \InvalidArgumentException
|
||||
* @expectedExceptionMessage The service "my-command" tagged "console.command" must be a subclass of "Symfony\Component\Console\Command\Command".
|
||||
*/
|
||||
public function testProcessThrowAnExceptionIfTheServiceIsNotASubclassOfCommand()
|
||||
|
@ -92,7 +92,7 @@ class MainConfigurationTest extends \PHPUnit_Framework_TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException InvalidArgumentException
|
||||
* @expectedException \InvalidArgumentException
|
||||
*/
|
||||
public function testCsrfOriginalAndAliasValueCausesException()
|
||||
{
|
||||
|
@ -476,7 +476,7 @@ class ProgressBar
|
||||
/**
|
||||
* Sets the progress bar maximal steps.
|
||||
*
|
||||
* @param int The progress bar max steps
|
||||
* @param int $max The progress bar max steps
|
||||
*/
|
||||
private function setMaxSteps($max)
|
||||
{
|
||||
|
@ -378,7 +378,7 @@ class Table
|
||||
* fill rows that contains rowspan > 1.
|
||||
*
|
||||
* @param array $rows
|
||||
* @param array $line
|
||||
* @param int $line
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
@ -431,7 +431,7 @@ class Table
|
||||
* fill cells for a row that contains colspan > 1.
|
||||
*
|
||||
* @param array $row
|
||||
* @param array $column
|
||||
* @param int $column
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
|
@ -617,7 +617,7 @@ class ContainerTest extends \PHPUnit_Framework_TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException Exception
|
||||
* @expectedException \Exception
|
||||
* @expectedExceptionMessage Something went terribly wrong!
|
||||
*/
|
||||
public function testGetThrowsException()
|
||||
|
@ -820,7 +820,7 @@ class FormTest extends \PHPUnit_Framework_TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException InvalidArgumentException
|
||||
* @expectedException \InvalidArgumentException
|
||||
* @expectedExceptionMessage Unreachable field "0"
|
||||
*/
|
||||
public function testFormRegistrySetArrayOnNotCompoundField()
|
||||
|
@ -12,6 +12,7 @@
|
||||
namespace Symfony\Component\EventDispatcher\Tests;
|
||||
|
||||
use Symfony\Component\EventDispatcher\Event;
|
||||
use Symfony\Component\EventDispatcher\EventDispatcher;
|
||||
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
||||
|
||||
abstract class AbstractEventDispatcherTest extends \PHPUnit_Framework_TestCase
|
||||
|
@ -84,7 +84,14 @@ class ExpressionLanguage
|
||||
return $expression;
|
||||
}
|
||||
|
||||
$key = $expression.'//'.implode('-', $names);
|
||||
asort($names);
|
||||
$cacheKeyItems = array();
|
||||
|
||||
foreach ($names as $nameKey => $name) {
|
||||
$cacheKeyItems[] = is_int($nameKey) ? $name : $nameKey.':'.$name;
|
||||
}
|
||||
|
||||
$key = $expression.'//'.implode('|', $cacheKeyItems);
|
||||
|
||||
if (null === $parsedExpression = $this->cache->fetch($key)) {
|
||||
$nodes = $this->getParser()->parse($this->getLexer()->tokenize((string) $expression), $names);
|
||||
|
@ -88,7 +88,7 @@ class Parser
|
||||
* @param TokenStream $stream A token stream instance
|
||||
* @param array $names An array of valid names
|
||||
*
|
||||
* @return Node A node tree
|
||||
* @return Node\Node A node tree
|
||||
*
|
||||
* @throws SyntaxError
|
||||
*/
|
||||
|
@ -104,4 +104,38 @@ class ExpressionLanguageTest extends \PHPUnit_Framework_TestCase
|
||||
array('true or foo', array('foo' => 'foo'), true),
|
||||
);
|
||||
}
|
||||
|
||||
public function testCachingForOverriddenVariableNames()
|
||||
{
|
||||
$expressionLanguage = new ExpressionLanguage();
|
||||
$expression = 'a + b';
|
||||
$expressionLanguage->evaluate($expression, array('a' => 1, 'b' => 1));
|
||||
$result = $expressionLanguage->compile($expression, array('a', 'B' => 'b'));
|
||||
$this->assertSame('($a + $B)', $result);
|
||||
}
|
||||
|
||||
public function testCachingWithDifferentNamesOrder()
|
||||
{
|
||||
$cacheMock = $this->getMock('Symfony\Component\ExpressionLanguage\ParserCache\ParserCacheInterface');
|
||||
$expressionLanguage = new ExpressionLanguage($cacheMock);
|
||||
$savedParsedExpressions = array();
|
||||
$cacheMock
|
||||
->expects($this->exactly(2))
|
||||
->method('fetch')
|
||||
->will($this->returnCallback(function ($key) use (&$savedParsedExpressions) {
|
||||
return isset($savedParsedExpressions[$key]) ? $savedParsedExpressions[$key] : null;
|
||||
}))
|
||||
;
|
||||
$cacheMock
|
||||
->expects($this->exactly(1))
|
||||
->method('save')
|
||||
->will($this->returnCallback(function ($key, $expression) use (&$savedParsedExpressions) {
|
||||
$savedParsedExpressions[$key] = $expression;
|
||||
}))
|
||||
;
|
||||
|
||||
$expression = 'a + b';
|
||||
$expressionLanguage->compile($expression, array('a', 'B' => 'b'));
|
||||
$expressionLanguage->compile($expression, array('B' => 'b', 'a'));
|
||||
}
|
||||
}
|
||||
|
@ -7,7 +7,7 @@ use Symfony\Component\Filesystem\LockHandler;
|
||||
class LockHandlerTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @expectedException Symfony\Component\Filesystem\Exception\IOException
|
||||
* @expectedException \Symfony\Component\Filesystem\Exception\IOException
|
||||
* @expectedExceptionMessage Failed to create "/a/b/c/d/e": mkdir(): Permission denied.
|
||||
*/
|
||||
public function testConstructWhenRepositoryDoesNotExist()
|
||||
@ -19,7 +19,7 @@ class LockHandlerTest extends \PHPUnit_Framework_TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException Symfony\Component\Filesystem\Exception\IOException
|
||||
* @expectedException \Symfony\Component\Filesystem\Exception\IOException
|
||||
* @expectedExceptionMessage The directory "/" is not writable.
|
||||
*/
|
||||
public function testConstructWhenRepositoryIsNotWriteable()
|
||||
|
@ -77,14 +77,6 @@ class PropertyPathMapperTest extends \PHPUnit_Framework_TestCase
|
||||
return $form;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \PHPUnit_Framework_MockObject_MockObject
|
||||
*/
|
||||
private function getDataMapper()
|
||||
{
|
||||
return $this->getMock('Symfony\Component\Form\DataMapperInterface');
|
||||
}
|
||||
|
||||
public function testMapDataToFormsPassesObjectRefIfByReference()
|
||||
{
|
||||
$car = new \stdClass();
|
||||
|
@ -786,9 +786,4 @@ class FormFactoryTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
return $this->getMock('Symfony\Component\Form\ResolvedFormTypeInterface');
|
||||
}
|
||||
|
||||
private function getMockType()
|
||||
{
|
||||
return $this->getMock('Symfony\Component\Form\FormTypeInterface');
|
||||
}
|
||||
}
|
||||
|
@ -63,10 +63,10 @@ abstract class Kernel implements KernelInterface, TerminableInterface
|
||||
protected $loadClassCache;
|
||||
|
||||
const VERSION = '2.8.0-DEV';
|
||||
const VERSION_ID = '20800';
|
||||
const MAJOR_VERSION = '2';
|
||||
const MINOR_VERSION = '8';
|
||||
const RELEASE_VERSION = '0';
|
||||
const VERSION_ID = 20800;
|
||||
const MAJOR_VERSION = 2;
|
||||
const MINOR_VERSION = 8;
|
||||
const RELEASE_VERSION = 0;
|
||||
const EXTRA_VERSION = 'DEV';
|
||||
|
||||
const END_OF_MAINTENANCE = '05/2018';
|
||||
|
@ -55,7 +55,7 @@ class RoutableFragmentRendererTest extends \PHPUnit_Framework_TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException LogicException
|
||||
* @expectedException \LogicException
|
||||
* @dataProvider getGenerateFragmentUriDataWithNonScalar
|
||||
*/
|
||||
public function testGenerateFragmentUriWithNonScalar($controller)
|
||||
|
@ -12,6 +12,7 @@
|
||||
namespace Symfony\Component\HttpKernel\Tests;
|
||||
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
use Symfony\Component\HttpKernel\Bundle\BundleInterface;
|
||||
use Symfony\Component\HttpKernel\Config\EnvParametersResource;
|
||||
use Symfony\Component\HttpKernel\Kernel;
|
||||
use Symfony\Component\HttpKernel\HttpKernelInterface;
|
||||
|
@ -10,14 +10,11 @@
|
||||
*/
|
||||
|
||||
use Symfony\Component\Intl\Collator\Collator as IntlCollator;
|
||||
use Symfony\Component\Intl\Collator\StubCollator;
|
||||
|
||||
/**
|
||||
* Stub implementation for the Collator class of the intl extension.
|
||||
*
|
||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||
*
|
||||
* @see StubCollator
|
||||
*/
|
||||
class Collator extends IntlCollator
|
||||
{
|
||||
|
@ -107,7 +107,7 @@ class EncoderFactoryTest extends \PHPUnit_Framework_TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException RuntimeException
|
||||
* @expectedException \RuntimeException
|
||||
*/
|
||||
public function testGetInvalidNamedEncoderForEncoderAware()
|
||||
{
|
||||
|
@ -250,7 +250,7 @@ class AbstractRememberMeServicesTest extends \PHPUnit_Framework_TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException InvalidArgumentException
|
||||
* @expectedException \InvalidArgumentException
|
||||
* @expectedExceptionMessage cookie delimiter
|
||||
*/
|
||||
public function testThereShouldBeNoCookieDelimiterInCookieParts()
|
||||
|
@ -11,6 +11,7 @@
|
||||
|
||||
namespace Symfony\Component\Validator\Mapping;
|
||||
|
||||
use Symfony\Component\Validator\Constraint;
|
||||
use Symfony\Component\Validator\MetadataInterface as LegacyMetadataInterface;
|
||||
|
||||
/**
|
||||
|
@ -36,8 +36,8 @@ class Caster
|
||||
/**
|
||||
* Casts objects to arrays and adds the dynamic property prefix.
|
||||
*
|
||||
* @param object $obj The object to cast.
|
||||
* @param ReflectionClass $reflector The class reflector to use for inspecting the object definition.
|
||||
* @param object $obj The object to cast.
|
||||
* @param \ReflectionClass $reflector The class reflector to use for inspecting the object definition.
|
||||
*
|
||||
* @return array The array-cast of the object, with prefixed dynamic properties.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user