10000 Merge branch '2.8' · symfony/symfony@eedd79b · GitHub
[go: up one dir, main page]

Skip to content

Commit eedd79b

Browse files
committed
Merge branch '2.8'
* 2.8: (36 commits) 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 [HttpFoundation] Postpone setting the date header on a Response [Console] SymfonyStyle : Fix blocks wordwrapping [Console] SymfonyStyle : Fix blocks output is broken on windows cmd [toolbar] Merged colored icons in toolbar [Validator] remove partial deprecation annotation Updated UPGRADE-2.4.md added missing " Silence invasive deprecation warnings, opt-in for warnings [Form] Support DateTimeImmutable in transform() Show the FormType and FormTypeExtension in case of deprecated use of setDefaultOptions Removed route name from the debugbar. [FrameworkBundle] Document form.csrf_provider service deprecation [Form] add test to avoid regression of #14891 without this change allways the legacy code get called ... Conflicts: UPGRADE-2.4.md UPGRADE-2.7.md src/Symfony/Bridge/Doctrine/composer.json src/Symfony/Bridge/Monolog/Logger.php src/Symfony/Bridge/Swiftmailer/DataCollector/MessageDataCollector.php src/Symfony/Bridge/Twig/AppVariable.php src/Symfony/Bridge/Twig/Extension/AssetExtension.php src/Symfony/Bundle/FrameworkBundle/Controller/Controller.php src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/TemplatingAssetHelperPass.php src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php src/Symfony/Bundle/FrameworkBundle/HttpCache/HttpCache.php src/Symfony/Bundle/FrameworkBundle/Resources/config/routing.xml src/Symfony/Bundle/FrameworkBundle/Templating/Asset/PackageFactory.php src/Symfony/Bundle/FrameworkBundle/Templating/Asset/PathPackage.php src/Symfony/Bundle/FrameworkBundle/Templating/Debugger.php src/Symfony/Bundle/FrameworkBundle/Templating/Helper/AssetsHelper.php src/Symfony/Bundle/FrameworkBundle/Templating/Helper/FormHelper.php src/Symfony/Bundle/FrameworkBundle/composer.json src/Symfony/Bundle/TwigBundle/Debug/TimedTwigEngine.php src/Symfony/Bundle/TwigBundle/DependencyInjection/Configuration.php src/Symfony/Bundle/TwigBundle/Extension/ActionsExtension.php src/Symfony/Bundle/TwigBundle/Extension/AssetsExtension.php src/Symfony/Bundle/TwigBundle/TwigDefaultEscapingStrategy.php src/Symfony/Bundle/TwigBundle/TwigEngine.php src/Symfony/Bundle/TwigBundle/composer.json src/Symfony/Component/ClassLoader/ApcUniversalClassLoader.php src/Symfony/Component/ClassLoader/DebugClassLoader.php src/Symfony/Component/ClassLoader/DebugUniversalClassLoader.php src/Symfony/Component/ClassLoader/UniversalClassLoader.php src/Symfony/Component/Config/Definition/ReferenceDumper.php src/Symfony/Component/Console/Application.php src/Symfony/Component/Console/Command/Command.php src/Symfony/Component/Console/Helper/DialogHelper.php src/Symfony/Component/Console/Helper/HelperSet.php src/Symfony/Component/Console/Helper/ProgressBar.php src/Symfony/Component/Console/Helper/ProgressHelper.php src/Symfony/Component/Console/Helper/TableHelper.php src/Symfony/Component/Console/Input/InputDefinition.php src/Symfony/Component/Console/Input/StringInput.php src/Symfony/Component/Debug/DebugClassLoader.php src/Symfony/Component/Debug/ErrorHandler.php src/Symfony/Component/Debug/Exception/DummyException.php src/Symfony/Component/Debug/ExceptionHandler.php src/Symfony/Component/DependencyInjection/ContainerBuilder.php src/Symfony/Component/DependencyInjection/Definition.php src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php src/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php src/Symfony/Component/DependencyInjection/SimpleXMLElement.php src/Symfony/Component/EventDispatcher/Event.php src/Symfony/Component/Filesystem/Filesystem.php src/Symfony/Component/Form/Deprecated/FormEvents.php src/Symfony/Component/Form/Extension/HttpFoundation/EventListener/BindRequestListener.php src/Symfony/Component/Form/ResolvedFormType.php src/Symfony/Component/HttpFoundation/Session/Flash/FlashBag.php src/Symfony/Component/HttpFoundation/Session/Storage/Handler/LegacyPdoSessionHandler.php src/Symfony/Component/HttpKernel/Debug/ErrorHandler.php src/Symfony/Component/HttpKernel/Debug/ExceptionHandler.php src/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php src/Symfony/Component/HttpKernel/DependencyInjection/ContainerAwareHttpKernel.php src/Symfony/Component/HttpKernel/DependencyInjection/FragmentRendererPass.php src/Symfony/Component/HttpKernel/DependencyInjection/RegisterListenersPass.php src/Symfony/Component/HttpKernel/EventListener/ErrorsLoggerListener.php src/Symfony/Component/HttpKernel/EventListener/EsiListener.php src/Symfony/Component/HttpKernel/EventListener/FragmentListener.php src/Symfony/Component/HttpKernel/EventListener/LocaleListener.php src/Symfony/Component/HttpKernel/EventListener/ProfilerListener.php src/Symfony/Component/HttpKernel/EventListener/RouterListener.php src/Symfony/Component/HttpKernel/Exception/FatalErrorException.php src/Symfony/Component/HttpKernel/Exception/FlattenException.php src/Symfony/Component/HttpKernel/Fragment/FragmentHandler.php src/Symfony/Component/HttpKernel/HttpCache/Esi.php src/Symfony/Component/HttpKernel/HttpCache/EsiResponseCacheStrategy.php src/Symfony/Component/HttpKernel/HttpCache/EsiResponseCacheStrategyInterface.php src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php src/Symfony/Component/HttpKernel/Kernel.php src/Symfony/Component/HttpKernel/Log/NullLogger.php src/Symfony/Component/HttpKernel/composer.json src/Symfony/Component/Locale/Exception/MethodArgumentNotImplementedException.php src/Symfony/Component/Locale/Exception/MethodArgumentValueNotImplementedException.php src/Symfony/Component/Locale/Exception/MethodNotImplementedException.php src/Symfony/Component/Locale/Exception/NotImplementedException.php src/Symfony/Component/Locale/Locale.php src/Symfony/Component/Locale/Stub/DateFormat/AmPmTransformer.php src/Symfony/Component/Locale/Stub/DateFormat/DayOfWeekTransformer.php src/Symfony/Component/Locale/Stub/DateFormat/DayOfYearTransformer.php src/Symfony/Component/Locale/Stub/DateFormat/DayTransformer.php src/Symfony/Component/Locale/Stub/DateFormat/FullTransformer.php src/Symfony/Component/Locale/Stub/DateFormat/Hour1200Transformer.php src/Symfony/Component/Locale/Stub/DateFormat/Hour1201Transformer.php src/Symfony/Component/Locale/Stub/DateFormat/Hour2400Transformer.php src/Symfony/Component/Locale/Stub/DateFormat/Hour2401Transformer.php src/Symfony/Component/Locale/Stub/DateFormat/HourTransformer.php src/Symfony/Component/Locale/Stub/DateFormat/MinuteTransformer.php src/Symfony/Component/Locale/Stub/DateFormat/MonthTransformer.php src/Symfony/Component/Locale/Stub/DateFormat/QuarterTransformer.php src/Symfony/Component/Locale/Stub/DateFormat/SecondTransformer.php src/Symfony/Component/Locale/Stub/DateFormat/TimeZoneTransformer.php src/Symfony/Component/Locale/Stub/DateFormat/Transformer.php src/Symfony/Component/Locale/Stub/DateFormat/YearTransformer.php src/Symfony/Component/Locale/Stub/StubCollator.php src/Symfony/Component/Locale/Stub/StubIntl.php src/Symfony/Component/Locale/Stub/StubIntlDateFormatter.php src/Symfony/Component/Locale/Stub/StubLocale.php src/Symfony/Component/Locale/Stub/StubNumberFormatter.php src/Symfony/Component/OptionsResolver/OptionsResolver.php src/Symfony/Component/Process/Process.php src/Symfony/Component/Process/ProcessUtils.php src/Symfony/Component/PropertyAccess/PropertyAccess.php src/Symfony/Component/Routing/Annotation/Route.php src/Symfony/Component/Routing/Loader/XmlFileLoader.php src/Symfony/Component/Routing/Loader/YamlFileLoader.php src/Symfony/Component/Routing/Matcher/ApacheUrlMatcher.php src/Symfony/Component/Routing/Matcher/Dumper/ApacheMatcherDumper.php src/Symfony/Component/Routing/Route.php src/Symfony/Component/Serializer/Encoder/JsonDecode.php src/Symfony/Component/Serializer/Encoder/JsonEncode.php src/Symfony/Component/Serializer/Encoder/JsonEncoder.php src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php src/Symfony/Component/Templating/Asset/Package.php src/Symfony/Component/Templating/Asset/PackageInterface.php src/Symfony/Component/Templating/Asset/PathPackage.php src/Symfony/Component/Templating/Asset/UrlPackage.php src/Symfony/Component/Templating/Helper/AssetsHelper.php src/Symfony/Component/Templating/Helper/CoreAssetsHelper.php src/Symfony/Component/Templating/Loader/Loader.php src/Symfony/Component/Translation/Translator.php src/Symfony/Component/VarDumper/Caster/ReflectionCaster.php src/Symfony/Component/VarDumper/Cloner/Data.php src/Symfony/Component/Yaml/Yaml.php
2 parents 9c29739 + ae470cd commit eedd79b

