improve deprecation messages
This commit is contained in:
parent
3384b2da76
commit
a3845c7d6e
@ -39,7 +39,7 @@ class DebugCommand extends Command
|
|||||||
public function __construct($twig = null, $projectDir = null)
|
public function __construct($twig = null, $projectDir = null)
|
||||||
{
|
{
|
||||||
if (!$twig instanceof Environment) {
|
if (!$twig instanceof Environment) {
|
||||||
@trigger_error(sprintf('Passing a command name as the first argument of "%s" is deprecated since Symfony 3.4 and will be removed in 4.0. If the command was registered by convention, make it a service instead.', __METHOD__), E_USER_DEPRECATED);
|
@trigger_error(sprintf('Passing a command name as the first argument of "%s()" is deprecated since Symfony 3.4 and support for it will be removed in 4.0. If the command was registered by convention, make it a service instead.', __METHOD__), E_USER_DEPRECATED);
|
||||||
|
|
||||||
parent::__construct($twig);
|
parent::__construct($twig);
|
||||||
|
|
||||||
@ -54,7 +54,7 @@ class DebugCommand extends Command
|
|||||||
|
|
||||||
public function setTwigEnvironment(Environment $twig)
|
public function setTwigEnvironment(Environment $twig)
|
||||||
{
|
{
|
||||||
@trigger_error(sprintf('Method "%s" is deprecated since Symfony 3.4 and will be removed in 4.0.', __METHOD__), E_USER_DEPRECATED);
|
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 3.4 and will be removed in 4.0.', __METHOD__), E_USER_DEPRECATED);
|
||||||
|
|
||||||
$this->twig = $twig;
|
$this->twig = $twig;
|
||||||
}
|
}
|
||||||
@ -64,7 +64,7 @@ class DebugCommand extends Command
|
|||||||
*/
|
*/
|
||||||
protected function getTwigEnvironment()
|
protected function getTwigEnvironment()
|
||||||
{
|
{
|
||||||
@trigger_error(sprintf('Method "%s" is deprecated since Symfony 3.4 and will be removed in 4.0.', __METHOD__), E_USER_DEPRECATED);
|
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 3.4 and will be removed in 4.0.', __METHOD__), E_USER_DEPRECATED);
|
||||||
|
|
||||||
return $this->twig;
|
return $this->twig;
|
||||||
}
|
}
|
||||||
|
@ -43,7 +43,7 @@ class LintCommand extends Command
|
|||||||
public function __construct($twig = null)
|
public function __construct($twig = null)
|
||||||
{
|
{
|
||||||
if (!$twig instanceof Environment) {
|
if (!$twig instanceof Environment) {
|
||||||
@trigger_error(sprintf('Passing a command name as the first argument of "%s" is deprecated since Symfony 3.4 and will be removed in 4.0. If the command was registered by convention, make it a service instead.', __METHOD__), E_USER_DEPRECATED);
|
@trigger_error(sprintf('Passing a command name as the first argument of "%s()" is deprecated since Symfony 3.4 and support for it will be removed in 4.0. If the command was registered by convention, make it a service instead.', __METHOD__), E_USER_DEPRECATED);
|
||||||
|
|
||||||
parent::__construct($twig);
|
parent::__construct($twig);
|
||||||
|
|
||||||
@ -57,7 +57,7 @@ class LintCommand extends Command
|
|||||||
|
|
||||||
public function setTwigEnvironment(Environment $twig)
|
public function setTwigEnvironment(Environment $twig)
|
||||||
{
|
{
|
||||||
@trigger_error(sprintf('Method "%s" is deprecated since Symfony 3.4 and will be removed in 4.0.', __METHOD__), E_USER_DEPRECATED);
|
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 3.4 and will be removed in 4.0.', __METHOD__), E_USER_DEPRECATED);
|
||||||
|
|
||||||
$this->twig = $twig;
|
$this->twig = $twig;
|
||||||
}
|
}
|
||||||
@ -67,7 +67,7 @@ class LintCommand extends Command
|
|||||||
*/
|
*/
|
||||||
protected function getTwigEnvironment()
|
protected function getTwigEnvironment()
|
||||||
{
|
{
|
||||||
@trigger_error(sprintf('Method "%s" is deprecated since Symfony 3.4 and will be removed in 4.0.', __METHOD__), E_USER_DEPRECATED);
|
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 3.4 and will be removed in 4.0.', __METHOD__), E_USER_DEPRECATED);
|
||||||
|
|
||||||
return $this->twig;
|
return $this->twig;
|
||||||
}
|
}
|
||||||
|
@ -70,7 +70,7 @@ class LintCommandTest extends TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @group legacy
|
* @group legacy
|
||||||
* @expectedDeprecation Passing a command name as the first argument of "Symfony\Bridge\Twig\Command\LintCommand::__construct" is deprecated since Symfony 3.4 and will be removed in 4.0. If the command was registered by convention, make it a service instead.
|
* @expectedDeprecation Passing a command name as the first argument of "Symfony\Bridge\Twig\Command\LintCommand::__construct()" is deprecated since Symfony 3.4 and support for it will be removed in 4.0. If the command was registered by convention, make it a service instead.
|
||||||
* @expectedException \RuntimeException
|
* @expectedException \RuntimeException
|
||||||
* @expectedExceptionMessage The Twig environment needs to be set.
|
* @expectedExceptionMessage The Twig environment needs to be set.
|
||||||
*/
|
*/
|
||||||
|
@ -36,7 +36,7 @@ class CacheWarmupCommand extends ContainerAwareCommand
|
|||||||
public function __construct($cacheWarmer = null)
|
public function __construct($cacheWarmer = null)
|
||||||
{
|
{
|
||||||
if (!$cacheWarmer instanceof CacheWarmerAggregate) {
|
if (!$cacheWarmer instanceof CacheWarmerAggregate) {
|
||||||
@trigger_error(sprintf('Passing a command name as the first argument of "%s" is deprecated since Symfony 3.4 and will be removed in 4.0. If the command was registered by convention, make it a service instead.', __METHOD__), E_USER_DEPRECATED);
|
@trigger_error(sprintf('Passing a command name as the first argument of "%s()" is deprecated since Symfony 3.4 and support for it will be removed in 4.0. If the command was registered by convention, make it a service instead.', __METHOD__), E_USER_DEPRECATED);
|
||||||
|
|
||||||
parent::__construct($cacheWarmer);
|
parent::__construct($cacheWarmer);
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ class XliffLintCommand extends BaseLintCommand
|
|||||||
public function __construct($name = null, $directoryIteratorProvider = null, $isReadableProvider = null)
|
public function __construct($name = null, $directoryIteratorProvider = null, $isReadableProvider = null)
|
||||||
{
|
{
|
||||||
if (func_num_args()) {
|
if (func_num_args()) {
|
||||||
@trigger_error(sprintf('Passing a constructor argument in "%s" is deprecated since Symfony 3.4 and will be removed in 4.0. If the command was registered by convention, make it a service instead.', __METHOD__), E_USER_DEPRECATED);
|
@trigger_error(sprintf('Passing a constructor argument in "%s()" is deprecated since Symfony 3.4 and will be removed in 4.0. If the command was registered by convention, make it a service instead.', __METHOD__), E_USER_DEPRECATED);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (null === $directoryIteratorProvider) {
|
if (null === $directoryIteratorProvider) {
|
||||||
|
@ -28,7 +28,7 @@ class YamlLintCommand extends BaseLintCommand
|
|||||||
public function __construct($name = null, $directoryIteratorProvider = null, $isReadableProvider = null)
|
public function __construct($name = null, $directoryIteratorProvider = null, $isReadableProvider = null)
|
||||||
{
|
{
|
||||||
if (func_num_args()) {
|
if (func_num_args()) {
|
||||||
@trigger_error(sprintf('Passing a constructor argument in "%s" is deprecated since Symfony 3.4 and will be removed in 4.0. If the command was registered by convention, make it a service instead.', __METHOD__), E_USER_DEPRECATED);
|
@trigger_error(sprintf('Passing a constructor argument in "%s()" is deprecated since Symfony 3.4 and will be removed in 4.0. If the command was registered by convention, make it a service instead.', __METHOD__), E_USER_DEPRECATED);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (null === $directoryIteratorProvider) {
|
if (null === $directoryIteratorProvider) {
|
||||||
|
@ -45,7 +45,7 @@ class TranslatorTest extends TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @group legacy
|
* @group legacy
|
||||||
* @expectedDeprecation Method Symfony\Bundle\FrameworkBundle\Translation\Translator::__construct() takes the default locale as 3rd argument since Symfony 3.3. Not passing it is deprecated and will trigger an error in 4.0.
|
* @expectedDeprecation The "Symfony\Bundle\FrameworkBundle\Translation\Translator::__construct()" method takes the default locale as the 3rd argument since Symfony 3.3. Not passing it is deprecated and will trigger an error in 4.0.
|
||||||
*/
|
*/
|
||||||
public function testTransWithoutCachingOmittingLocale()
|
public function testTransWithoutCachingOmittingLocale()
|
||||||
{
|
{
|
||||||
@ -66,7 +66,7 @@ class TranslatorTest extends TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @group legacy
|
* @group legacy
|
||||||
* @expectedDeprecation Method Symfony\Bundle\FrameworkBundle\Translation\Translator::__construct() takes the default locale as 3rd argument since Symfony 3.3. Not passing it is deprecated and will trigger an error in 4.0.
|
* @expectedDeprecation The "Symfony\Bundle\FrameworkBundle\Translation\Translator::__construct()" method takes the default locale as the 3rd argument since Symfony 3.3. Not passing it is deprecated and will trigger an error in 4.0.
|
||||||
*/
|
*/
|
||||||
public function testTransWithCachingOmittingLocale()
|
public function testTransWithCachingOmittingLocale()
|
||||||
{
|
{
|
||||||
@ -106,7 +106,7 @@ class TranslatorTest extends TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @group legacy
|
* @group legacy
|
||||||
* @expectedDeprecation Method Symfony\Bundle\FrameworkBundle\Translation\Translator::__construct() takes the default locale as 3rd argument since Symfony 3.3. Not passing it is deprecated and will trigger an error in 4.0.
|
* @expectedDeprecation The "Symfony\Bundle\FrameworkBundle\Translation\Translator::__construct()" method takes the default locale as the 3rd argument since Symfony 3.3. Not passing it is deprecated and will trigger an error in 4.0.
|
||||||
* @expectedException \InvalidArgumentException
|
* @expectedException \InvalidArgumentException
|
||||||
*/
|
*/
|
||||||
public function testTransWithCachingWithInvalidLocaleOmittingLocale()
|
public function testTransWithCachingWithInvalidLocaleOmittingLocale()
|
||||||
@ -119,7 +119,7 @@ class TranslatorTest extends TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @group legacy
|
* @group legacy
|
||||||
* @expectedDeprecation Method Symfony\Bundle\FrameworkBundle\Translation\Translator::__construct() takes the default locale as 3rd argument since Symfony 3.3. Not passing it is deprecated and will trigger an error in 4.0.
|
* @expectedDeprecation The "Symfony\Bundle\FrameworkBundle\Translation\Translator::__construct()" method takes the default locale as the 3rd argument since Symfony 3.3. Not passing it is deprecated and will trigger an error in 4.0.
|
||||||
*/
|
*/
|
||||||
public function testLoadResourcesWithoutCachingOmittingLocale()
|
public function testLoadResourcesWithoutCachingOmittingLocale()
|
||||||
{
|
{
|
||||||
@ -138,7 +138,7 @@ class TranslatorTest extends TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @group legacy
|
* @group legacy
|
||||||
* @expectedDeprecation Method Symfony\Bundle\FrameworkBundle\Translation\Translator::__construct() takes the default locale as 3rd argument since Symfony 3.3. Not passing it is deprecated and will trigger an error in 4.0.
|
* @expectedDeprecation The "Symfony\Bundle\FrameworkBundle\Translation\Translator::__construct()" method takes the default locale as the 3rd argument since Symfony 3.3. Not passing it is deprecated and will trigger an error in 4.0.
|
||||||
*/
|
*/
|
||||||
public function testGetDefaultLocaleOmittingLocale()
|
public function testGetDefaultLocaleOmittingLocale()
|
||||||
{
|
{
|
||||||
@ -167,7 +167,7 @@ class TranslatorTest extends TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @group legacy
|
* @group legacy
|
||||||
* @expectedDeprecation Method Symfony\Bundle\FrameworkBundle\Translation\Translator::__construct() takes the default locale as 3rd argument since Symfony 3.3. Not passing it is deprecated and will trigger an error in 4.0.
|
* @expectedDeprecation The "Symfony\Bundle\FrameworkBundle\Translation\Translator::__construct()" method takes the default locale as the 3rd argument since Symfony 3.3. Not passing it is deprecated and will trigger an error in 4.0.
|
||||||
*/
|
*/
|
||||||
public function testWarmupOmittingLocale()
|
public function testWarmupOmittingLocale()
|
||||||
{
|
{
|
||||||
|
@ -75,7 +75,7 @@ class Translator extends BaseTranslator implements WarmableInterface
|
|||||||
$options = $loaderIds;
|
$options = $loaderIds;
|
||||||
$loaderIds = $defaultLocale;
|
$loaderIds = $defaultLocale;
|
||||||
$defaultLocale = $container->getParameter('kernel.default_locale');
|
$defaultLocale = $container->getParameter('kernel.default_locale');
|
||||||
@trigger_error(sprintf('Method %s() takes the default locale as 3rd argument since Symfony 3.3. Not passing it is deprecated and will trigger an error in 4.0.', __METHOD__), E_USER_DEPRECATED);
|
@trigger_error(sprintf('The "%s()" method takes the default locale as the 3rd argument since Symfony 3.3. Not passing it is deprecated and will trigger an error in 4.0.', __METHOD__), E_USER_DEPRECATED);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->container = $container;
|
$this->container = $container;
|
||||||
|
@ -42,7 +42,7 @@ class UserPasswordEncoderCommand extends ContainerAwareCommand
|
|||||||
public function __construct(EncoderFactoryInterface $encoderFactory = null, array $userClasses = array())
|
public function __construct(EncoderFactoryInterface $encoderFactory = null, array $userClasses = array())
|
||||||
{
|
{
|
||||||
if (null === $encoderFactory) {
|
if (null === $encoderFactory) {
|
||||||
@trigger_error(sprintf('Passing null as the first argument of "%s" is deprecated since Symfony 3.3 and will be removed in 4.0. If the command was registered by convention, make it a service instead.', __METHOD__), E_USER_DEPRECATED);
|
@trigger_error(sprintf('Passing null as the first argument of "%s()" is deprecated since Symfony 3.3 and support for it will be removed in 4.0. If the command was registered by convention, make it a service instead.', __METHOD__), E_USER_DEPRECATED);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->encoderFactory = $encoderFactory;
|
$this->encoderFactory = $encoderFactory;
|
||||||
|
@ -55,7 +55,7 @@ class FirewallContext
|
|||||||
*/
|
*/
|
||||||
public function getContext()
|
public function getContext()
|
||||||
{
|
{
|
||||||
@trigger_error(sprintf('Method %s() is deprecated since Symfony 3.3 and will be removed in 4.0. Use %s::getListeners/getExceptionListener() instead.', __METHOD__, __CLASS__), E_USER_DEPRECATED);
|
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 3.3 and will be removed in 4.0. Use %s::getListeners/getExceptionListener() instead.', __METHOD__, __CLASS__), E_USER_DEPRECATED);
|
||||||
|
|
||||||
return array($this->getListeners(), $this->getExceptionListener(), $this->getLogoutListener());
|
return array($this->getListeners(), $this->getExceptionListener(), $this->getLogoutListener());
|
||||||
}
|
}
|
||||||
|
@ -231,7 +231,7 @@ EOTXT
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @group legacy
|
* @group legacy
|
||||||
* @expectedDeprecation Passing null as the first argument of "Symfony\Bundle\SecurityBundle\Command\UserPasswordEncoderCommand::__construct" is deprecated since Symfony 3.3 and will be removed in 4.0. If the command was registered by convention, make it a service instead.
|
* @expectedDeprecation Passing null as the first argument of "Symfony\Bundle\SecurityBundle\Command\UserPasswordEncoderCommand::__construct()" is deprecated since Symfony 3.3 and support for it will be removed in 4.0. If the command was registered by convention, make it a service instead.
|
||||||
*/
|
*/
|
||||||
public function testLegacy()
|
public function testLegacy()
|
||||||
{
|
{
|
||||||
|
@ -41,7 +41,7 @@ class FirewallContextTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @expectedDeprecation Method Symfony\Bundle\SecurityBundle\Security\FirewallContext::getContext() is deprecated since Symfony 3.3 and will be removed in 4.0. Use Symfony\Bundle\SecurityBundle\Security\FirewallContext::getListeners/getExceptionListener() instead.
|
* @expectedDeprecation The "Symfony\Bundle\SecurityBundle\Security\FirewallContext::getContext()" method is deprecated since Symfony 3.3 and will be removed in 4.0. Use Symfony\Bundle\SecurityBundle\Security\FirewallContext::getListeners/getExceptionListener() instead.
|
||||||
* @group legacy
|
* @group legacy
|
||||||
*/
|
*/
|
||||||
public function testGetContext()
|
public function testGetContext()
|
||||||
|
@ -807,7 +807,7 @@ class Application
|
|||||||
*/
|
*/
|
||||||
protected function getTerminalWidth()
|
protected function getTerminalWidth()
|
||||||
{
|
{
|
||||||
@trigger_error(sprintf('%s is deprecated as of 3.2 and will be removed in 4.0. Create a Terminal instance instead.', __METHOD__), E_USER_DEPRECATED);
|
@trigger_error(sprintf('The "%s()" method is deprecated as of 3.2 and will be removed in 4.0. Create a Terminal instance instead.', __METHOD__), E_USER_DEPRECATED);
|
||||||
|
|
||||||
return $this->terminal->getWidth();
|
return $this->terminal->getWidth();
|
||||||
}
|
}
|
||||||
@ -821,7 +821,7 @@ class Application
|
|||||||
*/
|
*/
|
||||||
protected function getTerminalHeight()
|
protected function getTerminalHeight()
|
||||||
{
|
{
|
||||||
@trigger_error(sprintf('%s is deprecated as of 3.2 and will be removed in 4.0. Create a Terminal instance instead.', __METHOD__), E_USER_DEPRECATED);
|
@trigger_error(sprintf('The "%s()" method is deprecated as of 3.2 and will be removed in 4.0. Create a Terminal instance instead.', __METHOD__), E_USER_DEPRECATED);
|
||||||
|
|
||||||
return $this->terminal->getHeight();
|
return $this->terminal->getHeight();
|
||||||
}
|
}
|
||||||
@ -835,7 +835,7 @@ class Application
|
|||||||
*/
|
*/
|
||||||
public function getTerminalDimensions()
|
public function getTerminalDimensions()
|
||||||
{
|
{
|
||||||
@trigger_error(sprintf('%s is deprecated as of 3.2 and will be removed in 4.0. Create a Terminal instance instead.', __METHOD__), E_USER_DEPRECATED);
|
@trigger_error(sprintf('The "%s()" method is deprecated as of 3.2 and will be removed in 4.0. Create a Terminal instance instead.', __METHOD__), E_USER_DEPRECATED);
|
||||||
|
|
||||||
return array($this->terminal->getWidth(), $this->terminal->getHeight());
|
return array($this->terminal->getWidth(), $this->terminal->getHeight());
|
||||||
}
|
}
|
||||||
@ -854,7 +854,7 @@ class Application
|
|||||||
*/
|
*/
|
||||||
public function setTerminalDimensions($width, $height)
|
public function setTerminalDimensions($width, $height)
|
||||||
{
|
{
|
||||||
@trigger_error(sprintf('%s is deprecated as of 3.2 and will be removed in 4.0. Set the COLUMNS and LINES env vars instead.', __METHOD__), E_USER_DEPRECATED);
|
@trigger_error(sprintf('The "%s()" method is deprecated as of 3.2 and will be removed in 4.0. Set the COLUMNS and LINES env vars instead.', __METHOD__), E_USER_DEPRECATED);
|
||||||
|
|
||||||
putenv('COLUMNS='.$width);
|
putenv('COLUMNS='.$width);
|
||||||
putenv('LINES='.$height);
|
putenv('LINES='.$height);
|
||||||
|
@ -95,7 +95,7 @@ class TimezoneType extends AbstractType implements ChoiceLoaderInterface
|
|||||||
*/
|
*/
|
||||||
public function loadChoiceList($value = null)
|
public function loadChoiceList($value = null)
|
||||||
{
|
{
|
||||||
@trigger_error(sprintf('Method "%s" is deprecated since Symfony 3.4 and will be removed in 4.0.', __METHOD__), E_USER_DEPRECATED);
|
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 3.4 and will be removed in 4.0.', __METHOD__), E_USER_DEPRECATED);
|
||||||
|
|
||||||
if (null !== $this->choiceList) {
|
if (null !== $this->choiceList) {
|
||||||
return $this->choiceList;
|
return $this->choiceList;
|
||||||
@ -111,7 +111,7 @@ class TimezoneType extends AbstractType implements ChoiceLoaderInterface
|
|||||||
*/
|
*/
|
||||||
public function loadChoicesForValues(array $values, $value = null)
|
public function loadChoicesForValues(array $values, $value = null)
|
||||||
{
|
{
|
||||||
@trigger_error(sprintf('Method "%s" is deprecated since Symfony 3.4 and will be removed in 4.0.', __METHOD__), E_USER_DEPRECATED);
|
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 3.4 and will be removed in 4.0.', __METHOD__), E_USER_DEPRECATED);
|
||||||
|
|
||||||
// Optimize
|
// Optimize
|
||||||
$values = array_filter($values);
|
$values = array_filter($values);
|
||||||
@ -134,7 +134,7 @@ class TimezoneType extends AbstractType implements ChoiceLoaderInterface
|
|||||||
*/
|
*/
|
||||||
public function loadValuesForChoices(array $choices, $value = null)
|
public function loadValuesForChoices(array $choices, $value = null)
|
||||||
{
|
{
|
||||||
@trigger_error(sprintf('Method "%s" is deprecated since Symfony 3.4 and will be removed in 4.0.', __METHOD__), E_USER_DEPRECATED);
|
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 3.4 and will be removed in 4.0.', __METHOD__), E_USER_DEPRECATED);
|
||||||
|
|
||||||
// Optimize
|
// Optimize
|
||||||
$choices = array_filter($choices);
|
$choices = array_filter($choices);
|
||||||
|
@ -101,7 +101,7 @@ class ControllerResolver implements ArgumentResolverInterface, ControllerResolve
|
|||||||
*/
|
*/
|
||||||
public function getArguments(Request $request, $controller)
|
public function getArguments(Request $request, $controller)
|
||||||
{
|
{
|
||||||
@trigger_error(sprintf('%s is deprecated as of 3.1 and will be removed in 4.0. Implement the %s and inject it in the HttpKernel instead.', __METHOD__, ArgumentResolverInterface::class), E_USER_DEPRECATED);
|
@trigger_error(sprintf('The "%s()" method is deprecated as of 3.1 and will be removed in 4.0. Implement the %s and inject it in the HttpKernel instead.', __METHOD__, ArgumentResolverInterface::class), E_USER_DEPRECATED);
|
||||||
|
|
||||||
if (is_array($controller)) {
|
if (is_array($controller)) {
|
||||||
$r = new \ReflectionMethod($controller[0], $controller[1]);
|
$r = new \ReflectionMethod($controller[0], $controller[1]);
|
||||||
@ -126,7 +126,7 @@ class ControllerResolver implements ArgumentResolverInterface, ControllerResolve
|
|||||||
*/
|
*/
|
||||||
protected function doGetArguments(Request $request, $controller, array $parameters)
|
protected function doGetArguments(Request $request, $controller, array $parameters)
|
||||||
{
|
{
|
||||||
@trigger_error(sprintf('%s is deprecated as of 3.1 and will be removed in 4.0. Implement the %s and inject it in the HttpKernel instead.', __METHOD__, ArgumentResolverInterface::class), E_USER_DEPRECATED);
|
@trigger_error(sprintf('The "%s()" method is deprecated as of 3.1 and will be removed in 4.0. Implement the %s and inject it in the HttpKernel instead.', __METHOD__, ArgumentResolverInterface::class), E_USER_DEPRECATED);
|
||||||
|
|
||||||
$attributes = $request->attributes->all();
|
$attributes = $request->attributes->all();
|
||||||
$arguments = array();
|
$arguments = array();
|
||||||
|
@ -60,7 +60,7 @@ class TraceableControllerResolver implements ControllerResolverInterface, Argume
|
|||||||
*/
|
*/
|
||||||
public function getArguments(Request $request, $controller)
|
public function getArguments(Request $request, $controller)
|
||||||
{
|
{
|
||||||
@trigger_error(sprintf('The %s method is deprecated as of 3.1 and will be removed in 4.0. Please use the %s instead.', __METHOD__, TraceableArgumentResolver::class), E_USER_DEPRECATED);
|
@trigger_error(sprintf('The "%s()" method is deprecated as of 3.1 and will be removed in 4.0. Please use the %s instead.', __METHOD__, TraceableArgumentResolver::class), E_USER_DEPRECATED);
|
||||||
|
|
||||||
$ret = $this->argumentResolver->getArguments($request, $controller);
|
$ret = $this->argumentResolver->getArguments($request, $controller);
|
||||||
|
|
||||||
|
@ -232,7 +232,7 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!$first && !$noDeprecation) {
|
if (!$first && !$noDeprecation) {
|
||||||
@trigger_error(sprintf('Passing "false" as the second argument to %s() is deprecated as of 3.4 and will be removed in 4.0.', __METHOD__), E_USER_DEPRECATED);
|
@trigger_error(sprintf('Passing "false" as the second argument to "%s()" is deprecated as of 3.4 and will be removed in 4.0.', __METHOD__), E_USER_DEPRECATED);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isset($this->bundleMap[$name])) {
|
if (!isset($this->bundleMap[$name])) {
|
||||||
@ -734,7 +734,7 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl
|
|||||||
protected function getEnvParameters()
|
protected function getEnvParameters()
|
||||||
{
|
{
|
||||||
if (0 === func_num_args() || func_get_arg(0)) {
|
if (0 === func_num_args() || func_get_arg(0)) {
|
||||||
@trigger_error(sprintf('The %s() method is deprecated as of 3.3 and will be removed in 4.0. Use the %%env()%% syntax to get the value of any environment variable from configuration files instead.', __METHOD__), E_USER_DEPRECATED);
|
@trigger_error(sprintf('The "%s()" method is deprecated as of 3.3 and will be removed in 4.0. Use the %%env()%% syntax to get the value of any environment variable from configuration files instead.', __METHOD__), E_USER_DEPRECATED);
|
||||||
}
|
}
|
||||||
|
|
||||||
$parameters = array();
|
$parameters = array();
|
||||||
|
@ -809,7 +809,7 @@ EOF;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @group legacy
|
* @group legacy
|
||||||
* @expectedDeprecation The Symfony\Component\HttpKernel\Kernel::getEnvParameters() method is deprecated as of 3.3 and will be removed in 4.0. Use the %cenv()%c syntax to get the value of any environment variable from configuration files instead.
|
* @expectedDeprecation The "Symfony\Component\HttpKernel\Kernel::getEnvParameters()" method is deprecated as of 3.3 and will be removed in 4.0. Use the %cenv()%c syntax to get the value of any environment variable from configuration files instead.
|
||||||
* @expectedDeprecation The support of special environment variables that start with SYMFONY__ (such as "SYMFONY__FOO__BAR") is deprecated as of 3.3 and will be removed in 4.0. Use the %cenv()%c syntax instead to get the value of environment variables in configuration files.
|
* @expectedDeprecation The support of special environment variables that start with SYMFONY__ (such as "SYMFONY__FOO__BAR") is deprecated as of 3.3 and will be removed in 4.0. Use the %cenv()%c syntax instead to get the value of environment variables in configuration files.
|
||||||
*/
|
*/
|
||||||
public function testSymfonyEnvironmentVariables()
|
public function testSymfonyEnvironmentVariables()
|
||||||
|
@ -56,7 +56,7 @@ class LogoutUrlGenerator
|
|||||||
if (__CLASS__ !== get_class($this)) {
|
if (__CLASS__ !== get_class($this)) {
|
||||||
$r = new \ReflectionMethod($this, __FUNCTION__);
|
$r = new \ReflectionMethod($this, __FUNCTION__);
|
||||||
if (__CLASS__ !== $r->getDeclaringClass()->getName()) {
|
if (__CLASS__ !== $r->getDeclaringClass()->getName()) {
|
||||||
@trigger_error(sprintf('Method %s() will have a sixth `string $context = null` argument in version 4.0. Not defining it is deprecated since Symfony 3.3.', __METHOD__), E_USER_DEPRECATED);
|
@trigger_error(sprintf('The "%s()" method will have a 6th `string $context = null` argument in version 4.0. Not defining it is deprecated since Symfony 3.3.', __METHOD__), E_USER_DEPRECATED);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -196,7 +196,7 @@ class Serializer implements SerializerInterface, NormalizerInterface, Denormaliz
|
|||||||
if (__CLASS__ !== \get_class($this)) {
|
if (__CLASS__ !== \get_class($this)) {
|
||||||
$r = new \ReflectionMethod($this, __FUNCTION__);
|
$r = new \ReflectionMethod($this, __FUNCTION__);
|
||||||
if (__CLASS__ !== $r->getDeclaringClass()->getName()) {
|
if (__CLASS__ !== $r->getDeclaringClass()->getName()) {
|
||||||
@trigger_error(sprintf('Method %s() will have a third `$context = array()` argument in version 4.0. Not defining it is deprecated since Symfony 3.3.', __METHOD__), E_USER_DEPRECATED);
|
@trigger_error(sprintf('The "%s()" method will have a third `$context = array()` argument in version 4.0. Not defining it is deprecated since Symfony 3.3.', __METHOD__), E_USER_DEPRECATED);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -217,7 +217,7 @@ class Serializer implements SerializerInterface, NormalizerInterface, Denormaliz
|
|||||||
if (__CLASS__ !== \get_class($this)) {
|
if (__CLASS__ !== \get_class($this)) {
|
||||||
$r = new \ReflectionMethod($this, __FUNCTION__);
|
$r = new \ReflectionMethod($this, __FUNCTION__);
|
||||||
if (__CLASS__ !== $r->getDeclaringClass()->getName()) {
|
if (__CLASS__ !== $r->getDeclaringClass()->getName()) {
|
||||||
@trigger_error(sprintf('Method %s() will have a fourth `$context = array()` argument in version 4.0. Not defining it is deprecated since Symfony 3.3.', __METHOD__), E_USER_DEPRECATED);
|
@trigger_error(sprintf('The "%s()" method will have a fourth `$context = array()` argument in version 4.0. Not defining it is deprecated since Symfony 3.3.', __METHOD__), E_USER_DEPRECATED);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -291,7 +291,7 @@ class Serializer implements SerializerInterface, NormalizerInterface, Denormaliz
|
|||||||
if (__CLASS__ !== \get_class($this)) {
|
if (__CLASS__ !== \get_class($this)) {
|
||||||
$r = new \ReflectionMethod($this, __FUNCTION__);
|
$r = new \ReflectionMethod($this, __FUNCTION__);
|
||||||
if (__CLASS__ !== $r->getDeclaringClass()->getName()) {
|
if (__CLASS__ !== $r->getDeclaringClass()->getName()) {
|
||||||
@trigger_error(sprintf('Method %s() will have a second `$context = array()` argument in version 4.0. Not defining it is deprecated since Symfony 3.3.', __METHOD__), E_USER_DEPRECATED);
|
@trigger_error(sprintf('The "%s()" method will have a second `$context = array()` argument in version 4.0. Not defining it is deprecated since Symfony 3.3.', __METHOD__), E_USER_DEPRECATED);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -312,7 +312,7 @@ class Serializer implements SerializerInterface, NormalizerInterface, Denormaliz
|
|||||||
if (__CLASS__ !== \get_class($this)) {
|
if (__CLASS__ !== \get_class($this)) {
|
||||||
$r = new \ReflectionMethod($this, __FUNCTION__);
|
$r = new \ReflectionMethod($this, __FUNCTION__);
|
||||||
if (__CLASS__ !== $r->getDeclaringClass()->getName()) {
|
if (__CLASS__ !== $r->getDeclaringClass()->getName()) {
|
||||||
@trigger_error(sprintf('Method %s() will have a second `$context = array()` argument in version 4.0. Not defining it is deprecated since Symfony 3.3.', __METHOD__), E_USER_DEPRECATED);
|
@trigger_error(sprintf('The "%s()" method will have a second `$context = array()` argument in version 4.0. Not defining it is deprecated since Symfony 3.3.', __METHOD__), E_USER_DEPRECATED);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ class TranslatorPass implements CompilerPassInterface
|
|||||||
public function __construct($translatorServiceId = 'translator.default', $readerServiceId = 'translation.loader', $loaderTag = 'translation.loader', $debugCommandServiceId = 'console.command.translation_debug', $updateCommandServiceId = 'console.command.translation_update')
|
public function __construct($translatorServiceId = 'translator.default', $readerServiceId = 'translation.loader', $loaderTag = 'translation.loader', $debugCommandServiceId = 'console.command.translation_debug', $updateCommandServiceId = 'console.command.translation_update')
|
||||||
{
|
{
|
||||||
if ('translation.loader' === $readerServiceId && 2 > func_num_args()) {
|
if ('translation.loader' === $readerServiceId && 2 > func_num_args()) {
|
||||||
@trigger_error('The default value for $readerServiceId will change in 4.0 to "translation.reader".', E_USER_DEPRECATED);
|
@trigger_error(sprintf('The default value for $readerServiceId in "%s()" will change in 4.0 to "translation.reader".', __METHOD__), E_USER_DEPRECATED);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->translatorServiceId = $translatorServiceId;
|
$this->translatorServiceId = $translatorServiceId;
|
||||||
|
@ -57,7 +57,7 @@ class TranslationPassTest extends TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @group legacy
|
* @group legacy
|
||||||
* @expectedDeprecation The default value for $readerServiceId will change in 4.0 to "translation.reader".
|
* @expectedDeprecation The default value for $readerServiceId in "Symfony\Component\Translation\DependencyInjection\TranslatorPass::__construct()" will change in 4.0 to "translation.reader".
|
||||||
*
|
*
|
||||||
* A test that verifies the deprecated "translation.loader" gets the LoaderInterfaces added.
|
* A test that verifies the deprecated "translation.loader" gets the LoaderInterfaces added.
|
||||||
*
|
*
|
||||||
|
@ -20,7 +20,7 @@ class TranslationWriterTest extends TestCase
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @group legacy
|
* @group legacy
|
||||||
* @expectedDeprecation Method Symfony\Component\Translation\Writer\TranslationWriter::writeTranslations() is deprecated since Symfony 3.4 and will be removed in 4.0. Use write() instead.
|
* @expectedDeprecation The "Symfony\Component\Translation\Writer\TranslationWriter::writeTranslations()" method is deprecated since Symfony 3.4 and will be removed in 4.0. Use write() instead.
|
||||||
*/
|
*/
|
||||||
public function testWriteTranslations()
|
public function testWriteTranslations()
|
||||||
{
|
{
|
||||||
|
@ -87,7 +87,7 @@ class Translator implements TranslatorInterface, TranslatorBagInterface
|
|||||||
|
|
||||||
if ($formatter instanceof MessageSelector) {
|
if ($formatter instanceof MessageSelector) {
|
||||||
$formatter = new MessageFormatter($formatter);
|
$formatter = new MessageFormatter($formatter);
|
||||||
@trigger_error(sprintf('Passing a "%s" instance into the "%s" as a second argument is deprecated since Symfony 3.4 and will be removed in 4.0. Inject a "%s" implementation instead.', MessageSelector::class, __METHOD__, MessageFormatterInterface::class), E_USER_DEPRECATED);
|
@trigger_error(sprintf('Passing a "%s" instance into the "%s()" method as a second argument is deprecated since Symfony 3.4 and will be removed in 4.0. Inject a "%s" implementation instead.', MessageSelector::class, __METHOD__, MessageFormatterInterface::class), E_USER_DEPRECATED);
|
||||||
} elseif (null === $formatter) {
|
} elseif (null === $formatter) {
|
||||||
$formatter = new MessageFormatter();
|
$formatter = new MessageFormatter();
|
||||||
}
|
}
|
||||||
|
@ -97,7 +97,7 @@ class TranslationWriter implements TranslationWriterInterface
|
|||||||
*/
|
*/
|
||||||
public function writeTranslations(MessageCatalogue $catalogue, $format, $options = array())
|
public function writeTranslations(MessageCatalogue $catalogue, $format, $options = array())
|
||||||
{
|
{
|
||||||
@trigger_error(sprintf('Method %s() is deprecated since Symfony 3.4 and will be removed in 4.0. Use write() instead.', __METHOD__), E_USER_DEPRECATED);
|
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 3.4 and will be removed in 4.0. Use write() instead.', __METHOD__), E_USER_DEPRECATED);
|
||||||
$this->write($catalogue, $format, $options);
|
$this->write($catalogue, $format, $options);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -49,7 +49,7 @@ class Caster
|
|||||||
public static function castObject($obj, $class, $hasDebugInfo = false)
|
public static function castObject($obj, $class, $hasDebugInfo = false)
|
||||||
{
|
{
|
||||||
if ($class instanceof \ReflectionClass) {
|
if ($class instanceof \ReflectionClass) {
|
||||||
@trigger_error(sprintf('Passing a ReflectionClass to %s() is deprecated since Symfony 3.3 and will be unsupported in 4.0. Pass the class name as string instead.', __METHOD__), E_USER_DEPRECATED);
|
@trigger_error(sprintf('Passing a ReflectionClass to "%s()" is deprecated since Symfony 3.3 and will be unsupported in 4.0. Pass the class name as string instead.', __METHOD__), E_USER_DEPRECATED);
|
||||||
$hasDebugInfo = $class->hasMethod('__debugInfo');
|
$hasDebugInfo = $class->hasMethod('__debugInfo');
|
||||||
$class = $class->name;
|
$class = $class->name;
|
||||||
}
|
}
|
||||||
|
@ -172,7 +172,7 @@ class Data implements \ArrayAccess, \Countable, \IteratorAggregate
|
|||||||
*/
|
*/
|
||||||
public function getRawData()
|
public function getRawData()
|
||||||
{
|
{
|
||||||
@trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the array or object access instead.', __METHOD__));
|
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the array or object access instead.', __METHOD__));
|
||||||
|
|
||||||
return $this->data;
|
return $this->data;
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,7 @@ trait VarDumperTestTrait
|
|||||||
public function assertDumpEquals($dump, $data, $filter = 0, $message = '')
|
public function assertDumpEquals($dump, $data, $filter = 0, $message = '')
|
||||||
{
|
{
|
||||||
if (is_string($filter)) {
|
if (is_string($filter)) {
|
||||||
@trigger_error(sprintf('The $message argument of the "%s()" method at 3rd position is deprecated since Symfony 3.4 and will be moved at 4th position in 4.0.', __METHOD__), E_USER_DEPRECATED);
|
@trigger_error(sprintf('The $message argument of the "%s()" method at the 3rd position is deprecated since Symfony 3.4 and will be moved at the 4th position in 4.0.', __METHOD__), E_USER_DEPRECATED);
|
||||||
$message = $filter;
|
$message = $filter;
|
||||||
$filter = 0;
|
$filter = 0;
|
||||||
}
|
}
|
||||||
@ -33,7 +33,7 @@ trait VarDumperTestTrait
|
|||||||
public function assertDumpMatchesFormat($dump, $data, $filter = 0, $message = '')
|
public function assertDumpMatchesFormat($dump, $data, $filter = 0, $message = '')
|
||||||
{
|
{
|
||||||
if (is_string($filter)) {
|
if (is_string($filter)) {
|
||||||
@trigger_error(sprintf('The $message argument of the "%s()" method at 3rd position is deprecated since Symfony 3.4 and will be moved at 4th position in 4.0.', __METHOD__), E_USER_DEPRECATED);
|
@trigger_error(sprintf('The $message argument of the "%s()" method at the 3rd position is deprecated since Symfony 3.4 and will be moved at the 4th position in 4.0.', __METHOD__), E_USER_DEPRECATED);
|
||||||
$message = $filter;
|
$message = $filter;
|
||||||
$filter = 0;
|
$filter = 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user