Skip to content

Commit a353ff6

Browse files
committed
Merge branch '2.7' into 2.8
* 2.7: Fix test name fixed CS Allow new lines in Messages translated with transchoice() (replacement for #14867) [Form] Swap new ChoiceView constructor arguments to ease migrating from the deprecated one [2.3] Fix tests on Windows [Yaml] remove partial deprecation annotation Silence invasive deprecation warnings, opt-in for warnings Documenting how to keep option value BC - see #14377 Conflicts: src/Symfony/Bridge/Doctrine/composer.json src/Symfony/Bridge/Twig/composer.json
2 parents 5ac7e01 + dee055c commit a353ff6

16 files changed

+26
-25
lines changed

Controller/Controller.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ protected function addFlash($type, $message)
120120
* @param mixed $object The object
121121
*
122122
* @throws \LogicException
123+
*
123124
* @return bool
124125
*/
125126
protected function isGranted($attributes, $object = null)
@@ -273,7 +274,7 @@ public function createFormBuilder($data = null, array $options = array())
273274
*/
274275
public function getRequest()
275276
{
276-
trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0. The only reliable way to get the "Request" object is to inject it in the action method.', E_USER_DEPRECATED);
277+
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0. The only reliable way to get the "Request" object is to inject it in the action method.', E_USER_DEPRECATED);
277278

278279
return $this->container->get('request_stack')->getCurrentRequest();
279280
}
@@ -343,7 +344,7 @@ public function has($id)
343344
public function get($id)
344345
{
345346
if ('request' === $id) {
346-
trigger_error('The "request" service is deprecated and will be removed in 3.0. Add a typehint for Symfony\\Component\\HttpFoundation\\Request to your controller parameters to retrieve the request instead.', E_USER_DEPRECATED);
347+
@trigger_error('The "request" service is deprecated and will be removed in 3.0. Add a typehint for Symfony\\Component\\HttpFoundation\\Request to your controller parameters to retrieve the request instead.', E_USER_DEPRECATED);
347348
}
348349

349350
return $this->container->get($id);
@@ -362,7 +363,7 @@ protected function getParameter($name)
362363
}
363364

364365
/**
365-
* Checks the validity of a CSRF token
366+
* Checks the validity of a CSRF token.
366367
*
367368
* @param string $id The id used when generating the token
368369
* @param string $token The actual token sent with the request that should be validated

DependencyInjection/Compiler/FragmentRendererPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
namespace Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler;
1313

14-
trigger_error('The '.__NAMESPACE__.'\FragmentRendererPass class is deprecated since version 2.7 and will be removed in 3.0. Use Symfony\Component\HttpKernel\DependencyInjection\FragmentRendererPass instead.', E_USER_DEPRECATED);
14+
@trigger_error('The '.__NAMESPACE__.'\FragmentRendererPass class is deprecated since version 2.7 and will be removed in 3.0. Use Symfony\Component\HttpKernel\DependencyInjection\FragmentRendererPass instead.', E_USER_DEPRECATED);
1515

1616
use Symfony\Component\DependencyInjection\Reference;
1717
use Symfony\Component\DependencyInjection\ContainerBuilder;

DependencyInjection/Compiler/TemplatingAssetHelperPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
use Symfony\Component\DependencyInjection\Definition;
1717
use Symfony\Component\DependencyInjection\Reference;
1818

19-
trigger_error('The '.__NAMESPACE__.'\TemplatingAssetHelperPass class is deprecated since version 2.7 and will be removed in 3.0.', E_USER_DEPRECATED);
19+
@trigger_error('The '.__NAMESPACE__.'\TemplatingAssetHelperPass class is deprecated since version 2.7 and will be removed in 3.0.', E_USER_DEPRECATED);
2020

2121
/**
2222
* @deprecated since 2.7, will be removed in 3.0

DependencyInjection/Configuration.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public function getConfigTreeBuilder()
4848
->beforeNormalization()
4949
->ifTrue(function ($v) { return isset($v['csrf_protection']['field_name']); })
5050
->then(function ($v) {
51-
trigger_error('The framework.csrf_protection.field_name configuration key is deprecated since version 2.4 and will be removed in 3.0. Use the framework.form.csrf_protection.field_name configuration key instead', E_USER_DEPRECATED);
51+
@trigger_error('The framework.csrf_protection.field_name configuration key is deprecated since version 2.4 and will be removed in 3.0. Use the framework.form.csrf_protection.field_name configuration key instead', E_USER_DEPRECATED);
5252

5353
return $v;
5454
})
@@ -82,7 +82,7 @@ public function getConfigTreeBuilder()
8282
|| count($v['templating']['assets_base_urls']['ssl'])
8383
|| count($v['templating']['packages'])
8484
) {
85-
trigger_error('The assets settings under framework.templating are deprecated since version 2.7 and will be removed in 3.0. Use the framework.assets configuration key instead', E_USER_DEPRECATED);
85+
@trigger_error('The assets settings under framework.templating are deprecated since version 2.7 and will be removed in 3.0. Use the framework.assets configuration key instead', E_USER_DEPRECATED);
8686

8787
// convert the old configuration to the new one
8888
if (isset($v['assets'])) {
@@ -115,7 +115,7 @@ public function getConfigTreeBuilder()
115115
->beforeNormalization()
116116
->ifTrue(function ($v) { return isset($v['validation']['api']); })
117117
->then(function ($v) {
118-
trigger_error('The validation.api configuration key is deprecated since version 2.7 and will be removed in 3.0', E_USER_DEPRECATED);
118+
@trigger_error('The validation.api configuration key is deprecated since version 2.7 and will be removed in 3.0', E_USER_DEPRECATED);
119119

120120
return $v;
121121
})

Fragment/ContainerAwareHIncludeFragmentRenderer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
namespace Symfony\Bundle\FrameworkBundle\Fragment;
1313

14-
trigger_error('The '.__NAMESPACE__.'\ContainerAwareHIncludeFragmentRenderer class is deprecated since version 2.7 and will be removed in 3.0. Use Symfony\Bundle\FrameworkBundle\Fragment\HIncludeFragmentRenderer instead.', E_USER_DEPRECATED);
14+
@trigger_error('The '.__NAMESPACE__.'\ContainerAwareHIncludeFragmentRenderer class is deprecated since version 2.7 and will be removed in 3.0. Use Symfony\Bundle\FrameworkBundle\Fragment\HIncludeFragmentRenderer instead.', E_USER_DEPRECATED);
1515

1616
use Symfony\Component\DependencyInjection\ContainerInterface;
1717
use Symfony\Component\HttpFoundation\Request;

HttpCache/HttpCache.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,15 @@ protected function createSurrogate()
7676
}
7777

7878
/**
79-
* Creates new ESI instance
79+
* Creates new ESI instance.
8080
*
8181
* @return Esi
8282
*
8383
* @deprecated since version 2.6, to be removed in 3.0. Use createSurrogate() instead
8484
*/
8585
protected function createEsi()
8686
{
87-
trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use createSurrogate() instead.', E_USER_DEPRECATED);
87+
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use createSurrogate() instead.', E_USER_DEPRECATED);
8888

8989
return $this->createSurrogate();
9090
}

Templating/Asset/PackageFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
namespace Symfony\Bundle\FrameworkBundle\Templating\Asset;
1313

14-
trigger_error('The Symfony\Bundle\FrameworkBundle\Templating\Asset\PackageFactory is deprecated since version 2.7 and will be removed in 3.0. Use the Asset component instead.', E_USER_DEPRECATED);
14+
@trigger_error('The Symfony\Bundle\FrameworkBundle\Templating\Asset\PackageFactory is deprecated since version 2.7 and will be removed in 3.0. Use the Asset component instead.', E_USER_DEPRECATED);
1515

1616
use Symfony\Component\DependencyInjection\ContainerInterface;
1717
use Symfony\Component\HttpFoundation\Request;

Templating/Asset/PathPackage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
use Symfony\Component\HttpFoundation\Request;
1515
use Symfony\Component\Templating\Asset\PathPackage as BasePathPackage;
1616

17-
trigger_error('The Symfony\Bundle\FrameworkBundle\Templating\Asset\PathPackage is deprecated since version 2.7 and will be removed in 3.0. Use the Asset component instead.', E_USER_DEPRECATED);
17+
@trigger_error('The Symfony\Bundle\FrameworkBundle\Templating\Asset\PathPackage is deprecated since version 2.7 and will be removed in 3.0. Use the Asset component instead.', E_USER_DEPRECATED);
1818

1919
/**
2020
* The path packages adds a version and a base path to asset URLs.

Templating/Debugger.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
namespace Symfony\Bundle\FrameworkBundle\Templating;
1313

14-
trigger_error('The '.__NAMESPACE__.'\Debugger class is deprecated since version 2.4 and will be removed in 3.0. Use the Psr\Log\LoggerInterface interface instead.', E_USER_DEPRECATED);
14+
@trigger_error('The '.__NAMESPACE__.'\Debugger class is deprecated since version 2.4 and will be removed in 3.0. Use the Psr\Log\LoggerInterface interface instead.', E_USER_DEPRECATED);
1515

1616
use Symfony\Component\Templating\DebuggerInterface;
1717
use Psr\Log\LoggerInterface;

Templating/GlobalVariables.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function __construct(ContainerInterface $container)
4343
*/
4444
public function getSecurity()
4545
{
46-
trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0.', E_USER_DEPRECATED);
46+
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0.', E_USER_DEPRECATED);
4747

4848
if ($this->container->has('security.context')) {
4949
return $this->container->get('security.context');

Templating/Helper/AssetsHelper.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function getUrl($path, $packageName = null, $version = null)
4444
{
4545
// BC layer to be removed in 3.0
4646
if (3 === $count = func_num_args()) {
47-
trigger_error('Forcing a version for an asset was deprecated in 2.7 and will be removed in 3.0.', E_USER_DEPRECATED);
47+
@trigger_error('Forcing a version for an asset was deprecated in 2.7 and will be removed in 3.0.', E_USER_DEPRECATED);
4848

4949
$args = func_get_args();
5050

@@ -66,7 +66,7 @@ public function getVersion($path = null, $packageName = null)
6666
{
6767
// no arguments means old getVersion() for default package
6868
if (null === $path) {
69-
trigger_error('The getVersion() method requires a path as a first argument since 2.7 and will be enforced as of 3.0.', E_USER_DEPRECATED);
69+
@trigger_error('The getVersion() method requires a path as a first argument since 2.7 and will be enforced as of 3.0.', E_USER_DEPRECATED);
7070

7171
return $this->packages->getVersion('/', $packageName);
7272
}
@@ -85,7 +85,7 @@ public function getVersion($path = null, $packageName = null)
8585
}
8686

8787
// path is a packageName, old version
88-
trigger_error('The getVersion() method requires a path as a first argument since 2.7 and will be enforced as of 3.0.', E_USER_DEPRECATED);
88+
@trigger_error('The getVersion() method requires a path as a first argument since 2.7 and will be enforced as of 3.0.', E_USER_DEPRECATED);
8989

9090
return $this->packages->getVersion('/', $path);
9191
}

Templating/Helper/FormHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ public function end(FormView $view, array $variables = array())
136136
*/
137137
public function enctype(FormView $view)
138138
{
139-
trigger_error('The form helper $view[\'form\']->enctype() is deprecated since version 2.3 and will be removed in 3.0. Use $view[\'form\']->start() instead.', E_USER_DEPRECATED);
139+
@trigger_error('The form helper $view[\'form\']->enctype() is deprecated since version 2.3 and will be removed in 3.0. Use $view[\'form\']->start() instead.', E_USER_DEPRECATED);
140140

141141
return $this->renderer->searchAndRenderBlock($view, 'enctype');
142142
}

Templating/Helper/RequestHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class RequestHelper extends Helper
3535
public function __construct($requestStack)
3636
{
3737
if ($requestStack instanceof Request) {
38-
trigger_error('Since version 2.5, passing a Request instance into the '.__METHOD__.' is deprecated and support for it will be removed in 3.0. Inject a Symfony\Component\HttpFoundation\RequestStack instance instead.', E_USER_DEPRECATED);
38+
@trigger_error('Since version 2.5, passing a Request instance into the '.__METHOD__.' is deprecated and support for it will be removed in 3.0. Inject a Symfony\Component\HttpFoundation\RequestStack instance instead.', E_USER_DEPRECATED);
3939
$this->request = $requestStack;
4040
} elseif ($requestStack instanceof RequestStack) {
4141
$this->requestStack = $requestStack;

Templating/Helper/SessionHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class SessionHelper extends Helper
3535
public function __construct($requestStack)
3636
{
3737
if ($requestStack instanceof Request) {
38-
trigger_error('Since version 2.5, passing a Request instance into the '.__METHOD__.' is deprecated and support for it will be removed in 3.0. Inject a Symfony\Component\HttpFoundation\RequestStack instance instead.', E_USER_DEPRECATED);
38+
@trigger_error('Since version 2.5, passing a Request instance into the '.__METHOD__.' is deprecated and support for it will be removed in 3.0. Inject a Symfony\Component\HttpFoundation\RequestStack instance instead.', E_USER_DEPRECATED);
3939
$this->session = $requestStack->getSession();
4040
} elseif ($requestStack instanceof RequestStack) {
4141
$this->requestStack = $requestStack;

Tests/Command/RouterDebugCommandTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class RouterDebugCommandTest extends \PHPUnit_Framework_TestCase
2222
public function testDebugAllRoutes()
2323
{
2424
$tester = $this->createCommandTester();
25-
$ret = $tester->execute(array('name' => null));
25+
$ret = $tester->execute(array('name' => null), array('decorated' => false));
2626

2727
$this->assertEquals(0, $ret, 'Returns 0 in case of success');
2828
$this->assertContains('[router] Current routes', $tester->getDisplay());
@@ -31,7 +31,7 @@ public function testDebugAllRoutes()
3131
public function testDebugSingleRoute()
3232
{
3333
$tester = $this->createCommandTester();
34-
$ret = $tester->execute(array('name' => 'foo'));
34+
$ret = $tester->execute(array('name' => 'foo'), array('decorated' => false));
3535

3636
$this->assertEquals(0, $ret, 'Returns 0 in case of success');
3737
$this->assertContains('[router] Route "foo"', $tester->getDisplay());

Tests/Command/RouterMatchCommandTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class RouterMatchCommandTest extends \PHPUnit_Framework_TestCase
2424
public function testWithMatchPath()
2525
{
2626
$tester = $this->createCommandTester();
27-
$ret = $tester->execute(array('path_info' => '/foo', 'foo'));
27+
$ret = $tester->execute(array('path_info' => '/foo', 'foo'), array('decorated' => false));
2828

2929
$this->assertEquals(0, $ret, 'Returns 0 in case of success');
3030
$this->assertContains('[router] Route "foo"', $tester->getDisplay());
@@ -33,7 +33,7 @@ public function testWithMatchPath()
3333
public function testWithNotMatchPath()
3434
{
3535
$tester = $this->createCommandTester();
36-
$ret = $tester->execute(array('path_info' => '/test', 'foo'));
36+
$ret = $tester->execute(array('path_info' => '/test', 'foo'), array('decorated' => false));
3737

3838
$this->assertEquals(1, $ret, 'Returns 1 in case of failure');
3939
$this->assertContains('None of the routes match the path "/test"', $tester->getDisplay());

0 commit comments

Comments
 (0)