Merge branch '2.7' into 2.8
* 2.7: fixed CS [DependencyInjection] Add missing file headers fixed typo made Symfony compatible with both Twig 1.x and 2.x [FrameworkBundle] Fix precedence of xdebug.file_link_format
This commit is contained in:
commit
07174c30de
@ -473,7 +473,7 @@ Form
|
|||||||
After:
|
After:
|
||||||
|
|
||||||
```jinja
|
```jinja
|
||||||
{{ choice_translation_domain is sameas(false) ? choice.label : choice.label|trans({}, choice_translation_domain) }}
|
{{ choice_translation_domain is same as(false) ? choice.label : choice.label|trans({}, choice_translation_domain) }}
|
||||||
```
|
```
|
||||||
|
|
||||||
Serializer
|
Serializer
|
||||||
|
@ -18,6 +18,6 @@ class StubFilesystemLoader extends \Twig_Loader_Filesystem
|
|||||||
// strip away bundle name
|
// strip away bundle name
|
||||||
$parts = explode(':', $name);
|
$parts = explode(':', $name);
|
||||||
|
|
||||||
return parent::findTemplate(end($parts));
|
return parent::findTemplate(end($parts), $throw);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -471,14 +471,17 @@ class FrameworkExtension extends Extension
|
|||||||
{
|
{
|
||||||
$loader->load('templating.xml');
|
$loader->load('templating.xml');
|
||||||
|
|
||||||
$links = array(
|
if (!$container->hasParameter('templating.helper.code.file_link_format')) {
|
||||||
'textmate' => 'txmt://open?url=file://%%f&line=%%l',
|
$links = array(
|
||||||
'macvim' => 'mvim://open?url=file://%%f&line=%%l',
|
'textmate' => 'txmt://open?url=file://%%f&line=%%l',
|
||||||
'emacs' => 'emacs://open?url=file://%%f&line=%%l',
|
'macvim' => 'mvim://open?url=file://%%f&line=%%l',
|
||||||
'sublime' => 'subl://open?url=file://%%f&line=%%l',
|
'emacs' => 'emacs://open?url=file://%%f&line=%%l',
|
||||||
);
|
'sublime' => 'subl://open?url=file://%%f&line=%%l',
|
||||||
|
);
|
||||||
|
|
||||||
|
$container->setParameter('templating.helper.code.file_link_format', ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format') ?: (isset($links[$ide]) ? $links[$ide] : $ide));
|
||||||
|
}
|
||||||
|
|
||||||
$container->setParameter('templating.helper.code.file_link_format', isset($links[$ide]) ? $links[$ide] : $ide);
|
|
||||||
$container->setParameter('fragment.renderer.hinclude.global_template', $config['hinclude_default_template']);
|
$container->setParameter('fragment.renderer.hinclude.global_template', $config['hinclude_default_template']);
|
||||||
|
|
||||||
if ($container->getParameter('kernel.debug')) {
|
if ($container->getParameter('kernel.debug')) {
|
||||||
|
@ -1,5 +1,14 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of the Symfony package.
|
||||||
|
*
|
||||||
|
* (c) Fabien Potencier <fabien@symfony.com>
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\DependencyInjection\Tests\Compiler;
|
namespace Symfony\Component\DependencyInjection\Tests\Compiler;
|
||||||
|
|
||||||
use Symfony\Component\DependencyInjection\Compiler\AutoAliasServicePass;
|
use Symfony\Component\DependencyInjection\Compiler\AutoAliasServicePass;
|
||||||
|
@ -1,5 +1,14 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of the Symfony package.
|
||||||
|
*
|
||||||
|
* (c) Fabien Potencier <fabien@symfony.com>
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\DependencyInjection\Tests\Compiler;
|
namespace Symfony\Component\DependencyInjection\Tests\Compiler;
|
||||||
|
|
||||||
use Symfony\Component\DependencyInjection\Compiler\MergeExtensionConfigurationPass;
|
use Symfony\Component\DependencyInjection\Compiler\MergeExtensionConfigurationPass;
|
||||||
@ -35,7 +44,7 @@ class MergeExtensionConfigurationPassTest extends \PHPUnit_Framework_TestCase
|
|||||||
$provider = $this->getMock('Symfony\\Component\\ExpressionLanguage\\ExpressionFunctionProviderInterface');
|
$provider = $this->getMock('Symfony\\Component\\ExpressionLanguage\\ExpressionFunctionProviderInterface');
|
||||||
$container = new ContainerBuilder(new ParameterBag());
|
$container = new ContainerBuilder(new ParameterBag());
|
||||||
$container->registerExtension($extension);
|
$container->registerExtension($extension);
|
||||||
$container->prependExtensionConfig('foo', array('bar' => true ));
|
$container->prependExtensionConfig('foo', array('bar' => true));
|
||||||
$container->addExpressionLanguageProvider($provider);
|
$container->addExpressionLanguageProvider($provider);
|
||||||
|
|
||||||
$pass = new MergeExtensionConfigurationPass();
|
$pass = new MergeExtensionConfigurationPass();
|
||||||
|
@ -133,7 +133,7 @@ class CommandTest extends \PHPUnit_Framework_TestCase
|
|||||||
public function testErrorHandler()
|
public function testErrorHandler()
|
||||||
{
|
{
|
||||||
$cmd = Command::create();
|
$cmd = Command::create();
|
||||||
$handler = function() { return 'error-handler'; };
|
$handler = function () { return 'error-handler'; };
|
||||||
$cmd->setErrorHandler($handler);
|
$cmd->setErrorHandler($handler);
|
||||||
|
|
||||||
$this->assertSame($handler, $cmd->getErrorHandler());
|
$this->assertSame($handler, $cmd->getErrorHandler());
|
||||||
|
@ -1577,7 +1577,7 @@ class Request
|
|||||||
|
|
||||||
// Content passed in parameter (test)
|
// Content passed in parameter (test)
|
||||||
if (is_string($this->content)) {
|
if (is_string($this->content)) {
|
||||||
$resource = fopen('php://temp','r+');
|
$resource = fopen('php://temp', 'r+');
|
||||||
fwrite($resource, $this->content);
|
fwrite($resource, $this->content);
|
||||||
rewind($resource);
|
rewind($resource);
|
||||||
|
|
||||||
|
@ -980,7 +980,7 @@ class RequestTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
public function testContentAsResource()
|
public function testContentAsResource()
|
||||||
{
|
{
|
||||||
$resource = fopen('php://memory','r+');
|
$resource = fopen('php://memory', 'r+');
|
||||||
fwrite($resource, 'My other content');
|
fwrite($resource, 'My other content');
|
||||||
rewind($resource);
|
rewind($resource);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user