File tree

168 files changed

+1365
-396
lines changed

Some content is hidden

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

168 files changed

+1365
-396
lines changed

UPGRADE-3.0.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -461,6 +461,12 @@ UPGRADE FROM 2.x to 3.0
461461
engines: ['php']
462462
```
463463
464+
* The `form.csrf_provider` service is removed as it implements an adapter for
465+
the new token manager to the deprecated
466+
`Symfony\Component\Form\Extension\Csrf\CsrfProvider\CsrfProviderInterface`
467+
interface.
468+
The `security.csrf.token_manager` should be used instead.
469+
464470
### HttpKernel
465471

466472
* The `Symfony\Component\HttpKernel\Log\LoggerInterface` has been removed in

src/Symfony/Bridge/Doctrine/Form/ChoiceList/EntityChoiceList.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
namespace Symfony\Bridge\Doctrine\Form\ChoiceList;
1313

14-
trigger_error('The '.__NAMESPACE__.'\EntityChoiceList class is deprecated since version 2.7 and will be removed in 3.0. Use Symfony\Bridge\Doctrine\Form\ChoiceList\DoctrineChoiceLoader instead.', E_USER_DEPRECATED);
14+
@trigger_error('The '.__NAMESPACE__.'\EntityChoiceList class is deprecated since version 2.7 and will be removed in 3.0. Use Symfony\Bridge\Doctrine\Form\ChoiceList\DoctrineChoiceLoader instead.', E_USER_DEPRECATED);
1515

1616
use Doctrine\Common\Persistence\Mapping\ClassMetadata;
1717
use Doctrine\Common\Persistence\ObjectManager;
@@ -300,12 +300,11 @@ public function getValuesForChoices(array $entities)
300300
* @return array
301301
*
302302
* @see ChoiceListInterface
303-
*
304303
* @deprecated since version 2.4, to be removed in 3.0.
305304
*/
306305
public function getIndicesForChoices(array $entities)
307306
{
308-
trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0.', E_USER_DEPRECATED);
307+
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0.', E_USER_DEPRECATED);
309308

310309
// Performance optimization
311310
if (empty($entities)) {
@@ -344,12 +343,11 @@ public function getIndicesForChoices(array $entities)
344343
* @return array
345344
*
346345
* @see ChoiceListInterface
347-
*
348346
* @deprecated since version 2.4, to be removed in 3.0.
349347
*/
350348
public function getIndicesForValues(array $values)
351349
{
352-
trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0.', E_USER_DEPRECATED);
350+
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0.', E_USER_DEPRECATED);
353351

354352
// Performance optimization
355353
if (empty($values)) {

src/Symfony/Bridge/Doctrine/Form/ChoiceList/ORMQueryBuilderLoader.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,14 @@ public function __construct($queryBuilder, $manager = null, $class = null)
5757
}
5858

5959
if ($queryBuilder instanceof \Closure) {
60-
trigger_error('Passing a QueryBuilder closure to '.__CLASS__.'::__construct() is deprecated since version 2.7 and will be removed in 3.0.', E_USER_DEPRECATED);
60+
@trigger_error('Passing a QueryBuilder closure to '.__CLASS__.'::__construct() is deprecated since version 2.7 and will be removed in 3.0.', E_USER_DEPRECATED);
6161

6262
if (!$manager instanceof EntityManager) {
6363
throw new UnexpectedTypeException($manager, 'Doctrine\ORM\EntityManager');
6464
}
6565

66-
trigger_error('Passing an EntityManager to '.__CLASS__.'::__construct() is deprecated since version 2.7 and will be removed in 3.0.', E_USER_DEPRECATED);
67-
trigger_error('Passing a class to '.__CLASS__.'::__construct() is deprecated since version 2.7 and will be removed in 3.0.', E_USER_DEPRECATED);
66+
@trigger_error('Passing an EntityManager to '.__CLASS__.'::__construct() is deprecated since version 2.7 and will be removed in 3.0.', E_USER_DEPRECATED);
67+
@trigger_error('Passing a class to '.__CLASS__.'::__construct() is deprecated since version 2.7 and will be removed in 3.0.', E_USER_DEPRECATED);
6868

6969
$queryBuilder = $queryBuilder($manager->getRepository($class));
7070

src/Symfony/Bridge/Doctrine/Form/Type/DoctrineType.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ public function configureOptions(OptionsResolver $resolver)
241241
// deprecation note
242242
$propertyNormalizer = function (Options $options, $propertyName) {
243243
if ($propertyName) {
244-
trigger_error('The "property" option is deprecated since version 2.7 and will be removed in 3.0. Use "choice_label" instead.', E_USER_DEPRECATED);
244+
@trigger_error('The "property" option is deprecated since version 2.7 and will be removed in 3.0. Use "choice_label" instead.', E_USER_DEPRECATED);
245245
}
246246

247247
return $propertyName;
@@ -260,7 +260,7 @@ public function configureOptions(OptionsResolver $resolver)
260260
// deprecation note
261261
$loaderNormalizer = function (Options $options, $loader) {
262262
if ($loader) {
263-
trigger_error('The "loader" option is deprecated since version 2.7 and will be removed in 3.0. Override getLoader() instead.', E_USER_DEPRECATED);
263+
@trigger_error('The "loader" option is deprecated since version 2.7 and will be removed in 3.0. Override getLoader() instead.', E_USER_DEPRECATED);
264264
}
265265

266266
return $loader;

src/Symfony/Bridge/Doctrine/Tests/DoctrineOrmTestCase.php

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

1212
namespace Symfony\Bridge\Doctrine\Tests;
1313

14-
trigger_error('The '.__NAMESPACE__.'\DoctrineOrmTestCase class is deprecated since version 2.4 and will be removed in 3.0. Use Symfony\Bridge\Doctrine\Test\DoctrineTestHelper class instead.', E_USER_DEPRECATED);
14+
@trigger_error('The '.__NAMESPACE__.'\DoctrineOrmTestCase class is deprecated since version 2.4 and will be removed in 3.0. Use Symfony\Bridge\Doctrine\Test\DoctrineTestHelper class instead.', E_USER_DEPRECATED);
1515

1616
use Doctrine\ORM\EntityManager;
1717
use Symfony\Bridge\Doctrine\Test\DoctrineTestHelper;

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

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ public function testSetDataToUninitializedEntityWithNonRequired()
134134
'choice_label' => 'name',
135135
));
136136

137-
$ 741A this->assertEquals(array(1 => new ChoiceView('Foo', '1', $entity1), 2 => new ChoiceView('Bar', '2', $entity2)), $field->createView()->vars['choices']);
137+
$this->assertEquals(array(1 => new ChoiceView($entity1, '1', 'Foo'), 2 => new ChoiceView($entity2, '2', 'Bar')), $field->createView()->vars['choices']);
138138
}
139139

140140
public function testSetDataToUninitializedEntityWithNonRequiredToString()
@@ -150,7 +150,7 @@ public function testSetDataToUninitializedEntityWithNonRequiredToString()
150150
'required' => false,
151151
));
152152

153-
$this->assertEquals(array(1 => new ChoiceView('Foo', '1', $entity1), 2 => new ChoiceView('Bar', '2', $entity2)), $field->createView()->vars['choices']);
153+
$this->assertEquals(array(1 => new ChoiceView($entity1, '1', 'Foo'), 2 => new ChoiceView($entity2, '2', 'Bar')), $field->createView()->vars['choices']);
154154
}
155155

156156
public function testSetDataToUninitializedEntityWithNonRequiredQueryBuilder()
@@ -169,7 +169,7 @@ public function testSetDataToUninitializedEntityWithNonRequiredQueryBuilder()
169169
'query_builder' => $qb,
170170
));
171171

172-
$this->assertEquals(array(1 => new ChoiceView('Foo', '1', $entity1), 2 => new ChoiceView('Bar', '2', $entity2)), $field->createView()->vars['choices']);
172+
$this->assertEquals(array(1 => new ChoiceView($entity1, '1', 'Foo'), 2 => new ChoiceView($entity2, '2', 'Bar')), $field->createView()->vars['choices']);
173173
}
174174

175175
/**
@@ -513,7 +513,7 @@ public function testOverrideChoices()
513513

514514
$field->submit('2');
515515

516-
$this->assertEquals(array(1 => new ChoiceView('Foo', '1', $entity1), 2 => new ChoiceView('Bar', '2', $entity2)), $field->createView()->vars['choices']);
516+
$this->assertEquals(array(1 => new ChoiceView($entity1, '1', 'Foo'), 2 => new ChoiceView($entity2, '2', 'Bar')), $field->createView()->vars['choices']);
517517
$this->assertTrue($field->isSynchronized());
518518
$this->assertSame($entity2, $field->getData());
519519
$this->assertSame('2', $field->getViewData());
@@ -541,13 +541,13 @@ public function testGroupByChoices()
541541
$this->assertSame('2', $field->getViewData());
542542
$this->assertEquals(array(
543543
'Group1' => new ChoiceGroupView('Group1', array(
544-
1 => new ChoiceView('Foo', '1', $item1),
545-
2 => new ChoiceView('Bar', '2', $item2),
544+
1 => new ChoiceView($item1, '1', 'Foo'),
545+
2 => new ChoiceView($item2, '2', 'Bar'),
546546
)),
547547
'Group2' => new ChoiceGroupView('Group2', array(
548-
3 => new ChoiceView('Baz', '3', $item3),
548+
3 => new ChoiceView($item3, '3', 'Baz'),
549549
)),
550-
4 => new ChoiceView('Boo!', '4', $item4),
550+
4 => new ChoiceView($item4, '4', 'Boo!'),
551551
), $field->createView()->vars['choices']);
552552
}
553553

@@ -566,8 +566,8 @@ public function testPreferredChoices()
566566
'choice_label' => 'name',
567567
));
568568

569-
$this->assertEquals(array(3 => new ChoiceView('Baz', '3', $entity3), 2 => new ChoiceView('Bar', '2', $entity2)), $field->createView()->vars['preferred_choices']);
570-
$this->assertEquals(array(1 => new ChoiceView('Foo', '1', $entity1)), $field->createView()->vars['choices']);
569+
$this->assertEquals(array(3 => new ChoiceView($entity3, '3', 'Baz'), 2 => new ChoiceView($entity2, '2', 'Bar')), $field->createView()->vars['preferred_choices']);
570+
$this->assertEquals(array(1 => new ChoiceView($entity1, '1', 'Foo')), $field->createView()->vars['choices']);
571571
}
572572

573573
public function testOverrideChoicesWithPreferredChoices()
@@ -586,8 +586,8 @@ public function testOverrideChoicesWithPreferredChoices()
586586
'choice_label' => 'name',
587587
));
588588

589-
$this->assertEquals(array(3 => new ChoiceView('Baz', '3', $entity3)), $field->createView()->vars['preferred_choices']);
590-
$this->assertEquals(array(2 => new ChoiceView('Bar', '2', $entity2)), $field->createView()->vars['choices']);
589+
$this->assertEquals(array(3 => new ChoiceView($entity3, '3', 'Baz')), $field->createView()->vars['preferred_choices']);
590+
$this->assertEquals(array(2 => new ChoiceView($entity2, '2', 'Bar')), $field->createView()->vars['choices']);
591591
}
592592

593593
public function testDisallowChoicesThatAreNotIncludedChoicesSingleIdentifier()
@@ -883,7 +883,7 @@ public function testPropertyOption()
883883
'property' => 'name',
884884
));
885885

886-
$this->assertEquals(array(1 => new ChoiceView('Foo', '1', $entity1), 2 => new ChoiceView('Bar', '2', $entity2)), $field->createView()->vars['choices']);
886+
$this->assertEquals(array(1 => new ChoiceView($entity1, '1', 'Foo'), 2 => new ChoiceView($entity2, '2', 'Bar')), $field->createView()->vars['choices']);
887887
}
888888

889889
protected function createRegistryMock($name, $em)

src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionDivLayoutTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ public function isSelectedChoiceProvider()
125125
*/
126126
public function testIsChoiceSelected($expected, $choice, $value)
127127
{
128-
$choice = new ChoiceView($choice.' label', $choice, $choice);
128+
$choice = new ChoiceView($choice, $choice, $choice.' label');
129129

130130
$this->assertSame($expected, $this->extension->isSelectedChoice($choice, $value));
131131
}

src/Symfony/Bridge/Twig/Tests/Translation/TwigExtractorTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ public function getExtractData()
7272
}
7373

7474
/**
75-
* @expectedException \Twig_Error
76-
* @expectedExceptionMessage Unclosed "block" in "extractor/syntax_error.twig" at line 1
75+
* @expectedException \Twig_Error
76+
* @expectedExceptionMessageRegExp /Unclosed "block" in "extractor(\/|\\)syntax_error\.twig" at line 1/
7777
*/
7878
public function testExtractSyntaxError()
7979
{

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

Lines changed: 3 additions & 2 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)
@@ -327,7 +328,7 @@ protected function has($id)
327328
protected function get($id)
328329
{
329330
if ('request' === $id) {
330-
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);
331+
@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);
331332
}
332333

333334
return $this->container->get($id);
@@ -346,7 +347,7 @@ protected function getParameter($name)
346347
}
347348

348349
/**
349-
* Checks the validity of a CSRF token
350+
* Checks the validity of a CSRF token.
350351
*
351352
* @param string $id The id used when generating the token
352353
* @param string $token The actual token sent with the request that should be validated

src/Symfony/Bundle/FrameworkBundle/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;

src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php

Lines changed: 1 addition & 1 deletion
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
})

src/Symfony/Bundle/FrameworkBundle/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;

src/Symfony/Bundle/FrameworkBundle/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');

src/Symfony/Bundle/FrameworkBundle/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;

src/Symfony/Bundle/FrameworkBundle/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;

src/Symfony/Bundle/FrameworkBundle/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());

src/Symfony/Bundle/FrameworkBundle/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)
0