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
This commit is contained in:
commit
ae470cdf14
@ -4,26 +4,16 @@ UPGRADE FROM 2.6 to 2.7
|
||||
Global
|
||||
------
|
||||
|
||||
* `E_USER_DEPRECATED` warnings -
|
||||
`trigger_error('... is deprecated ...', E_USER_DEPRECATED)` -
|
||||
are now triggered when using all deprecated functionality.
|
||||
To avoid filling up error logs, you may need to add
|
||||
`~E_USER_DEPRECATED` to your `error_reporting` setting in
|
||||
`php.ini` to *not* add these errors to your log.
|
||||
* Deprecation notices -
|
||||
`@trigger_error('... is deprecated ...', E_USER_DEPRECATED)` -
|
||||
are now triggered when using any deprecated functionality.
|
||||
|
||||
In the Symfony Framework, `~E_USER_DEPRECATED` is added to
|
||||
`bootstrap.php.cache` automatically, but you need at least
|
||||
version `2.3.14` or `3.0.21` of the
|
||||
[SensioDistributionBundle](https://github.com/sensiolabs/SensioDistributionBundle).
|
||||
So, you may need to upgrade:
|
||||
By default these notices are silenced, so they won't appear in the PHP logs of
|
||||
your production server. However, these notices are still visible in the web
|
||||
debug toolbar, so you can know where your code needs an upgrade.
|
||||
|
||||
```bash
|
||||
composer update sensio/distribution-bundle
|
||||
```
|
||||
|
||||
The [phpunit-bridge](https://github.com/symfony/phpunit-bridge)
|
||||
was introduced to silence deprecation warnings while running your
|
||||
tests and give you a report of deprecated function calls.
|
||||
In addition, it's strongly recommended to enable the [phpunit-bridge](https://github.com/symfony/phpunit-bridge)
|
||||
so that you can deal with deprecation notices in your test suite.
|
||||
|
||||
Router
|
||||
------
|
||||
@ -144,6 +134,11 @@ Form
|
||||
'Ignored' => Status::IGNORED,
|
||||
),
|
||||
'choices_as_values' => true,
|
||||
// important if you rely on your option value attribute (e.g. for JavaScript)
|
||||
// this will keep the same functionality as before
|
||||
'choice_value' => function ($choice) {
|
||||
return $choice;
|
||||
},
|
||||
));
|
||||
```
|
||||
|
||||
@ -176,24 +171,8 @@ Form
|
||||
* `Symfony\Component\Form\Extension\Core\ChoiceList\View\ChoiceView` was
|
||||
deprecated and will be removed in Symfony 3.0. You should use
|
||||
`Symfony\Component\Form\ChoiceList\View\ChoiceView` instead.
|
||||
|
||||
Note that the order of the arguments passed to the constructor was inverted.
|
||||
|
||||
Before:
|
||||
|
||||
```php
|
||||
use Symfony\Component\Form\Extension\Core\ChoiceList\View\ChoiceView;
|
||||
|
||||
$view = new ChoiceView($data, 'value', 'Label');
|
||||
```
|
||||
|
||||
After:
|
||||
|
||||
```php
|
||||
use Symfony\Component\Form\ChoiceList\View\ChoiceView;
|
||||
|
||||
$view = new ChoiceView('Label', 'value', $data);
|
||||
```
|
||||
The constructor arguments of the new class are in the same order than in the
|
||||
deprecated one (this was not true in 2.7.0 but has been fixed in 2.7.1).
|
||||
|
||||
* `Symfony\Component\Form\Extension\Core\ChoiceList\ChoiceList` was
|
||||
deprecated and will be removed in Symfony 3.0. You should use
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
namespace Symfony\Bridge\Doctrine\Form\ChoiceList;
|
||||
|
||||
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);
|
||||
@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);
|
||||
|
||||
use Doctrine\Common\Persistence\Mapping\ClassMetadata;
|
||||
use Doctrine\Common\Persistence\ObjectManager;
|
||||
@ -300,12 +300,11 @@ class EntityChoiceList extends ObjectChoiceList
|
||||
* @return array
|
||||
*
|
||||
* @see ChoiceListInterface
|
||||
*
|
||||
* @deprecated since version 2.4, to be removed in 3.0.
|
||||
*/
|
||||
public function getIndicesForChoices(array $entities)
|
||||
{
|
||||
trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0.', E_USER_DEPRECATED);
|
||||
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0.', E_USER_DEPRECATED);
|
||||
|
||||
// Performance optimization
|
||||
if (empty($entities)) {
|
||||
@ -344,12 +343,11 @@ class EntityChoiceList extends ObjectChoiceList
|
||||
* @return array
|
||||
*
|
||||
* @see ChoiceListInterface
|
||||
*
|
||||
* @deprecated since version 2.4, to be removed in 3.0.
|
||||
*/
|
||||
public function getIndicesForValues(array $values)
|
||||
{
|
||||
trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0.', E_USER_DEPRECATED);
|
||||
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0.', E_USER_DEPRECATED);
|
||||
|
||||
// Performance optimization
|
||||
if (empty($values)) {
|
||||
|
@ -57,14 +57,14 @@ class ORMQueryBuilderLoader implements EntityLoaderInterface
|
||||
}
|
||||
|
||||
if ($queryBuilder instanceof \Closure) {
|
||||
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);
|
||||
@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);
|
||||
|
||||
if (!$manager instanceof EntityManager) {
|
||||
throw new UnexpectedTypeException($manager, 'Doctrine\ORM\EntityManager');
|
||||
}
|
||||
|
||||
trigger_error('Passing an EntityManager to '.__CLASS__.'::__construct() is deprecated since version 2.7 and will be removed in 3.0.', E_USER_DEPRECATED);
|
||||
trigger_error('Passing a class to '.__CLASS__.'::__construct() is deprecated since version 2.7 and will be removed in 3.0.', E_USER_DEPRECATED);
|
||||
@trigger_error('Passing an EntityManager to '.__CLASS__.'::__construct() is deprecated since version 2.7 and will be removed in 3.0.', E_USER_DEPRECATED);
|
||||
@trigger_error('Passing a class to '.__CLASS__.'::__construct() is deprecated since version 2.7 and will be removed in 3.0.', E_USER_DEPRECATED);
|
||||
|
||||
$queryBuilder = $queryBuilder($manager->getRepository($class));
|
||||
|
||||
|
@ -248,7 +248,7 @@ abstract class DoctrineType extends AbstractType
|
||||
// deprecation note
|
||||
$propertyNormalizer = function (Options $options, $propertyName) {
|
||||
if ($propertyName) {
|
||||
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);
|
||||
@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);
|
||||
}
|
||||
|
||||
return $propertyName;
|
||||
@ -267,7 +267,7 @@ abstract class DoctrineType extends AbstractType
|
||||
// deprecation note
|
||||
$loaderNormalizer = function (Options $options, $loader) {
|
||||
if ($loader) {
|
||||
trigger_error('The "loader" option is deprecated since version 2.7 and will be removed in 3.0. Override getLoader() instead.', E_USER_DEPRECATED);
|
||||
@trigger_error('The "loader" option is deprecated since version 2.7 and will be removed in 3.0. Override getLoader() instead.', E_USER_DEPRECATED);
|
||||
}
|
||||
|
||||
return $loader;
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
namespace Symfony\Bridge\Doctrine\Tests;
|
||||
|
||||
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);
|
||||
@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);
|
||||
|
||||
use Doctrine\ORM\EntityManager;
|
||||
use Symfony\Bridge\Doctrine\Test\DoctrineTestHelper;
|
||||
|
@ -134,7 +134,7 @@ class EntityTypeTest extends TypeTestCase
|
||||
'choice_label' => 'name',
|
||||
));
|
||||
|
||||
$this->assertEquals(array(1 => new ChoiceView('Foo', '1', $entity1), 2 => new ChoiceView('Bar', '2', $entity2)), $field->createView()->vars['choices']);
|
||||
$this->assertEquals(array(1 => new ChoiceView($entity1, '1', 'Foo'), 2 => new ChoiceView($entity2, '2', 'Bar')), $field->createView()->vars['choices']);
|
||||
}
|
||||
|
||||
public function testSetDataToUninitializedEntityWithNonRequiredToString()
|
||||
@ -150,7 +150,7 @@ class EntityTypeTest extends TypeTestCase
|
||||
'required' => false,
|
||||
));
|
||||
|
||||
$this->assertEquals(array(1 => new ChoiceView('Foo', '1', $entity1), 2 => new ChoiceView('Bar', '2', $entity2)), $field->createView()->vars['choices']);
|
||||
$this->assertEquals(array(1 => new ChoiceView($entity1, '1', 'Foo'), 2 => new ChoiceView($entity2, '2', 'Bar')), $field->createView()->vars['choices']);
|
||||
}
|
||||
|
||||
public function testSetDataToUninitializedEntityWithNonRequiredQueryBuilder()
|
||||
@ -169,7 +169,7 @@ class EntityTypeTest extends TypeTestCase
|
||||
'query_builder' => $qb,
|
||||
));
|
||||
|
||||
$this->assertEquals(array(1 => new ChoiceView('Foo', '1', $entity1), 2 => new ChoiceView('Bar', '2', $entity2)), $field->createView()->vars['choices']);
|
||||
$this->assertEquals(array(1 => new ChoiceView($entity1, '1', 'Foo'), 2 => new ChoiceView($entity2, '2', 'Bar')), $field->createView()->vars['choices']);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -513,7 +513,7 @@ class EntityTypeTest extends TypeTestCase
|
||||
|
||||
$field->submit('2');
|
||||
|
||||
$this->assertEquals(array(1 => new ChoiceView('Foo', '1', $entity1), 2 => new ChoiceView('Bar', '2', $entity2)), $field->createView()->vars['choices']);
|
||||
$this->assertEquals(array(1 => new ChoiceView($entity1, '1', 'Foo'), 2 => new ChoiceView($entity2, '2', 'Bar')), $field->createView()->vars['choices']);
|
||||
$this->assertTrue($field->isSynchronized());
|
||||
$this->assertSame($entity2, $field->getData());
|
||||
$this->assertSame('2', $field->getViewData());
|
||||
@ -541,13 +541,13 @@ class EntityTypeTest extends TypeTestCase
|
||||
$this->assertSame('2', $field->getViewData());
|
||||
$this->assertEquals(array(
|
||||
'Group1' => new ChoiceGroupView('Group1', array(
|
||||
1 => new ChoiceView('Foo', '1', $item1),
|
||||
2 => new ChoiceView('Bar', '2', $item2),
|
||||
1 => new ChoiceView($item1, '1', 'Foo'),
|
||||
2 => new ChoiceView($item2, '2', 'Bar'),
|
||||
)),
|
||||
'Group2' => new ChoiceGroupView('Group2', array(
|
||||
3 => new ChoiceView('Baz', '3', $item3),
|
||||
3 => new ChoiceView($item3, '3', 'Baz'),
|
||||
)),
|
||||
4 => new ChoiceView('Boo!', '4', $item4),
|
||||
4 => new ChoiceView($item4, '4', 'Boo!'),
|
||||
), $field->createView()->vars['choices']);
|
||||
}
|
||||
|
||||
@ -566,8 +566,8 @@ class EntityTypeTest extends TypeTestCase
|
||||
'choice_label' => 'name',
|
||||
));
|
||||
|
||||
$this->assertEquals(array(3 => new ChoiceView('Baz', '3', $entity3), 2 => new ChoiceView('Bar', '2', $entity2)), $field->createView()->vars['preferred_choices']);
|
||||
$this->assertEquals(array(1 => new ChoiceView('Foo', '1', $entity1)), $field->createView()->vars['choices']);
|
||||
$this->assertEquals(array(3 => new ChoiceView($entity3, '3', 'Baz'), 2 => new ChoiceView($entity2, '2', 'Bar')), $field->createView()->vars['preferred_choices']);
|
||||
$this->assertEquals(array(1 => new ChoiceView($entity1, '1', 'Foo')), $field->createView()->vars['choices']);
|
||||
}
|
||||
|
||||
public function testOverrideChoicesWithPreferredChoices()
|
||||
@ -586,8 +586,8 @@ class EntityTypeTest extends TypeTestCase
|
||||
'choice_label' => 'name',
|
||||
));
|
||||
|
||||
$this->assertEquals(array(3 => new ChoiceView('Baz', '3', $entity3)), $field->createView()->vars['preferred_choices']);
|
||||
$this->assertEquals(array(2 => new ChoiceView('Bar', '2', $entity2)), $field->createView()->vars['choices']);
|
||||
$this->assertEquals(array(3 => new ChoiceView($entity3, '3', 'Baz')), $field->createView()->vars['preferred_choices']);
|
||||
$this->assertEquals(array(2 => new ChoiceView($entity2, '2', 'Bar')), $field->createView()->vars['choices']);
|
||||
}
|
||||
|
||||
public function testDisallowChoicesThatAreNotIncludedChoicesSingleIdentifier()
|
||||
@ -883,7 +883,7 @@ class EntityTypeTest extends TypeTestCase
|
||||
'property' => 'name',
|
||||
));
|
||||
|
||||
$this->assertEquals(array(1 => new ChoiceView('Foo', '1', $entity1), 2 => new ChoiceView('Bar', '2', $entity2)), $field->createView()->vars['choices']);
|
||||
$this->assertEquals(array(1 => new ChoiceView($entity1, '1', 'Foo'), 2 => new ChoiceView($entity2, '2', 'Bar')), $field->createView()->vars['choices']);
|
||||
}
|
||||
|
||||
protected function createRegistryMock($name, $em)
|
||||
|
@ -23,7 +23,7 @@
|
||||
"symfony/phpunit-bridge": "~2.7|~3.0.0",
|
||||
"symfony/stopwatch": "~2.2|~3.0.0",
|
||||
"symfony/dependency-injection": "~2.2|~3.0.0",
|
||||
"symfony/form": "~2.7|~3.0.0",
|
||||
"symfony/form": "~2.7,>=2.7.1|~3.0.0",
|
||||
"symfony/http-kernel": "~2.2|~3.0.0",
|
||||
"symfony/property-access": "~2.3|~3.0.0",
|
||||
"symfony/security": "~2.2|~3.0.0",
|
||||
|
@ -27,7 +27,7 @@ class Logger extends BaseLogger implements LoggerInterface, DebugLoggerInterface
|
||||
*/
|
||||
public function emerg($message, array $context = array())
|
||||
{
|
||||
trigger_error('The '.__METHOD__.' method inherited from the Symfony\Component\HttpKernel\Log\LoggerInterface interface is deprecated since version 2.2 and will be removed in 3.0. Use the emergency() method instead, which is PSR-3 compatible.', E_USER_DEPRECATED);
|
||||
@trigger_error('The '.__METHOD__.' method inherited from the Symfony\Component\HttpKernel\Log\LoggerInterface interface is deprecated since version 2.2 and will be removed in 3.0. Use the emergency() method instead, which is PSR-3 compatible.', E_USER_DEPRECATED);
|
||||
|
||||
return parent::addRecord(BaseLogger::EMERGENCY, $message, $context);
|
||||
}
|
||||
@ -37,7 +37,7 @@ class Logger extends BaseLogger implements LoggerInterface, DebugLoggerInterface
|
||||
*/
|
||||
public function crit($message, array $context = array())
|
||||
{
|
||||
trigger_error('The '.__METHOD__.' method inherited from the Symfony\Component\HttpKernel\Log\LoggerInterface interface is deprecated since version 2.2 and will be removed in 3.0. Use the method critical() method instead, which is PSR-3 compatible.', E_USER_DEPRECATED);
|
||||
@trigger_error('The '.__METHOD__.' method inherited from the Symfony\Component\HttpKernel\Log\LoggerInterface interface is deprecated since version 2.2 and will be removed in 3.0. Use the method critical() method instead, which is PSR-3 compatible.', E_USER_DEPRECATED);
|
||||
|
||||
return parent::addRecord(BaseLogger::CRITICAL, $message, $context);
|
||||
}
|
||||
@ -47,7 +47,7 @@ class Logger extends BaseLogger implements LoggerInterface, DebugLoggerInterface
|
||||
*/
|
||||
public function err($message, array $context = array())
|
||||
{
|
||||
trigger_error('The '.__METHOD__.' method inherited from the Symfony\Component\HttpKernel\Log\LoggerInterface interface is deprecated since version 2.2 and will be removed in 3.0. Use the error() method instead, which is PSR-3 compatible.', E_USER_DEPRECATED);
|
||||
@trigger_error('The '.__METHOD__.' method inherited from the Symfony\Component\HttpKernel\Log\LoggerInterface interface is deprecated since version 2.2 and will be removed in 3.0. Use the error() method instead, which is PSR-3 compatible.', E_USER_DEPRECATED);
|
||||
|
||||
return parent::addRecord(BaseLogger::ERROR, $message, $context);
|
||||
}
|
||||
@ -57,7 +57,7 @@ class Logger extends BaseLogger implements LoggerInterface, DebugLoggerInterface
|
||||
*/
|
||||
public function warn($message, array $context = array())
|
||||
{
|
||||
trigger_error('The '.__METHOD__.' method inherited from the Symfony\Component\HttpKernel\Log\LoggerInterface interface is deprecated since version 2.2 and will be removed in 3.0. Use the warning() method instead, which is PSR-3 compatible.', E_USER_DEPRECATED);
|
||||
@trigger_error('The '.__METHOD__.' method inherited from the Symfony\Component\HttpKernel\Log\LoggerInterface interface is deprecated since version 2.2 and will be removed in 3.0. Use the warning() method instead, which is PSR-3 compatible.', E_USER_DEPRECATED);
|
||||
|
||||
return parent::addRecord(BaseLogger::WARNING, $message, $context);
|
||||
}
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
namespace Symfony\Bridge\Swiftmailer\DataCollector;
|
||||
|
||||
trigger_error(__CLASS__.' class is deprecated since version 2.4 and will be removed in 3.0. Use the Symfony\Bundle\SwiftmailerBundle\DataCollector\MessageDataCollector class from SwiftmailerBundle instead. Require symfony/swiftmailer-bundle package to download SwiftmailerBundle with Composer.', E_USER_DEPRECATED);
|
||||
@trigger_error(__CLASS__.' class is deprecated since version 2.4 and will be removed in 3.0. Use the Symfony\Bundle\SwiftmailerBundle\DataCollector\MessageDataCollector class from SwiftmailerBundle instead. Require symfony/swiftmailer-bundle package to download SwiftmailerBundle with Composer.', E_USER_DEPRECATED);
|
||||
|
||||
use Symfony\Component\HttpKernel\DataCollector\DataCollector;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
|
@ -68,7 +68,7 @@ class AppVariable
|
||||
*/
|
||||
public function getSecurity()
|
||||
{
|
||||
trigger_error('The "app.security" variable is deprecated since version 2.6 and will be removed in 3.0.', E_USER_DEPRECATED);
|
||||
@trigger_error('The "app.security" variable is deprecated since version 2.6 and will be removed in 3.0.', E_USER_DEPRECATED);
|
||||
|
||||
if (null === $this->container) {
|
||||
throw new \RuntimeException('The "app.security" variable is not available.');
|
||||
|
@ -61,9 +61,9 @@ class AssetExtension extends \Twig_Extension
|
||||
{
|
||||
// BC layer to be removed in 3.0
|
||||
if (2 < $count = func_num_args()) {
|
||||
trigger_error('Generating absolute URLs with the Twig asset() function was deprecated in 2.7 and will be removed in 3.0. Please use absolute_url() instead.', E_USER_DEPRECATED);
|
||||
@trigger_error('Generating absolute URLs with the Twig asset() function was deprecated in 2.7 and will be removed in 3.0. Please use absolute_url() instead.', E_USER_DEPRECATED);
|
||||
if (4 === $count) {
|
||||
trigger_error('Forcing a version with the Twig asset() function was deprecated in 2.7 and will be removed in 3.0.', E_USER_DEPRECATED);
|
||||
@trigger_error('Forcing a version with the Twig asset() function was deprecated in 2.7 and will be removed in 3.0.', E_USER_DEPRECATED);
|
||||
}
|
||||
|
||||
$args = func_get_args();
|
||||
@ -89,7 +89,7 @@ class AssetExtension extends \Twig_Extension
|
||||
|
||||
public function getAssetsVersion($packageName = null)
|
||||
{
|
||||
trigger_error('The Twig assets_version() function was deprecated in 2.7 and will be removed in 3.0. Please use asset_version() instead.', E_USER_DEPRECATED);
|
||||
@trigger_error('The Twig assets_version() function was deprecated in 2.7 and will be removed in 3.0. Please use asset_version() instead.', E_USER_DEPRECATED);
|
||||
|
||||
return $this->packages->getVersion('/', $packageName);
|
||||
}
|
||||
|
@ -136,7 +136,7 @@ class FormExtensionDivLayoutTest extends AbstractDivLayoutTest
|
||||
*/
|
||||
public function testIsChoiceSelected($expected, $choice, $value)
|
||||
{
|
||||
$choice = new ChoiceView($choice.' label', $choice, $choice);
|
||||
$choice = new ChoiceView($choice, $choice, $choice.' label');
|
||||
|
||||
$this->assertSame($expected, $this->extension->isSelectedChoice($choice, $value));
|
||||
}
|
||||
|
@ -72,8 +72,8 @@ class TwigExtractorTest extends \PHPUnit_Framework_TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException \Twig_Error
|
||||
* @expectedExceptionMessage Unclosed "block" in "extractor/syntax_error.twig" at line 1
|
||||
* @expectedException \Twig_Error
|
||||
* @expectedExceptionMessageRegExp /Unclosed "block" in "extractor(\/|\\)syntax_error\.twig" at line 1/
|
||||
*/
|
||||
public function testExtractSyntaxError()
|
||||
{
|
||||
|
@ -120,6 +120,7 @@ class Controller extends ContainerAware
|
||||
* @param mixed $object The object
|
||||
*
|
||||
* @throws \LogicException
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
protected function isGranted($attributes, $object = null)
|
||||
@ -273,7 +274,7 @@ class Controller extends ContainerAware
|
||||
*/
|
||||
public function getRequest()
|
||||
{
|
||||
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);
|
||||
@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);
|
||||
|
||||
return $this->container->get('request_stack')->getCurrentRequest();
|
||||
}
|
||||
@ -343,7 +344,7 @@ class Controller extends ContainerAware
|
||||
public function get($id)
|
||||
{
|
||||
if ('request' === $id) {
|
||||
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);
|
||||
@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);
|
||||
}
|
||||
|
||||
return $this->container->get($id);
|
||||
@ -362,7 +363,7 @@ class Controller extends ContainerAware
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks the validity of a CSRF token
|
||||
* Checks the validity of a CSRF token.
|
||||
*
|
||||
* @param string $id The id used when generating the token
|
||||
* @param string $token The actual token sent with the request that should be validated
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
namespace Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler;
|
||||
|
||||
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);
|
||||
@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);
|
||||
|
||||
use Symfony\Component\DependencyInjection\Reference;
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
|
@ -16,7 +16,7 @@ use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
use Symfony\Component\DependencyInjection\Definition;
|
||||
use Symfony\Component\DependencyInjection\Reference;
|
||||
|
||||
trigger_error('The '.__NAMESPACE__.'\TemplatingAssetHelperPass class is deprecated since version 2.7 and will be removed in 3.0.', E_USER_DEPRECATED);
|
||||
@trigger_error('The '.__NAMESPACE__.'\TemplatingAssetHelperPass class is deprecated since version 2.7 and will be removed in 3.0.', E_USER_DEPRECATED);
|
||||
|
||||
/**
|
||||
* @deprecated since 2.7, will be removed in 3.0
|
||||
|
@ -48,7 +48,7 @@ class Configuration implements ConfigurationInterface
|
||||
->beforeNormalization()
|
||||
->ifTrue(function ($v) { return isset($v['csrf_protection']['field_name']); })
|
||||
->then(function ($v) {
|
||||
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);
|
||||
@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);
|
||||
|
||||
return $v;
|
||||
})
|
||||
@ -82,7 +82,7 @@ class Configuration implements ConfigurationInterface
|
||||
|| count($v['templating']['assets_base_urls']['ssl'])
|
||||
|| count($v['templating']['packages'])
|
||||
) {
|
||||
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);
|
||||
@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);
|
||||
|
||||
// convert the old configuration to the new one
|
||||
if (isset($v['assets'])) {
|
||||
@ -115,7 +115,7 @@ class Configuration implements ConfigurationInterface
|
||||
->beforeNormalization()
|
||||
->ifTrue(function ($v) { return isset($v['validation']['api']); })
|
||||
->then(function ($v) {
|
||||
trigger_error('The validation.api configuration key is deprecated since version 2.7 and will be removed in 3.0', E_USER_DEPRECATED);
|
||||
@trigger_error('The validation.api configuration key is deprecated since version 2.7 and will be removed in 3.0', E_USER_DEPRECATED);
|
||||
|
||||
return $v;
|
||||
})
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
namespace Symfony\Bundle\FrameworkBundle\Fragment;
|
||||
|
||||
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);
|
||||
@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);
|
||||
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
|
@ -76,7 +76,7 @@ abstract class HttpCache extends BaseHttpCache
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates new ESI instance
|
||||
* Creates new ESI instance.
|
||||
*
|
||||
* @return Esi
|
||||
*
|
||||
@ -84,7 +84,7 @@ abstract class HttpCache extends BaseHttpCache
|
||||
*/
|
||||
protected function createEsi()
|
||||
{
|
||||
trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use createSurrogate() instead.', E_USER_DEPRECATED);
|
||||
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use createSurrogate() instead.', E_USER_DEPRECATED);
|
||||
|
||||
return $this->createSurrogate();
|
||||
}
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
namespace Symfony\Bundle\FrameworkBundle\Templating\Asset;
|
||||
|
||||
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);
|
||||
@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);
|
||||
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
|
@ -14,7 +14,7 @@ namespace Symfony\Bundle\FrameworkBundle\Templating\Asset;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\Templating\Asset\PathPackage as BasePathPackage;
|
||||
|
||||
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);
|
||||
@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);
|
||||
|
||||
/**
|
||||
* The path packages adds a version and a base path to asset URLs.
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
namespace Symfony\Bundle\FrameworkBundle\Templating;
|
||||
|
||||
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);
|
||||
@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);
|
||||
|
||||
use Symfony\Component\Templating\DebuggerInterface;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
@ -43,7 +43,7 @@ class GlobalVariables
|
||||
*/
|
||||
public function getSecurity()
|
||||
{
|
||||
trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0.', E_USER_DEPRECATED);
|
||||
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0.', E_USER_DEPRECATED);
|
||||
|
||||
if ($this->container->has('security.context')) {
|
||||
return $this->container->get('security.context');
|
||||
|
@ -44,7 +44,7 @@ class AssetsHelper extends Helper
|
||||
{
|
||||
// BC layer to be removed in 3.0
|
||||
if (3 === $count = func_num_args()) {
|
||||
trigger_error('Forcing a version for an asset was deprecated in 2.7 and will be removed in 3.0.', E_USER_DEPRECATED);
|
||||
@trigger_error('Forcing a version for an asset was deprecated in 2.7 and will be removed in 3.0.', E_USER_DEPRECATED);
|
||||
|
||||
$args = func_get_args();
|
||||
|
||||
@ -66,7 +66,7 @@ class AssetsHelper extends Helper
|
||||
{
|
||||
// no arguments means old getVersion() for default package
|
||||
if (null === $path) {
|
||||
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);
|
||||
@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);
|
||||
|
||||
return $this->packages->getVersion('/', $packageName);
|
||||
}
|
||||
@ -85,7 +85,7 @@ class AssetsHelper extends Helper
|
||||
}
|
||||
|
||||
// path is a packageName, old version
|
||||
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);
|
||||
@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);
|
||||
|
||||
return $this->packages->getVersion('/', $path);
|
||||
}
|
||||
|
@ -136,7 +136,7 @@ class FormHelper extends Helper
|
||||
*/
|
||||
public function enctype(FormView $view)
|
||||
{
|
||||
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);
|
||||
@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);
|
||||
|
||||
return $this->renderer->searchAndRenderBlock($view, 'enctype');
|
||||
}
|
||||
|
@ -35,7 +35,7 @@ class RequestHelper extends Helper
|
||||
public function __construct($requestStack)
|
||||
{
|
||||
if ($requestStack instanceof Request) {
|
||||
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);
|
||||
@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);
|
||||
$this->request = $requestStack;
|
||||
} elseif ($requestStack instanceof RequestStack) {
|
||||
$this->requestStack = $requestStack;
|
||||
|
@ -35,7 +35,7 @@ class SessionHelper extends Helper
|
||||
public function __construct($requestStack)
|
||||
{
|
||||
if ($requestStack instanceof Request) {
|
||||
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);
|
||||
@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);
|
||||
$this->session = $requestStack->getSession();
|
||||
} elseif ($requestStack instanceof RequestStack) {
|
||||
$this->requestStack = $requestStack;
|
||||
|
@ -22,7 +22,7 @@ class RouterDebugCommandTest extends \PHPUnit_Framework_TestCase
|
||||
public function testDebugAllRoutes()
|
||||
{
|
||||
$tester = $this->createCommandTester();
|
||||
$ret = $tester->execute(array('name' => null));
|
||||
$ret = $tester->execute(array('name' => null), array('decorated' => false));
|
||||
|
||||
$this->assertEquals(0, $ret, 'Returns 0 in case of success');
|
||||
$this->assertContains('[router] Current routes', $tester->getDisplay());
|
||||
@ -31,7 +31,7 @@ class RouterDebugCommandTest extends \PHPUnit_Framework_TestCase
|
||||
public function testDebugSingleRoute()
|
||||
{
|
||||
$tester = $this->createCommandTester();
|
||||
$ret = $tester->execute(array('name' => 'foo'));
|
||||
$ret = $tester->execute(array('name' => 'foo'), array('decorated' => false));
|
||||
|
||||
$this->assertEquals(0, $ret, 'Returns 0 in case of success');
|
||||
$this->assertContains('[router] Route "foo"', $tester->getDisplay());
|
||||
|
@ -24,7 +24,7 @@ class RouterMatchCommandTest extends \PHPUnit_Framework_TestCase
|
||||
public function testWithMatchPath()
|
||||
{
|
||||
$tester = $this->createCommandTester();
|
||||
$ret = $tester->execute(array('path_info' => '/foo', 'foo'));
|
||||
$ret = $tester->execute(array('path_info' => '/foo', 'foo'), array('decorated' => false));
|
||||
|
||||
$this->assertEquals(0, $ret, 'Returns 0 in case of success');
|
||||
$this->assertContains('[router] Route "foo"', $tester->getDisplay());
|
||||
@ -33,7 +33,7 @@ class RouterMatchCommandTest extends \PHPUnit_Framework_TestCase
|
||||
public function testWithNotMatchPath()
|
||||
{
|
||||
$tester = $this->createCommandTester();
|
||||
$ret = $tester->execute(array('path_info' => '/test', 'foo'));
|
||||
$ret = $tester->execute(array('path_info' => '/test', 'foo'), array('decorated' => false));
|
||||
|
||||
$this->assertEquals(1, $ret, 'Returns 1 in case of failure');
|
||||
$this->assertContains('None of the routes match the path "/test"', $tester->getDisplay());
|
||||
|
@ -39,7 +39,7 @@ class LogoutUrlHelper extends Helper
|
||||
public function __construct($generator, UrlGeneratorInterface $router = null, TokenStorageInterface $tokenStorage = null)
|
||||
{
|
||||
if ($generator instanceof ContainerInterface) {
|
||||
trigger_error('The '.__CLASS__.' constructor will require a LogoutUrlGenerator instead of a ContainerInterface instance in 3.0.', E_USER_DEPRECATED);
|
||||
@trigger_error('The '.__CLASS__.' constructor will require a LogoutUrlGenerator instead of a ContainerInterface instance in 3.0.', E_USER_DEPRECATED);
|
||||
|
||||
if ($generator->has('security.logout_url_generator')) {
|
||||
$this->generator = $generator->get('security.logout_url_generator');
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
namespace Symfony\Bundle\SecurityBundle\Twig\Extension;
|
||||
|
||||
trigger_error('The '.__NAMESPACE__.'\LogoutUrlExtension class is deprecated since version 2.7 and will be removed in 3.0. Use Symfony\Bridge\Twig\Extension\LogoutUrlExtension instead.', E_USER_DEPRECATED);
|
||||
@trigger_error('The '.__NAMESPACE__.'\LogoutUrlExtension class is deprecated since version 2.7 and will be removed in 3.0. Use Symfony\Bridge\Twig\Extension\LogoutUrlExtension instead.', E_USER_DEPRECATED);
|
||||
|
||||
use Symfony\Bundle\SecurityBundle\Templating\Helper\LogoutUrlHelper;
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
namespace Symfony\Bundle\TwigBundle\Debug;
|
||||
|
||||
trigger_error('The '.__NAMESPACE__.'\TimedTwigEngine class is deprecated since version 2.7 and will be removed in 3.0. Use the Twig native profiler instead.', E_USER_DEPRECATED);
|
||||
@trigger_error('The '.__NAMESPACE__.'\TimedTwigEngine class is deprecated since version 2.7 and will be removed in 3.0. Use the Twig native profiler instead.', E_USER_DEPRECATED);
|
||||
|
||||
use Symfony\Bundle\TwigBundle\TwigEngine;
|
||||
use Symfony\Component\Templating\TemplateNameParserInterface;
|
||||
|
@ -55,7 +55,7 @@ class Configuration implements ConfigurationInterface
|
||||
->beforeNormalization()
|
||||
->ifTrue(function ($v) { return isset($v['form']['resources']); })
|
||||
->then(function ($v) {
|
||||
trigger_error('The twig.form.resources configuration key is deprecated since version 2.6 and will be removed in 3.0. Use the twig.form_themes configuration key instead.', E_USER_DEPRECATED);
|
||||
@trigger_error('The twig.form.resources configuration key is deprecated since version 2.6 and will be removed in 3.0. Use the twig.form_themes configuration key instead.', E_USER_DEPRECATED);
|
||||
|
||||
return $v;
|
||||
})
|
||||
|
@ -36,7 +36,7 @@ class ActionsExtension extends \Twig_Extension
|
||||
if ($handler instanceof FragmentHandler) {
|
||||
$this->handler = $handler;
|
||||
} elseif ($handler instanceof ContainerInterface) {
|
||||
trigger_error('The ability to pass a ContainerInterface instance as a first argument to '.__METHOD__.' method is deprecated since version 2.7 and will be removed in 3.0. Pass a FragmentHandler instance instead.', E_USER_DEPRECATED);
|
||||
@trigger_error('The ability to pass a ContainerInterface instance as a first argument to '.__METHOD__.' method is deprecated since version 2.7 and will be removed in 3.0. Pass a FragmentHandler instance instead.', E_USER_DEPRECATED);
|
||||
|
||||
$this->handler = $handler->get('fragment.handler');
|
||||
} else {
|
||||
@ -56,7 +56,7 @@ class ActionsExtension extends \Twig_Extension
|
||||
*/
|
||||
public function renderUri($uri, array $options = array())
|
||||
{
|
||||
trigger_error('The Twig render tag was deprecated in version 2.2 and will be removed in version 3.0. Use the Twig render function instead.', E_USER_DEPRECATED);
|
||||
@trigger_error('The Twig render tag was deprecated in version 2.2 and will be removed in version 3.0. Use the Twig render function instead.', E_USER_DEPRECATED);
|
||||
|
||||
$strategy = isset($options['strategy']) ? $options['strategy'] : 'inline';
|
||||
unset($options['strategy']);
|
||||
|
@ -14,7 +14,7 @@ namespace Symfony\Bundle\TwigBundle\Extension;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Symfony\Component\Routing\RequestContext;
|
||||
|
||||
trigger_error('The '.__NAMESPACE__.'\AssetsExtension class is deprecated since version 2.7 and will be removed in 3.0. Use the Symfony\Bridge\Twig\Extension\AssetExtension class instead.', E_USER_DEPRECATED);
|
||||
@trigger_error('The '.__NAMESPACE__.'\AssetsExtension class is deprecated since version 2.7 and will be removed in 3.0. Use the Symfony\Bridge\Twig\Extension\AssetExtension class instead.', E_USER_DEPRECATED);
|
||||
|
||||
/**
|
||||
* Twig extension for Symfony assets helper.
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
namespace Symfony\Bundle\TwigBundle;
|
||||
|
||||
trigger_error('The '.__NAMESPACE__.'\TwigDefaultEscapingStrategy class is deprecated in version 2.7 and will be removed in version 3.0. Use the "filename" auto-escaping strategy instead.', E_USER_DEPRECATED);
|
||||
@trigger_error('The '.__NAMESPACE__.'\TwigDefaultEscapingStrategy class is deprecated in version 2.7 and will be removed in version 3.0. Use the "filename" auto-escaping strategy instead.', E_USER_DEPRECATED);
|
||||
|
||||
/**
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
|
@ -47,7 +47,7 @@ class TwigEngine extends BaseEngine implements EngineInterface
|
||||
*/
|
||||
public function setDefaultEscapingStrategy($strategy)
|
||||
{
|
||||
trigger_error('The '.__METHOD__.' method is deprecated since version 2.7 and will be removed in 3.0. Inject the escaping strategy in the Twig_Environment object instead.', E_USER_DEPRECATED);
|
||||
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.7 and will be removed in 3.0. Inject the escaping strategy in the Twig_Environment object instead.', E_USER_DEPRECATED);
|
||||
|
||||
$this->environment->getExtension('escaper')->setDefaultStrategy($strategy);
|
||||
}
|
||||
@ -58,7 +58,7 @@ class TwigEngine extends BaseEngine implements EngineInterface
|
||||
*/
|
||||
public function guessDefaultEscapingStrategy($filename)
|
||||
{
|
||||
trigger_error('The '.__METHOD__.' method is deprecated since version 2.7 and will be removed in 3.0. Use the Twig_FileExtensionEscapingStrategy::guess method instead.', E_USER_DEPRECATED);
|
||||
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.7 and will be removed in 3.0. Use the Twig_FileExtensionEscapingStrategy::guess method instead.', E_USER_DEPRECATED);
|
||||
|
||||
return \Twig_FileExtensionEscapingStrategy::guess($filename);
|
||||
}
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
namespace Symfony\Component\ClassLoader;
|
||||
|
||||
trigger_error('The '.__NAMESPACE__.'\ApcUniversalClassLoader class is deprecated since version 2.7 and will be removed in 3.0. Use the Symfony\Component\ClassLoader\ApcClassLoader class instead.', E_USER_DEPRECATED);
|
||||
@trigger_error('The '.__NAMESPACE__.'\ApcUniversalClassLoader class is deprecated since version 2.7 and will be removed in 3.0. Use the Symfony\Component\ClassLoader\ApcClassLoader class instead.', E_USER_DEPRECATED);
|
||||
|
||||
/**
|
||||
* ApcUniversalClassLoader implements a "universal" autoloader cached in APC for PHP 5.3.
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
namespace Symfony\Component\ClassLoader;
|
||||
|
||||
trigger_error('The '.__NAMESPACE__.'\DebugClassLoader class is deprecated since version 2.4 and will be removed in 3.0. Use the Symfony\Component\Debug\DebugClassLoader class instead.', E_USER_DEPRECATED);
|
||||
@trigger_error('The '.__NAMESPACE__.'\DebugClassLoader class is deprecated since version 2.4 and will be removed in 3.0. Use the Symfony\Component\Debug\DebugClassLoader class instead.', E_USER_DEPRECATED);
|
||||
|
||||
/**
|
||||
* Autoloader checking if the class is really defined in the file found.
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
namespace Symfony\Component\ClassLoader;
|
||||
|
||||
trigger_error('The '.__NAMESPACE__.'\DebugUniversalClassLoader class is deprecated since version 2.4 and will be removed in 3.0. Use the Symfony\Component\Debug\DebugClassLoader class instead.', E_USER_DEPRECATED);
|
||||
@trigger_error('The '.__NAMESPACE__.'\DebugUniversalClassLoader class is deprecated since version 2.4 and will be removed in 3.0. Use the Symfony\Component\Debug\DebugClassLoader class instead.', E_USER_DEPRECATED);
|
||||
|
||||
/**
|
||||
* Checks that the class is actually declared in the included file.
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
namespace Symfony\Component\ClassLoader;
|
||||
|
||||
trigger_error('The '.__NAMESPACE__.'\UniversalClassLoader class is deprecated since version 2.7 and will be removed in 3.0. Use the Symfony\Component\ClassLoader\ClassLoader class instead.', E_USER_DEPRECATED);
|
||||
@trigger_error('The '.__NAMESPACE__.'\UniversalClassLoader class is deprecated since version 2.7 and will be removed in 3.0. Use the Symfony\Component\ClassLoader\ClassLoader class instead.', E_USER_DEPRECATED);
|
||||
|
||||
/**
|
||||
* UniversalClassLoader implements a "universal" autoloader for PHP 5.3.
|
||||
|
@ -46,7 +46,7 @@ class ConfigCache implements ConfigCacheInterface
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
trigger_error('ConfigCache::__toString() is deprecated since version 2.7 and will be removed in 3.0. Use the getPath() method instead.', E_USER_DEPRECATED);
|
||||
@trigger_error('ConfigCache::__toString() is deprecated since version 2.7 and will be removed in 3.0. Use the getPath() method instead.', E_USER_DEPRECATED);
|
||||
|
||||
return $this->file;
|
||||
}
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
namespace Symfony\Component\Config\Definition;
|
||||
|
||||
trigger_error('The '.__NAMESPACE__.'\ReferenceDumper class is deprecated since version 2.4 and will be removed in 3.0. Use the Symfony\Component\Config\Definition\Dumper\YamlReferenceDumper class instead.', E_USER_DEPRECATED);
|
||||
@trigger_error('The '.__NAMESPACE__.'\ReferenceDumper class is deprecated since version 2.4 and will be removed in 3.0. Use the Symfony\Component\Config\Definition\Dumper\YamlReferenceDumper class instead.', E_USER_DEPRECATED);
|
||||
|
||||
use Symfony\Component\Config\Definition\Dumper\YamlReferenceDumper;
|
||||
|
||||
|
@ -43,7 +43,7 @@ class ConfigCacheTest extends \PHPUnit_Framework_TestCase
|
||||
}
|
||||
}
|
||||
|
||||
public function testToString()
|
||||
public function testGetPath()
|
||||
{
|
||||
$cache = new ConfigCache($this->cacheFile, true);
|
||||
|
||||
|
@ -628,7 +628,7 @@ class Application
|
||||
*/
|
||||
public function asText($namespace = null, $raw = false)
|
||||
{
|
||||
trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0.', E_USER_DEPRECATED);
|
||||
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0.', E_USER_DEPRECATED);
|
||||
|
||||
$descriptor = new TextDescriptor();
|
||||
$output = new BufferedOutput(BufferedOutput::VERBOSITY_NORMAL, !$raw);
|
||||
@ -649,7 +649,7 @@ class Application
|
||||
*/
|
||||
public function asXml($namespace = null, $asDom = false)
|
||||
{
|
||||
trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0.', E_USER_DEPRECATED);
|
||||
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0.', E_USER_DEPRECATED);
|
||||
|
||||
$descriptor = new XmlDescriptor();
|
||||
|
||||
|
@ -652,7 +652,7 @@ class Command
|
||||
*/
|
||||
public function asText()
|
||||
{
|
||||
trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0.', E_USER_DEPRECATED);
|
||||
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0.', E_USER_DEPRECATED);
|
||||
|
||||
$descriptor = new TextDescriptor();
|
||||
$output = new BufferedOutput(BufferedOutput::VERBOSITY_NORMAL, true);
|
||||
@ -672,7 +672,7 @@ class Command
|
||||
*/
|
||||
public function asXml($asDom = false)
|
||||
{
|
||||
trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0.', E_USER_DEPRECATED);
|
||||
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0.', E_USER_DEPRECATED);
|
||||
|
||||
$descriptor = new XmlDescriptor();
|
||||
|
||||
|
@ -77,7 +77,7 @@ EOF
|
||||
}
|
||||
|
||||
if ($input->getOption('xml')) {
|
||||
trigger_error('The --xml option was deprecated in version 2.7 and will be removed in version 3.0. Use the --format option instead.', E_USER_DEPRECATED);
|
||||
@trigger_error('The --xml option was deprecated in version 2.7 and will be removed in version 3.0. Use the --format option instead.', E_USER_DEPRECATED);
|
||||
|
||||
$input->setOption('format', 'xml');
|
||||
}
|
||||
|
@ -69,7 +69,7 @@ EOF
|
||||
protected function execute(InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
if ($input->getOption('xml')) {
|
||||
trigger_error('The --xml option was deprecated in version 2.7 and will be removed in version 3.0. Use the --format option instead.', E_USER_DEPRECATED);
|
||||
@trigger_error('The --xml option was deprecated in version 2.7 and will be removed in version 3.0. Use the --format option instead.', E_USER_DEPRECATED);
|
||||
|
||||
$input->setOption('format', 'xml');
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ class DialogHelper extends InputAwareHelper
|
||||
public function __construct($triggerDeprecationError = true)
|
||||
{
|
||||
if ($triggerDeprecationError) {
|
||||
trigger_error('"Symfony\Component\Console\Helper\DialogHelper" is deprecated since version 2.5 and will be removed in 3.0. Use "Symfony\Component\Console\Helper\QuestionHelper" instead.', E_USER_DEPRECATED);
|
||||
@trigger_error('"Symfony\Component\Console\Helper\DialogHelper" is deprecated since version 2.5 and will be removed in 3.0. Use "Symfony\Component\Console\Helper\QuestionHelper" instead.', E_USER_DEPRECATED);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -79,11 +79,11 @@ class HelperSet implements \IteratorAggregate
|
||||
}
|
||||
|
||||
if ('dialog' === $name && $this->helpers[$name] instanceof DialogHelper) {
|
||||
trigger_error('"Symfony\Component\Console\Helper\DialogHelper" is deprecated since version 2.5 and will be removed in 3.0. Use "Symfony\Component\Console\Helper\QuestionHelper" instead.', E_USER_DEPRECATED);
|
||||
@trigger_error('"Symfony\Component\Console\Helper\DialogHelper" is deprecated since version 2.5 and will be removed in 3.0. Use "Symfony\Component\Console\Helper\QuestionHelper" instead.', E_USER_DEPRECATED);
|
||||
} elseif ('progress' === $name && $this->helpers[$name] instanceof ProgressHelper) {
|
||||
trigger_error('"Symfony\Component\Console\Helper\ProgressHelper" is deprecated since version 2.5 and will be removed in 3.0. Use "Symfony\Component\Console\Helper\ProgressBar" instead.', E_USER_DEPRECATED);
|
||||
@trigger_error('"Symfony\Component\Console\Helper\ProgressHelper" is deprecated since version 2.5 and will be removed in 3.0. Use "Symfony\Component\Console\Helper\ProgressBar" instead.', E_USER_DEPRECATED);
|
||||
} elseif ('table' === $name && $this->helpers[$name] instanceof TableHelper) {
|
||||
trigger_error('"Symfony\Component\Console\Helper\TableHelper" is deprecated since version 2.5 and will be removed in 3.0. Use "Symfony\Component\Console\Helper\Table" instead.', E_USER_DEPRECATED);
|
||||
@trigger_error('"Symfony\Component\Console\Helper\TableHelper" is deprecated since version 2.5 and will be removed in 3.0. Use "Symfony\Component\Console\Helper\Table" instead.', E_USER_DEPRECATED);
|
||||
}
|
||||
|
||||
return $this->helpers[$name];
|
||||
|
@ -177,7 +177,7 @@ class ProgressBar
|
||||
*/
|
||||
public function getStep()
|
||||
{
|
||||
trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the getProgress() method instead.', E_USER_DEPRECATED);
|
||||
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the getProgress() method instead.', E_USER_DEPRECATED);
|
||||
|
||||
return $this->getProgress();
|
||||
}
|
||||
@ -368,7 +368,7 @@ class ProgressBar
|
||||
*/
|
||||
public function setCurrent($step)
|
||||
{
|
||||
trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the setProgress() method instead.', E_USER_DEPRECATED);
|
||||
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the setProgress() method instead.', E_USER_DEPRECATED);
|
||||
|
||||
$this->setProgress($step);
|
||||
}
|
||||
|
@ -121,7 +121,7 @@ class ProgressHelper extends Helper
|
||||
public function __construct($triggerDeprecationError = true)
|
||||
{
|
||||
if ($triggerDeprecationError) {
|
||||
trigger_error('The '.__CLASS__.' class is deprecated since version 2.5 and will be removed in 3.0. Use the Symfony\Component\Console\Helper\ProgressBar class instead.', E_USER_DEPRECATED);
|
||||
@trigger_error('The '.__CLASS__.' class is deprecated since version 2.5 and will be removed in 3.0. Use the Symfony\Component\Console\Helper\ProgressBar class instead.', E_USER_DEPRECATED);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -37,7 +37,7 @@ class TableHelper extends Helper
|
||||
public function __construct($triggerDeprecationError = true)
|
||||
{
|
||||
if ($triggerDeprecationError) {
|
||||
trigger_error('The '.__CLASS__.' class is deprecated since version 2.5 and will be removed in 3.0. Use the Symfony\Component\Console\Helper\Table class instead.', E_USER_DEPRECATED);
|
||||
@trigger_error('The '.__CLASS__.' class is deprecated since version 2.5 and will be removed in 3.0. Use the Symfony\Component\Console\Helper\Table class instead.', E_USER_DEPRECATED);
|
||||
}
|
||||
|
||||
$this->table = new Table(new NullOutput());
|
||||
|
@ -449,7 +449,7 @@ class InputDefinition
|
||||
*/
|
||||
public function asText()
|
||||
{
|
||||
trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0.', E_USER_DEPRECATED);
|
||||
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0.', E_USER_DEPRECATED);
|
||||
|
||||
$descriptor = new TextDescriptor();
|
||||
$output = new BufferedOutput(BufferedOutput::VERBOSITY_NORMAL, true);
|
||||
@ -469,7 +469,7 @@ class InputDefinition
|
||||
*/
|
||||
public function asXml($asDom = false)
|
||||
{
|
||||
trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0.', E_USER_DEPRECATED);
|
||||
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0.', E_USER_DEPRECATED);
|
||||
|
||||
$descriptor = new XmlDescriptor();
|
||||
|
||||
|
@ -40,7 +40,7 @@ class StringInput extends ArgvInput
|
||||
public function __construct($input, InputDefinition $definition = null)
|
||||
{
|
||||
if ($definition) {
|
||||
trigger_error('The $definition argument of the '.__METHOD__.' method is deprecated and will be removed in 3.0. Set this parameter with the bind() method instead.', E_USER_DEPRECATED);
|
||||
@trigger_error('The $definition argument of the '.__METHOD__.' method is deprecated and will be removed in 3.0. Set this parameter with the bind() method instead.', E_USER_DEPRECATED);
|
||||
}
|
||||
|
||||
parent::__construct(array(), null);
|
||||
|
@ -45,7 +45,7 @@ class DebugClassLoader
|
||||
$this->wasFinder = is_object($classLoader) && method_exists($classLoader, 'findFile');
|
||||
|
||||
if ($this->wasFinder) {
|
||||
trigger_error('The '.__METHOD__.' method will no longer support receiving an object into its $classLoader argument in 3.0.', E_USER_DEPRECATED);
|
||||
@trigger_error('The '.__METHOD__.' method will no longer support receiving an object into its $classLoader argument in 3.0.', E_USER_DEPRECATED);
|
||||
$this->classLoader = array($classLoader, 'loadClass');
|
||||
$this->isFinder = true;
|
||||
} else {
|
||||
@ -127,7 +127,7 @@ class DebugClassLoader
|
||||
*/
|
||||
public function findFile($class)
|
||||
{
|
||||
trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED);
|
||||
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED);
|
||||
|
||||
if ($this->wasFinder) {
|
||||
return $this->classLoader[0]->findFile($class);
|
||||
@ -200,12 +200,12 @@ class DebugClassLoader
|
||||
|
||||
if (!$parent || strncmp($ns, $parent->name, $len)) {
|
||||
if ($parent && isset(self::$deprecated[$parent->name]) && strncmp($ns, $parent->name, $len)) {
|
||||
trigger_error(sprintf('The %s class extends %s that is deprecated %s', $name, $parent->name, self::$deprecated[$parent->name]), E_USER_DEPRECATED);
|
||||
@trigger_error(sprintf('The %s class extends %s that is deprecated %s', $name, $parent->name, self::$deprecated[$parent->name]), E_USER_DEPRECATED);
|
||||
}
|
||||
|
||||
foreach ($refl->getInterfaceNames() as $interface) {
|
||||
if (isset(self::$deprecated[$interface]) && strncmp($ns, $interface, $len) && !($parent && $parent->implementsInterface($interface))) {
|
||||
trigger_error(sprintf('The %s %s %s that is deprecated %s', $name, $refl->isInterface() ? 'interface extends' : 'class implements', $interface, self::$deprecated[$interface]), E_USER_DEPRECATED);
|
||||
@trigger_error(sprintf('The %s %s %s that is deprecated %s', $name, $refl->isInterface() ? 'interface extends' : 'class implements', $interface, self::$deprecated[$interface]), E_USER_DEPRECATED);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -611,7 +611,7 @@ class ErrorHandler
|
||||
*/
|
||||
public function setLevel($level)
|
||||
{
|
||||
trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the throwAt() method instead.', E_USER_DEPRECATED);
|
||||
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the throwAt() method instead.', E_USER_DEPRECATED);
|
||||
|
||||
$level = null === $level ? error_reporting() : $level;
|
||||
$this->throwAt($level, true);
|
||||
@ -626,7 +626,7 @@ class ErrorHandler
|
||||
*/
|
||||
public function setDisplayErrors($displayErrors)
|
||||
{
|
||||
trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the throwAt() method instead.', E_USER_DEPRECATED);
|
||||
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the throwAt() method instead.', E_USER_DEPRECATED);
|
||||
|
||||
if ($displayErrors) {
|
||||
$this->throwAt($this->displayErrors, true);
|
||||
@ -647,7 +647,7 @@ class ErrorHandler
|
||||
*/
|
||||
public static function setLogger(LoggerInterface $logger, $channel = 'deprecation')
|
||||
{
|
||||
trigger_error('The '.__METHOD__.' static method is deprecated since version 2.6 and will be removed in 3.0. Use the setLoggers() or setDefaultLogger() methods instead.', E_USER_DEPRECATED);
|
||||
@trigger_error('The '.__METHOD__.' static method is deprecated since version 2.6 and will be removed in 3.0. Use the setLoggers() or setDefaultLogger() methods instead.', E_USER_DEPRECATED);
|
||||
|
||||
$handler = set_error_handler('var_dump', 0);
|
||||
$handler = is_array($handler) ? $handler[0] : null;
|
||||
@ -684,7 +684,7 @@ class ErrorHandler
|
||||
*/
|
||||
public function handleFatal()
|
||||
{
|
||||
trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the handleFatalError() method instead.', E_USER_DEPRECATED);
|
||||
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the handleFatalError() method instead.', E_USER_DEPRECATED);
|
||||
|
||||
static::handleFatalError();
|
||||
}
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
namespace Symfony\Component\Debug\Exception;
|
||||
|
||||
trigger_error('The '.__NAMESPACE__.'\DummyException class is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED);
|
||||
@trigger_error('The '.__NAMESPACE__.'\DummyException class is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED);
|
||||
|
||||
/**
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
|
@ -428,7 +428,7 @@ EOF;
|
||||
*/
|
||||
protected static function utf8Htmlize($str)
|
||||
{
|
||||
trigger_error('The '.__METHOD__.' method is deprecated since version 2.7 and will be removed in 3.0.', E_USER_DEPRECATED);
|
||||
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.7 and will be removed in 3.0.', E_USER_DEPRECATED);
|
||||
|
||||
return htmlspecialchars($str, ENT_QUOTES | (PHP_VERSION_ID >= 50400 ? ENT_SUBSTITUTE : 0), 'UTF-8');
|
||||
}
|
||||
|
@ -1127,7 +1127,7 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
|
||||
private function synchronize($id)
|
||||
{
|
||||
if ('request' !== $id) {
|
||||
trigger_error('The '.__METHOD__.' method is deprecated in version 2.7 and will be removed in version 3.0.', E_USER_DEPRECATED);
|
||||
@trigger_error('The '.__METHOD__.' method is deprecated in version 2.7 and will be removed in version 3.0.', E_USER_DEPRECATED);
|
||||
}
|
||||
|
||||
foreach ($this->definitions as $definitionId => $definition) {
|
||||
|
@ -98,7 +98,7 @@ class Definition
|
||||
*/
|
||||
public function setFactoryClass($factoryClass)
|
||||
{
|
||||
trigger_error(sprintf('%s(%s) is deprecated since version 2.6 and will be removed in 3.0. Use Definition::setFactory() instead.', __METHOD__, $factoryClass), E_USER_DEPRECATED);
|
||||
@trigger_error(sprintf('%s(%s) is deprecated since version 2.6 and will be removed in 3.0. Use Definition::setFactory() instead.', __METHOD__, $factoryClass), E_USER_DEPRECATED);
|
||||
|
||||
$this->factoryClass = $factoryClass;
|
||||
|
||||
@ -116,7 +116,7 @@ class Definition
|
||||
public function getFactoryClass($triggerDeprecationError = true)
|
||||
{
|
||||
if ($triggerDeprecationError) {
|
||||
trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0.', E_USER_DEPRECATED);
|
||||
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0.', E_USER_DEPRECATED);
|
||||
}
|
||||
|
||||
return $this->factoryClass;
|
||||
@ -134,7 +134,7 @@ class Definition
|
||||
*/
|
||||
public function setFactoryMethod($factoryMethod)
|
||||
{
|
||||
trigger_error(sprintf('%s(%s) is deprecated since version 2.6 and will be removed in 3.0. Use Definition::setFactory() instead.', __METHOD__, $factoryMethod), E_USER_DEPRECATED);
|
||||
@trigger_error(sprintf('%s(%s) is deprecated since version 2.6 and will be removed in 3.0. Use Definition::setFactory() instead.', __METHOD__, $factoryMethod), E_USER_DEPRECATED);
|
||||
|
||||
$this->factoryMethod = $factoryMethod;
|
||||
|
||||
@ -187,7 +187,7 @@ class Definition
|
||||
public function getFactoryMethod($triggerDeprecationError = true)
|
||||
{
|
||||
if ($triggerDeprecationError) {
|
||||
trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0.', E_USER_DEPRECATED);
|
||||
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0.', E_USER_DEPRECATED);
|
||||
}
|
||||
|
||||
return $this->factoryMethod;
|
||||
@ -205,7 +205,7 @@ class Definition
|
||||
*/
|
||||
public function setFactoryService($factoryService)
|
||||
{
|
||||
trigger_error(sprintf('%s(%s) is deprecated since version 2.6 and will be removed in 3.0. Use Definition::setFactory() instead.', __METHOD__, $factoryService), E_USER_DEPRECATED);
|
||||
@trigger_error(sprintf('%s(%s) is deprecated since version 2.6 and will be removed in 3.0. Use Definition::setFactory() instead.', __METHOD__, $factoryService), E_USER_DEPRECATED);
|
||||
|
||||
$this->factoryService = $factoryService;
|
||||
|
||||
@ -223,7 +223,7 @@ class Definition
|
||||
public function getFactoryService($triggerDeprecationError = true)
|
||||
{
|
||||
if ($triggerDeprecationError) {
|
||||
trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0.', E_USER_DEPRECATED);
|
||||
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0.', E_USER_DEPRECATED);
|
||||
}
|
||||
|
||||
return $this->factoryService;
|
||||
@ -667,7 +667,7 @@ class Definition
|
||||
public function setSynchronized($boolean, $triggerDeprecationError = true)
|
||||
{
|
||||
if ($triggerDeprecationError) {
|
||||
trigger_error('The '.__METHOD__.' method is deprecated since version 2.7 and will be removed in 3.0.', E_USER_DEPRECATED);
|
||||
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.7 and will be removed in 3.0.', E_USER_DEPRECATED);
|
||||
}
|
||||
|
||||
$this->synchronized = (bool) $boolean;
|
||||
@ -687,7 +687,7 @@ class Definition
|
||||
public function isSynchronized($triggerDeprecationError = true)
|
||||
{
|
||||
if ($triggerDeprecationError) {
|
||||
trigger_error('The '.__METHOD__.' method is deprecated since version 2.7 and will be removed in 3.0.', E_USER_DEPRECATED);
|
||||
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.7 and will be removed in 3.0.', E_USER_DEPRECATED);
|
||||
}
|
||||
|
||||
return $this->synchronized;
|
||||
|
@ -705,7 +705,7 @@ EOF;
|
||||
}
|
||||
|
||||
if ('request' !== $id) {
|
||||
trigger_error('Synchronized services were deprecated in version 2.7 and won\'t work anymore in 3.0.', E_USER_DEPRECATED);
|
||||
@trigger_error('Synchronized services were deprecated in version 2.7 and won\'t work anymore in 3.0.', E_USER_DEPRECATED);
|
||||
}
|
||||
|
||||
$code = '';
|
||||
@ -1414,7 +1414,7 @@ EOF;
|
||||
*/
|
||||
public function addExpressionLanguageProvider(ExpressionFunctionProviderInterface $provider)
|
||||
{
|
||||
trigger_error('The '.__METHOD__.' method is deprecated since version 2.6.2 and will be removed in 3.0. Use the Symfony\Component\DependencyInjection\ContainerBuilder::addExpressionLanguageProvider method instead.', E_USER_DEPRECATED);
|
||||
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.6.2 and will be removed in 3.0. Use the Symfony\Component\DependencyInjection\ContainerBuilder::addExpressionLanguageProvider method instead.', E_USER_DEPRECATED);
|
||||
|
||||
$this->expressionLanguageProviders[] = $provider;
|
||||
}
|
||||
|
@ -151,7 +151,7 @@ class XmlFileLoader extends FileLoader
|
||||
foreach (array('class', 'scope', 'public', 'factory-class', 'factory-method', 'factory-service', 'synthetic', 'lazy', 'abstract') as $key) {
|
||||
if ($value = $service->getAttribute($key)) {
|
||||
if (in_array($key, array('factory-class', 'factory-method', 'factory-service'))) {
|
||||
trigger_error(sprintf('The "%s" attribute in file "%s" is deprecated since version 2.6 and will be removed in 3.0. Use the "factory" element instead.', $key, $file), E_USER_DEPRECATED);
|
||||
@trigger_error(sprintf('The "%s" attribute in file "%s" is deprecated since version 2.6 and will be removed in 3.0. Use the "factory" element instead.', $key, $file), E_USER_DEPRECATED);
|
||||
}
|
||||
$method = 'set'.str_replace('-', '', $key);
|
||||
$definition->$method(XmlUtils::phpize($value));
|
||||
@ -162,7 +162,7 @@ class XmlFileLoader extends FileLoader
|
||||
$triggerDeprecation = 'request' !== (string) $service->getAttribute('id');
|
||||
|
||||
if ($triggerDeprecation) {
|
||||
trigger_error(sprintf('The "synchronized" attribute in file "%s" is deprecated since version 2.7 and will be removed in 3.0.', $file), E_USER_DEPRECATED);
|
||||
@trigger_error(sprintf('The "synchronized" attribute in file "%s" is deprecated since version 2.7 and will be removed in 3.0.', $file), E_USER_DEPRECATED);
|
||||
}
|
||||
|
||||
$definition->setSynchronized(XmlUtils::phpize($value), $triggerDeprecation);
|
||||
|
@ -172,7 +172,7 @@ class YamlFileLoader extends FileLoader
|
||||
}
|
||||
|
||||
if (isset($service['synchronized'])) {
|
||||
trigger_error(sprintf('The "synchronized" key in file "%s" is deprecated since version 2.7 and will be removed in 3.0.', $file), E_USER_DEPRECATED);
|
||||
@trigger_error(sprintf('The "synchronized" key in file "%s" is deprecated since version 2.7 and will be removed in 3.0.', $file), E_USER_DEPRECATED);
|
||||
$definition->setSynchronized($service['synchronized'], 'request' !== $id);
|
||||
}
|
||||
|
||||
@ -202,17 +202,17 @@ class YamlFileLoader extends FileLoader
|
||||
}
|
||||
|
||||
if (isset($service['factory_class'])) {
|
||||
trigger_error(sprintf('The "factory_class" key in file "%s" is deprecated since version 2.6 and will be removed in 3.0. Use "factory" instead.', $file), E_USER_DEPRECATED);
|
||||
@trigger_error(sprintf('The "factory_class" key in file "%s" is deprecated since version 2.6 and will be removed in 3.0. Use "factory" instead.', $file), E_USER_DEPRECATED);
|
||||
$definition->setFactoryClass($service['factory_class']);
|
||||
}
|
||||
|
||||
if (isset($service['factory_method'])) {
|
||||
trigger_error(sprintf('The "factory_method" key in file "%s" is deprecated since version 2.6 and will be removed in 3.0. Use "factory" instead.', $file), E_USER_DEPRECATED);
|
||||
@trigger_error(sprintf('The "factory_method" key in file "%s" is deprecated since version 2.6 and will be removed in 3.0. Use "factory" instead.', $file), E_USER_DEPRECATED);
|
||||
$definition->setFactoryMethod($service['factory_method']);
|
||||
}
|
||||
|
||||
if (isset($service['factory_service'])) {
|
||||
trigger_error(sprintf('The "factory_service" key in file "%s" is deprecated since version 2.6 and will be removed in 3.0. Use "factory" instead.', $file), E_USER_DEPRECATED);
|
||||
@trigger_error(sprintf('The "factory_service" key in file "%s" is deprecated since version 2.6 and will be removed in 3.0. Use "factory" instead.', $file), E_USER_DEPRECATED);
|
||||
$definition->setFactoryService($service['factory_service']);
|
||||
}
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
namespace Symfony\Component\DependencyInjection;
|
||||
|
||||
trigger_error('The '.__NAMESPACE__.'\SimpleXMLElement method is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED);
|
||||
@trigger_error('The '.__NAMESPACE__.'\SimpleXMLElement method is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED);
|
||||
|
||||
use Symfony\Component\Config\Util\XmlUtils;
|
||||
use Symfony\Component\ExpressionLanguage\Expression;
|
||||
|
@ -97,7 +97,7 @@ class Event
|
||||
*/
|
||||
public function getDispatcher()
|
||||
{
|
||||
trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0. The event dispatcher instance can be received in the listener call instead.', E_USER_DEPRECATED);
|
||||
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0. The event dispatcher instance can be received in the listener call instead.', E_USER_DEPRECATED);
|
||||
|
||||
return $this->dispatcher;
|
||||
}
|
||||
@ -113,7 +113,7 @@ class Event
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0. The event name can be received in the listener call instead.', E_USER_DEPRECATED);
|
||||
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0. The event name can be received in the listener call instead.', E_USER_DEPRECATED);
|
||||
|
||||
return $this->name;
|
||||
}
|
||||
|
@ -477,7 +477,7 @@ class Filesystem
|
||||
$this->rename($tmpFile, $filename, true);
|
||||
if (null !== $mode) {
|
||||
if (func_num_args() > 2) {
|
||||
trigger_error('Support for modifying file permissions is deprecated since version 2.3.12 and will be removed in 3.0.', E_USER_DEPRECATED);
|
||||
@trigger_error('Support for modifying file permissions is deprecated since version 2.3.12 and will be removed in 3.0.', E_USER_DEPRECATED);
|
||||
}
|
||||
|
||||
$this->chmod($filename, $mode);
|
||||
|
@ -597,7 +597,7 @@ class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface
|
||||
*/
|
||||
public function getVirtual()
|
||||
{
|
||||
trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Form\FormConfigBuilder::getInheritData method instead.', E_USER_DEPRECATED);
|
||||
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Form\FormConfigBuilder::getInheritData method instead.', E_USER_DEPRECATED);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -144,7 +144,7 @@ class DefaultChoiceListFactory implements ChoiceListFactoryInterface
|
||||
if ($list instanceof LegacyChoiceListInterface && empty($preferredChoices)
|
||||
&& null === $label && null === $index && null === $groupBy && null === $attr) {
|
||||
$mapToNonLegacyChoiceView = function (LegacyChoiceView $choiceView) {
|
||||
return new ChoiceView($choiceView->label, $choiceView->value, $choiceView->data);
|
||||
return new ChoiceView($choiceView->data, $choiceView->value, $choiceView->label);
|
||||
};
|
||||
|
||||
return new ChoiceListView(
|
||||
@ -245,10 +245,10 @@ class DefaultChoiceListFactory implements ChoiceListFactoryInterface
|
||||
$nextIndex = is_int($index) ? $index++ : call_user_func($index, $choice, $key, $value);
|
||||
|
||||
$view = new ChoiceView(
|
||||
$choice,
|
||||
$value,
|
||||
// If the labels are null, use the choice key by default
|
||||
null === $label ? (string) $key : (string) call_user_func($label, $choice, $key, $value),
|
||||
$value,
|
||||
$choice,
|
||||
// The attributes may be a callable or a mapping from choice indices
|
||||
// to nested arrays
|
||||
is_callable($attr) ? call_user_func($attr, $choice, $key, $value) : (isset($attr[$key]) ? $attr[$key] : array())
|
||||
|
@ -78,12 +78,12 @@ class ChoiceView extends LegacyChoiceView
|
||||
/**
|
||||
* Creates a new choice view.
|
||||
*
|
||||
* @param string $label The label displayed to humans
|
||||
* @param string $value The view representation of the choice
|
||||
* @param mixed $data The original choice
|
||||
* @param string $value The view representation of the choice
|
||||
* @param string $label The label displayed to humans
|
||||
* @param array $attr Additional attributes for the HTML tag
|
||||
*/
|
||||
public function __construct($label, $value, $data, array $attr = array())
|
||||
public function __construct($data, $value, $label, array $attr = array())
|
||||
{
|
||||
parent::__construct($data, $value, $label);
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
namespace Symfony\Component\Form\Deprecated;
|
||||
|
||||
trigger_error('Constants PRE_BIND, BIND and POST_BIND in class Symfony\Component\Form\FormEvents are deprecated since version 2.3 and will be removed in 3.0. Use PRE_SUBMIT, SUBMIT and POST_SUBMIT instead.', E_USER_DEPRECATED);
|
||||
@trigger_error('Constants PRE_BIND, BIND and POST_BIND in class Symfony\Component\Form\FormEvents are deprecated since version 2.3 and will be removed in 3.0. Use PRE_SUBMIT, SUBMIT and POST_SUBMIT instead.', E_USER_DEPRECATED);
|
||||
|
||||
/**
|
||||
* @deprecated since version 2.7, to be removed in 3.0.
|
||||
|
@ -22,7 +22,7 @@ class AlreadyBoundException extends LogicException
|
||||
public function __construct($message = '', $code = 0, \Exception $previous = null)
|
||||
{
|
||||
if (__CLASS__ === get_class($this)) {
|
||||
trigger_error('The '.__CLASS__.' class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Form\Exception\AlreadySubmittedException class instead.', E_USER_DEPRECATED);
|
||||
@trigger_error('The '.__CLASS__.' class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Form\Exception\AlreadySubmittedException class instead.', E_USER_DEPRECATED);
|
||||
}
|
||||
|
||||
parent::__construct($message, $code, $previous);
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
namespace Symfony\Component\Form\Extension\Core\ChoiceList;
|
||||
|
||||
trigger_error('The '.__NAMESPACE__.'\ChoiceList class is deprecated since version 2.7 and will be removed in 3.0. Use Symfony\Component\Form\ChoiceList\ArrayChoiceList instead.', E_USER_DEPRECATED);
|
||||
@trigger_error('The '.__NAMESPACE__.'\ChoiceList class is deprecated since version 2.7 and will be removed in 3.0. Use Symfony\Component\Form\ChoiceList\ArrayChoiceList instead.', E_USER_DEPRECATED);
|
||||
|
||||
use Symfony\Component\Form\FormConfigBuilder;
|
||||
use Symfony\Component\Form\Exception\UnexpectedTypeException;
|
||||
@ -208,7 +208,7 @@ class ChoiceList implements ChoiceListInterface
|
||||
*/
|
||||
public function getIndicesForChoices(array $choices)
|
||||
{
|
||||
trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0.', E_USER_DEPRECATED);
|
||||
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0.', E_USER_DEPRECATED);
|
||||
|
||||
$choices = $this->fixChoices($choices);
|
||||
$indices = array();
|
||||
@ -236,7 +236,7 @@ class ChoiceList implements ChoiceListInterface
|
||||
*/
|
||||
public function getIndicesForValues(array $values)
|
||||
{
|
||||
trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0.', E_USER_DEPRECATED);
|
||||
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0.', E_USER_DEPRECATED);
|
||||
|
||||
$values = $this->fixValues($values);
|
||||
$indices = array();
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
namespace Symfony\Component\Form\Extension\Core\ChoiceList;
|
||||
|
||||
trigger_error('The '.__NAMESPACE__.'\LazyChoiceList class is deprecated since version 2.7 and will be removed in 3.0. Use Symfony\Component\Form\ChoiceList\ArrayChoiceList instead.', E_USER_DEPRECATED);
|
||||
@trigger_error('The '.__NAMESPACE__.'\LazyChoiceList class is deprecated since version 2.7 and will be removed in 3.0. Use Symfony\Component\Form\ChoiceList\ArrayChoiceList instead.', E_USER_DEPRECATED);
|
||||
|
||||
use Symfony\Component\Form\Exception\InvalidArgumentException;
|
||||
|
||||
@ -115,7 +115,7 @@ abstract class LazyChoiceList implements ChoiceListInterface
|
||||
*/
|
||||
public function getIndicesForChoices(array $choices)
|
||||
{
|
||||
trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0.', E_USER_DEPRECATED);
|
||||
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0.', E_USER_DEPRECATED);
|
||||
|
||||
if (!$this->choiceList) {
|
||||
$this->load();
|
||||
@ -131,7 +131,7 @@ abstract class LazyChoiceList implements ChoiceListInterface
|
||||
*/
|
||||
public function getIndicesForValues(array $values)
|
||||
{
|
||||
trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0.', E_USER_DEPRECATED);
|
||||
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0.', E_USER_DEPRECATED);
|
||||
|
||||
if (!$this->choiceList) {
|
||||
$this->load();
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
namespace Symfony\Component\Form\Extension\Core\ChoiceList;
|
||||
|
||||
trigger_error('The '.__NAMESPACE__.'\ObjectChoiceList class is deprecated since version 2.7 and will be removed in 3.0. Use Symfony\Component\Form\ChoiceList\ArrayChoiceList instead.', E_USER_DEPRECATED);
|
||||
@trigger_error('The '.__NAMESPACE__.'\ObjectChoiceList class is deprecated since version 2.7 and will be removed in 3.0. Use Symfony\Component\Form\ChoiceList\ArrayChoiceList instead.', E_USER_DEPRECATED);
|
||||
|
||||
use Symfony\Component\Form\Exception\StringCastException;
|
||||
use Symfony\Component\Form\Exception\InvalidArgumentException;
|
||||
@ -196,7 +196,7 @@ class ObjectChoiceList extends ChoiceList
|
||||
*/
|
||||
public function getIndicesForChoices(array $choices)
|
||||
{
|
||||
trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0.', E_USER_DEPRECATED);
|
||||
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0.', E_USER_DEPRECATED);
|
||||
|
||||
if (!$this->valuePath) {
|
||||
return parent::getIndicesForChoices($choices);
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
namespace Symfony\Component\Form\Extension\Core\ChoiceList;
|
||||
|
||||
trigger_error('The '.__NAMESPACE__.'\SimpleChoiceList class is deprecated since version 2.7 and will be removed in 3.0. Use Symfony\Component\Form\ChoiceList\ArrayChoiceList instead.', E_USER_DEPRECATED);
|
||||
@trigger_error('The '.__NAMESPACE__.'\SimpleChoiceList class is deprecated since version 2.7 and will be removed in 3.0. Use Symfony\Component\Form\ChoiceList\ArrayChoiceList instead.', E_USER_DEPRECATED);
|
||||
|
||||
/**
|
||||
* A choice list for choices of type string or integer.
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
namespace Symfony\Component\Form\Extension\Core\DataTransformer;
|
||||
|
||||
trigger_error('The class '.__NAMESPACE__.'\ChoiceToBooleanArrayTransformer is deprecated since version 2.7 and will be removed in 3.0. Use Symfony\Component\Form\Extension\Core\DataMapper\RadioListMapper instead.', E_USER_DEPRECATED);
|
||||
@trigger_error('The class '.__NAMESPACE__.'\ChoiceToBooleanArrayTransformer is deprecated since version 2.7 and will be removed in 3.0. Use Symfony\Component\Form\Extension\Core\DataMapper\RadioListMapper instead.', E_USER_DEPRECATED);
|
||||
|
||||
use Symfony\Component\Form\ChoiceList\ChoiceListInterface;
|
||||
use Symfony\Component\Form\DataTransformerInterface;
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
namespace Symfony\Component\Form\Extension\Core\DataTransformer;
|
||||
|
||||
trigger_error('The class '.__NAMESPACE__.'\ChoicesToBooleanArrayTransformer is deprecated since version 2.7 and will be removed in 3.0. Use Symfony\Component\Form\Extension\Core\DataMapper\CheckboxListMapper instead.', E_USER_DEPRECATED);
|
||||
@trigger_error('The class '.__NAMESPACE__.'\ChoicesToBooleanArrayTransformer is deprecated since version 2.7 and will be removed in 3.0. Use Symfony\Component\Form\Extension\Core\DataMapper\CheckboxListMapper instead.', E_USER_DEPRECATED);
|
||||
|
||||
use Symfony\Component\Form\ChoiceList\ChoiceListInterface;
|
||||
use Symfony\Component\Form\DataTransformerInterface;
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
namespace Symfony\Component\Form\Extension\Core\EventListener;
|
||||
|
||||
trigger_error('The class '.__NAMESPACE__.'\FixCheckboxInputListener is deprecated since version 2.7 and will be removed in 3.0. Use Symfony\Component\Form\Extension\Core\DataMapper\CheckboxListMapper instead.', E_USER_DEPRECATED);
|
||||
@trigger_error('The class '.__NAMESPACE__.'\FixCheckboxInputListener is deprecated since version 2.7 and will be removed in 3.0. Use Symfony\Component\Form\Extension\Core\DataMapper\CheckboxListMapper instead.', E_USER_DEPRECATED);
|
||||
|
||||
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
||||
use Symfony\Component\Form\ChoiceList\ChoiceListInterface;
|
||||
@ -91,7 +91,7 @@ class FixCheckboxInputListener implements EventSubscriberInterface
|
||||
*/
|
||||
public function preBind(FormEvent $event)
|
||||
{
|
||||
trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0. Use the preSubmit() method instead.', E_USER_DEPRECATED);
|
||||
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0. Use the preSubmit() method instead.', E_USER_DEPRECATED);
|
||||
|
||||
$this->preSubmit($event);
|
||||
}
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
namespace Symfony\Component\Form\Extension\Core\EventListener;
|
||||
|
||||
trigger_error('The class '.__NAMESPACE__.'\FixRadioInputListener is deprecated since version 2.7 and will be removed in 3.0. Use Symfony\Component\Form\Extension\Core\DataMapper\RadioListMapper instead.', E_USER_DEPRECATED);
|
||||
@trigger_error('The class '.__NAMESPACE__.'\FixRadioInputListener is deprecated since version 2.7 and will be removed in 3.0. Use Symfony\Component\Form\Extension\Core\DataMapper\RadioListMapper instead.', E_USER_DEPRECATED);
|
||||
|
||||
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
||||
use Symfony\Component\Form\ChoiceList\ChoiceListInterface;
|
||||
@ -73,7 +73,7 @@ class FixRadioInputListener implements EventSubscriberInterface
|
||||
*/
|
||||
public function preBind(FormEvent $event)
|
||||
{
|
||||
trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0. Use the preSubmit() method instead.', E_USER_DEPRECATED);
|
||||
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0. Use the preSubmit() method instead.', E_USER_DEPRECATED);
|
||||
|
||||
$this->preSubmit($event);
|
||||
}
|
||||
|
@ -51,7 +51,7 @@ class FixUrlProtocolListener implements EventSubscriberInterface
|
||||
*/
|
||||
public function onBind(FormEvent $event)
|
||||
{
|
||||
trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0. Use the onSubmit() method instead.', E_USER_DEPRECATED);
|
||||
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0. Use the onSubmit() method instead.', E_USER_DEPRECATED);
|
||||
|
||||
$this->onSubmit($event);
|
||||
}
|
||||
|
@ -134,7 +134,7 @@ class MergeCollectionListener implements EventSubscriberInterface
|
||||
*/
|
||||
public function onBind(FormEvent $event)
|
||||
{
|
||||
trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0. Use the onSubmit() method instead.', E_USER_DEPRECATED);
|
||||
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0. Use the onSubmit() method instead.', E_USER_DEPRECATED);
|
||||
|
||||
$this->onSubmit($event);
|
||||
}
|
||||
|
@ -189,7 +189,7 @@ class ResizeFormListener implements EventSubscriberInterface
|
||||
*/
|
||||
public function preBind(FormEvent $event)
|
||||
{
|
||||
trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0. Use the preSubmit() method instead.', E_USER_DEPRECATED);
|
||||
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0. Use the preSubmit() method instead.', E_USER_DEPRECATED);
|
||||
|
||||
$this->preSubmit($event);
|
||||
}
|
||||
@ -202,7 +202,7 @@ class ResizeFormListener implements EventSubscriberInterface
|
||||
*/
|
||||
public function onBind(FormEvent $event)
|
||||
{
|
||||
trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0. Use the onSubmit() method instead.', E_USER_DEPRECATED);
|
||||
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0. Use the onSubmit() method instead.', E_USER_DEPRECATED);
|
||||
|
||||
$this->onSubmit($event);
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ class TrimListener implements EventSubscriberInterface
|
||||
*/
|
||||
public function preBind(FormEvent $event)
|
||||
{
|
||||
trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0. Use the preSubmit() method instead.', E_USER_DEPRECATED);
|
||||
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0. Use the preSubmit() method instead.', E_USER_DEPRECATED);
|
||||
|
||||
$this->preSubmit($event);
|
||||
}
|
||||
|
@ -13,7 +13,6 @@ namespace Symfony\Component\Form\Extension\Core\Type;
|
||||
|
||||
use Symfony\Component\Form\AbstractType;
|
||||
use Symfony\Component\Form\ChoiceList\Factory\PropertyAccessDecorator;
|
||||
use Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface;
|
||||
use Symfony\Component\Form\ChoiceList\View\ChoiceGroupView;
|
||||
use Symfony\Component\Form\ChoiceList\ChoiceListInterface;
|
||||
use Symfony\Component\Form\ChoiceList\Factory\DefaultChoiceListFactory;
|
||||
@ -71,7 +70,7 @@ class ChoiceType extends AbstractType
|
||||
// Check if the choices already contain the empty value
|
||||
// Only add the placeholder option if this is not the case
|
||||
if (null !== $options['placeholder'] && 0 === count($options['choice_list']->getChoicesForValues(array('')))) {
|
||||
$placeholderView = new ChoiceView($options['placeholder'], '', null);
|
||||
$placeholderView = new ChoiceView(null, '', $options['placeholder']);
|
||||
|
||||
// "placeholder" is a reserved name
|
||||
$this->addSubForm($builder, 'placeholder', $placeholderView, $options);
|
||||
@ -258,7 +257,7 @@ class ChoiceType extends AbstractType
|
||||
|
||||
$choiceListNormalizer = function (Options $options, $choiceList) use ($choiceListFactory) {
|
||||
if ($choiceList) {
|
||||
trigger_error('The "choice_list" option is deprecated since version 2.7 and will be removed in 3.0. Use "choice_loader" instead.', E_USER_DEPRECATED);
|
||||
@trigger_error('The "choice_list" option is deprecated since version 2.7 and will be removed in 3.0. Use "choice_loader" instead.', E_USER_DEPRECATED);
|
||||
|
||||
return $choiceList;
|
||||
}
|
||||
@ -436,7 +435,7 @@ class ChoiceType extends AbstractType
|
||||
// information from the "choices" option for creating groups
|
||||
if (!$options['group_by'] && $options['choices']) {
|
||||
$options['group_by'] = !$options['choices_as_values']
|
||||
? ChoiceType::flipRecursive($options['choices'])
|
||||
? self::flipRecursive($options['choices'])
|
||||
: $options['choices'];
|
||||
}
|
||||
|
||||
|
@ -154,7 +154,7 @@ class FormType extends BaseType
|
||||
// BC with old "virtual" option
|
||||
$inheritData = function (Options $options) {
|
||||
if (null !== $options['virtual']) {
|
||||
trigger_error('The form option "virtual" is deprecated since version 2.3 and will be removed in 3.0. Use "inherit_data" instead.', E_USER_DEPRECATED);
|
||||
@trigger_error('The form option "virtual" is deprecated since version 2.3 and will be removed in 3.0. Use "inherit_data" instead.', E_USER_DEPRECATED);
|
||||
|
||||
return $options['virtual'];
|
||||
}
|
||||
|
@ -39,7 +39,7 @@ class IntegerType extends AbstractType
|
||||
{
|
||||
$scale = function (Options $options) {
|
||||
if (null !== $options['precision']) {
|
||||
trigger_error('The form option "precision" is deprecated since version 2.7 and will be removed in 3.0. Use "scale" instead.', E_USER_DEPRECATED);
|
||||
@trigger_error('The form option "precision" is deprecated since version 2.7 and will be removed in 3.0. Use "scale" instead.', E_USER_DEPRECATED);
|
||||
}
|
||||
|
||||
return $options['precision'];
|
||||
|
@ -53,7 +53,7 @@ class MoneyType extends AbstractType
|
||||
{
|
||||
$scale = function (Options $options) {
|
||||
if (null !== $options['precision']) {
|
||||
trigger_error('The form option "precision" is deprecated since version 2.7 and will be removed in 3.0. Use "scale" instead.', E_USER_DEPRECATED);
|
||||
@trigger_error('The form option "precision" is deprecated since version 2.7 and will be removed in 3.0. Use "scale" instead.', E_USER_DEPRECATED);
|
||||
|
||||
return $options['precision'];
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ class NumberType extends AbstractType
|
||||
{
|
||||
$scale = function (Options $options) {
|
||||
if (null !== $options['precision']) {
|
||||
trigger_error('The form option "precision" is deprecated since version 2.7 and will be removed in 3.0. Use "scale" instead.', E_USER_DEPRECATED);
|
||||
@trigger_error('The form option "precision" is deprecated since version 2.7 and will be removed in 3.0. Use "scale" instead.', E_USER_DEPRECATED);
|
||||
}
|
||||
|
||||
return $options['precision'];
|
||||
|
@ -34,7 +34,7 @@ class PercentType extends AbstractType
|
||||
{
|
||||
$scale = function (Options $options) {
|
||||
if (null !== $options['precision']) {
|
||||
trigger_error('The form option "precision" is deprecated since version 2.7 and will be removed in 3.0. Use "scale" instead.', E_USER_DEPRECATED);
|
||||
@trigger_error('The form option "precision" is deprecated since version 2.7 and will be removed in 3.0. Use "scale" instead.', E_USER_DEPRECATED);
|
||||
|
||||
return $options['precision'];
|
||||
}
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
namespace Symfony\Component\Form\Extension\Core\View;
|
||||
|
||||
trigger_error('The '.__NAMESPACE__.'\ChoiceView class is deprecated since version 2.7 and will be removed in 3.0. Use Symfony\Component\Form\ChoiceList\View\ChoiceView instead.', E_USER_DEPRECATED);
|
||||
@trigger_error('The '.__NAMESPACE__.'\ChoiceView class is deprecated since version 2.7 and will be removed in 3.0. Use Symfony\Component\Form\ChoiceList\View\ChoiceView instead.', E_USER_DEPRECATED);
|
||||
|
||||
/**
|
||||
* Represents a choice in templates.
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
namespace Symfony\Component\Form\Extension\Csrf\CsrfProvider;
|
||||
|
||||
trigger_error('The '.__NAMESPACE__.'\CsrfProviderAdapter class is deprecated since version 2.4 and will be removed in version 3.0. Use the Symfony\Component\Security\Csrf\CsrfTokenManager class instead.', E_USER_DEPRECATED);
|
||||
@trigger_error('The '.__NAMESPACE__.'\CsrfProviderAdapter class is deprecated since version 2.4 and will be removed in version 3.0. Use the Symfony\Component\Security\Csrf\CsrfTokenManager class instead.', E_USER_DEPRECATED);
|
||||
|
||||
use Symfony\Component\Form\Exception\BadMethodCallException;
|
||||
use Symfony\Component\Security\Csrf\CsrfToken;
|
||||
|
@ -37,7 +37,7 @@ class CsrfTokenManagerAdapter implements CsrfProviderInterface
|
||||
public function getTokenManager($triggerDeprecationError = true)
|
||||
{
|
||||
if ($triggerDeprecationError) {
|
||||
trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in version 3.0. Use the Symfony\Component\Security\Csrf\CsrfTokenManager class instead.', E_USER_DEPRECATED);
|
||||
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in version 3.0. Use the Symfony\Component\Security\Csrf\CsrfTokenManager class instead.', E_USER_DEPRECATED);
|
||||
}
|
||||
|
||||
return $this->tokenManager;
|
||||
@ -48,7 +48,7 @@ class CsrfTokenManagerAdapter implements CsrfProviderInterface
|
||||
*/
|
||||
public function generateCsrfToken($intention)
|
||||
{
|
||||
trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in version 3.0. Use the Symfony\Component\Security\Csrf\CsrfTokenManager class instead.', E_USER_DEPRECATED);
|
||||
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in version 3.0. Use the Symfony\Component\Security\Csrf\CsrfTokenManager class instead.', E_USER_DEPRECATED);
|
||||
|
||||
return $this->tokenManager->getToken($intention)->getValue();
|
||||
}
|
||||
@ -58,7 +58,7 @@ class CsrfTokenManagerAdapter implements CsrfProviderInterface
|
||||
*/
|
||||
public function isCsrfTokenValid($intention, $token)
|
||||
{
|
||||
trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in version 3.0. Use the Symfony\Component\Security\Csrf\CsrfTokenManager class instead.', E_USER_DEPRECATED);
|
||||
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in version 3.0. Use the Symfony\Component\Security\Csrf\CsrfTokenManager class instead.', E_USER_DEPRECATED);
|
||||
|
||||
return $this->tokenManager->isTokenValid(new CsrfToken($intention, $token));
|
||||
}
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
namespace Symfony\Component\Form\Extension\Csrf\CsrfProvider;
|
||||
|
||||
trigger_error('The '.__NAMESPACE__.'\DefaultCsrfProvider is deprecated since version 2.4 and will be removed in version 3.0. Use the \Symfony\Component\Security\Csrf\TokenStorage\NativeSessionTokenStorage class instead.', E_USER_DEPRECATED);
|
||||
@trigger_error('The '.__NAMESPACE__.'\DefaultCsrfProvider is deprecated since version 2.4 and will be removed in version 3.0. Use the \Symfony\Component\Security\Csrf\TokenStorage\NativeSessionTokenStorage class instead.', E_USER_DEPRECATED);
|
||||
|
||||
/**
|
||||
* Default implementation of CsrfProviderInterface.
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
namespace Symfony\Component\Form\Extension\Csrf\CsrfProvider;
|
||||
|
||||
trigger_error('The '.__NAMESPACE__.'\SessionCsrfProvider is deprecated since version 2.4 and will be removed in version 3.0. Use the Symfony\Component\Security\Csrf\TokenStorage\SessionTokenStorage class instead.', E_USER_DEPRECATED);
|
||||
@trigger_error('The '.__NAMESPACE__.'\SessionCsrfProvider is deprecated since version 2.4 and will be removed in version 3.0. Use the Symfony\Component\Security\Csrf\TokenStorage\SessionTokenStorage class instead.', E_USER_DEPRECATED);
|
||||
|
||||
use Symfony\Component\HttpFoundation\Session\Session;
|
||||
|
||||
|
@ -123,7 +123,7 @@ class CsrfValidationListener implements EventSubscriberInterface
|
||||
*/
|
||||
public function preBind(FormEvent $event)
|
||||
{
|
||||
trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0. Use the preSubmit() method instead.', E_USER_DEPRECATED);
|
||||
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0. Use the preSubmit() method instead.', E_USER_DEPRECATED);
|
||||
|
||||
$this->preSubmit($event);
|
||||
}
|
||||
|
@ -42,10 +42,10 @@ class BindRequestListener implements EventSubscriberInterface
|
||||
return;
|
||||
}
|
||||
|
||||
trigger_error('The '.__CLASS__.' class is deprecated since version 2.3 and will be removed in 3.0. Pass the Request instance to the \Symfony\Component\Form\Form::handleRequest() method instead.', E_USER_DEPRECATED);
|
||||
@trigger_error('The '.__CLASS__.' class is deprecated since version 2.3 and will be removed in 3.0. Pass the Request instance to the \Symfony\Component\Form\Form::handleRequest() method instead.', E_USER_DEPRECATED);
|
||||
|
||||
// Uncomment this as soon as the deprecation note should be shown
|
||||
// trigger_error('Passing a Request instance to Form::submit() is deprecated since version 2.3 and will be disabled in 3.0. Call Form::process($request) instead.', E_USER_DEPRECATED);
|
||||
// @trigger_error('Passing a Request instance to Form::submit() is deprecated since version 2.3 and will be disabled in 3.0. Call Form::process($request) instead.', E_USER_DEPRECATED);
|
||||
|
||||
$name = $form->getConfig()->getName();
|
||||
$default = $form->getConfig()->getCompound() ? array() : null;
|
||||
|
@ -507,7 +507,7 @@ class Form implements \IteratorAggregate, FormInterface
|
||||
public function submit($submittedData, $clearMissing = true)
|
||||
{
|
||||
if ($submittedData instanceof Request) {
|
||||
trigger_error('Passing a Symfony\Component\HttpFoundation\Request object to the '.__CLASS__.'::bind and '.__METHOD__.' methods is deprecated since 2.3 and will be removed in 3.0. Use the '.__CLASS__.'::handleRequest method instead. If you want to test whether the form was submitted separately, you can use the '.__CLASS__.'::isSubmitted method.', E_USER_DEPRECATED);
|
||||
@trigger_error('Passing a Symfony\Component\HttpFoundation\Request object to the '.__CLASS__.'::bind and '.__METHOD__.' methods is deprecated since 2.3 and will be removed in 3.0. Use the '.__CLASS__.'::handleRequest method instead. If you want to test whether the form was submitted separately, you can use the '.__CLASS__.'::isSubmitted method.', E_USER_DEPRECATED);
|
||||
}
|
||||
|
||||
if ($this->submitted) {
|
||||
@ -684,7 +684,7 @@ class Form implements \IteratorAggregate, FormInterface
|
||||
// This method is deprecated for Request too, but the error is
|
||||
// triggered in Form::submit() method.
|
||||
if (!$submittedData instanceof Request) {
|
||||
trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0. Use the '.__CLASS__.'::submit method instead.', E_USER_DEPRECATED);
|
||||
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0. Use the '.__CLASS__.'::submit method instead.', E_USER_DEPRECATED);
|
||||
}
|
||||
|
||||
return $this->submit($submittedData);
|
||||
@ -724,7 +724,7 @@ class Form implements \IteratorAggregate, FormInterface
|
||||
*/
|
||||
public function isBound()
|
||||
{
|
||||
trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0. Use the '.__CLASS__.'::isSubmitted method instead.', E_USER_DEPRECATED);
|
||||
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0. Use the '.__CLASS__.'::isSubmitted method instead.', E_USER_DEPRECATED);
|
||||
|
||||
return $this->submitted;
|
||||
}
|
||||
@ -848,7 +848,7 @@ class Form implements \IteratorAggregate, FormInterface
|
||||
*/
|
||||
public function getErrorsAsString($level = 0)
|
||||
{
|
||||
trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0. Use (string) Form::getErrors(true, false) instead.', E_USER_DEPRECATED);
|
||||
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0. Use (string) Form::getErrors(true, false) instead.', E_USER_DEPRECATED);
|
||||
|
||||
return self::indent((string) $this->getErrors(true, false), $level);
|
||||
}
|
||||
|
@ -356,7 +356,7 @@ class FormConfigBuilder implements FormConfigBuilderInterface
|
||||
*/
|
||||
public function getVirtual()
|
||||
{
|
||||
trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0. Use the FormConfigBuilder::getInheritData() method instead.', E_USER_DEPRECATED);
|
||||
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0. Use the FormConfigBuilder::getInheritData() method instead.', E_USER_DEPRECATED);
|
||||
|
||||
return $this->getInheritData();
|
||||
}
|
||||
@ -722,7 +722,7 @@ class FormConfigBuilder implements FormConfigBuilderInterface
|
||||
*/
|
||||
public function setVirtual($inheritData)
|
||||
{
|
||||
trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0. Use the FormConfigBuilder::setInheritData() method instead.', E_USER_DEPRECATED);
|
||||
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0. Use the FormConfigBuilder::setInheritData() method instead.', E_USER_DEPRECATED);
|
||||
|
||||
$this->setInheritData($inheritData);
|
||||
}
|
||||
|
@ -207,7 +207,7 @@ class ResolvedFormType implements ResolvedFormTypeInterface
|
||||
$isNewOverwritten = $reflector->getDeclaringClass()->getName() !== 'Symfony\Component\Form\AbstractType';
|
||||
|
||||
if ($isOldOverwritten && !$isNewOverwritten) {
|
||||
trigger_error(get_class($this->innerType).': The FormTypeInterface::setDefaultOptions() method is deprecated since version 2.7 and will be removed in 3.0. Use configureOptions() instead. This method will be added to the FormTypeInterface with Symfony 3.0.', E_USER_DEPRECATED);
|
||||
@trigger_error(get_class($this->innerType).': The FormTypeInterface::setDefaultOptions() method is deprecated since version 2.7 and will be removed in 3.0. Use configureOptions() instead. This method will be added to the FormTypeInterface with Symfony 3.0.', E_USER_DEPRECATED);
|
||||
}
|
||||
|
||||
foreach ($this->typeExtensions as $extension) {
|
||||
@ -220,7 +220,7 @@ class ResolvedFormType implements ResolvedFormTypeInterface
|
||||
$isNewOverwritten = $reflector->getDeclaringClass()->getName() !== 'Symfony\Component\Form\AbstractTypeExtension';
|
||||
|
||||
if ($isOldOverwritten && !$isNewOverwritten) {
|
||||
trigger_error(get_class($extension).': The FormTypeExtensionInterface::setDefaultOptions() method is deprecated since version 2.7 and will be removed in 3.0. Use configureOptions() instead. This method will be added to the FormTypeExtensionInterface with Symfony 3.0.', E_USER_DEPRECATED);
|
||||
@trigger_error(get_class($extension).': The FormTypeExtensionInterface::setDefaultOptions() method is deprecated since version 2.7 and will be removed in 3.0. Use configureOptions() instead. This method will be added to the FormTypeExtensionInterface with Symfony 3.0.', E_USER_DEPRECATED);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user