improve deprecation messages
This commit is contained in:
parent
d40fed9253
commit
e4ae5a4ca9
@ -110,7 +110,7 @@ class TableStyle
|
||||
*/
|
||||
public function setHorizontalBorderChar($horizontalBorderChar)
|
||||
{
|
||||
@trigger_error(sprintf('Method %s() is deprecated since Symfony 4.1, use setHorizontalBorderChars() instead.', __METHOD__), E_USER_DEPRECATED);
|
||||
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.1, use setHorizontalBorderChars() instead.', __METHOD__), E_USER_DEPRECATED);
|
||||
|
||||
return $this->setHorizontalBorderChars($horizontalBorderChar, $horizontalBorderChar);
|
||||
}
|
||||
@ -124,7 +124,7 @@ class TableStyle
|
||||
*/
|
||||
public function getHorizontalBorderChar()
|
||||
{
|
||||
@trigger_error(sprintf('Method %s() is deprecated since Symfony 4.1, use getBorderChars() instead.', __METHOD__), E_USER_DEPRECATED);
|
||||
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.1, use getBorderChars() instead.', __METHOD__), E_USER_DEPRECATED);
|
||||
|
||||
return $this->horizontalOutsideBorderChar;
|
||||
}
|
||||
@ -166,7 +166,7 @@ class TableStyle
|
||||
*/
|
||||
public function setVerticalBorderChar($verticalBorderChar)
|
||||
{
|
||||
@trigger_error(sprintf('Method %s() is deprecated since Symfony 4.1, use setVerticalBorderChars() instead.', __METHOD__), E_USER_DEPRECATED);
|
||||
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.1, use setVerticalBorderChars() instead.', __METHOD__), E_USER_DEPRECATED);
|
||||
|
||||
return $this->setVerticalBorderChars($verticalBorderChar, $verticalBorderChar);
|
||||
}
|
||||
@ -180,7 +180,7 @@ class TableStyle
|
||||
*/
|
||||
public function getVerticalBorderChar()
|
||||
{
|
||||
@trigger_error(sprintf('Method %s() is deprecated since Symfony 4.1, use getBorderChars() instead.', __METHOD__), E_USER_DEPRECATED);
|
||||
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.1, use getBorderChars() instead.', __METHOD__), E_USER_DEPRECATED);
|
||||
|
||||
return $this->verticalOutsideBorderChar;
|
||||
}
|
||||
@ -268,7 +268,7 @@ class TableStyle
|
||||
*/
|
||||
public function setCrossingChar($crossingChar)
|
||||
{
|
||||
@trigger_error(sprintf('Method %s() is deprecated since Symfony 4.1. Use setDefaultCrossingChar() instead.', __METHOD__), E_USER_DEPRECATED);
|
||||
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.1. Use setDefaultCrossingChar() instead.', __METHOD__), E_USER_DEPRECATED);
|
||||
|
||||
return $this->setDefaultCrossingChar($crossingChar);
|
||||
}
|
||||
|
@ -186,7 +186,7 @@ class FlattenException
|
||||
*/
|
||||
public function setTraceFromException(\Exception $exception)
|
||||
{
|
||||
@trigger_error(sprintf('"%s" is deprecated since Symfony 4.1, use "setTraceFromThrowable()" instead.', __METHOD__), E_USER_DEPRECATED);
|
||||
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.1, use "setTraceFromThrowable()" instead.', __METHOD__), E_USER_DEPRECATED);
|
||||
|
||||
$this->setTraceFromThrowable($exception);
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ class TypedReference extends Reference
|
||||
public function __construct(string $id, string $type, $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE)
|
||||
{
|
||||
if (\is_string($invalidBehavior) || 3 < \func_num_args()) {
|
||||
@trigger_error(sprintf('The $requiringClass argument of "%s" is deprecated since Symfony 4.1.', __METHOD__), E_USER_DEPRECATED);
|
||||
@trigger_error(sprintf('The $requiringClass argument of "%s()" is deprecated since Symfony 4.1.', __METHOD__), E_USER_DEPRECATED);
|
||||
|
||||
$this->requiringClass = $invalidBehavior;
|
||||
$invalidBehavior = 3 < \func_num_args() ? \func_get_arg(3) : ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE;
|
||||
@ -48,7 +48,7 @@ class TypedReference extends Reference
|
||||
*/
|
||||
public function getRequiringClass()
|
||||
{
|
||||
@trigger_error(sprintf('The "%s" method is deprecated since Symfony 4.1.', __METHOD__), E_USER_DEPRECATED);
|
||||
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.1.', __METHOD__), E_USER_DEPRECATED);
|
||||
|
||||
return $this->requiringClass ?? '';
|
||||
}
|
||||
@ -58,7 +58,7 @@ class TypedReference extends Reference
|
||||
*/
|
||||
public function canBeAutoregistered()
|
||||
{
|
||||
@trigger_error(sprintf('The "%s" method is deprecated since Symfony 4.1.', __METHOD__), E_USER_DEPRECATED);
|
||||
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.1.', __METHOD__), E_USER_DEPRECATED);
|
||||
|
||||
return $this->requiringClass && (false !== $i = strpos($this->type, '\\')) && 0 === strncasecmp($this->type, $this->requiringClass, 1 + $i);
|
||||
}
|
||||
|
@ -77,7 +77,7 @@ class CountryType extends AbstractType implements ChoiceLoaderInterface
|
||||
*/
|
||||
public function loadChoiceList($value = null)
|
||||
{
|
||||
@trigger_error(sprintf('Method "%s" is deprecated since Symfony 4.1, use "choice_loader" option instead.', __METHOD__), E_USER_DEPRECATED);
|
||||
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.1, use the "choice_loader" option instead.', __METHOD__), E_USER_DEPRECATED);
|
||||
|
||||
if (null !== $this->choiceList) {
|
||||
return $this->choiceList;
|
||||
@ -93,7 +93,7 @@ class CountryType extends AbstractType implements ChoiceLoaderInterface
|
||||
*/
|
||||
public function loadChoicesForValues(array $values, $value = null)
|
||||
{
|
||||
@trigger_error(sprintf('Method "%s" is deprecated since Symfony 4.1, use "choice_loader" option instead.', __METHOD__), E_USER_DEPRECATED);
|
||||
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.1, use the "choice_loader" option instead.', __METHOD__), E_USER_DEPRECATED);
|
||||
|
||||
// Optimize
|
||||
$values = array_filter($values);
|
||||
@ -116,7 +116,7 @@ class CountryType extends AbstractType implements ChoiceLoaderInterface
|
||||
*/
|
||||
public function loadValuesForChoices(array $choices, $value = null)
|
||||
{
|
||||
@trigger_error(sprintf('Method "%s" is deprecated since Symfony 4.1, use "choice_loader" option instead.', __METHOD__), E_USER_DEPRECATED);
|
||||
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.1, use the "choice_loader" option instead.', __METHOD__), E_USER_DEPRECATED);
|
||||
|
||||
// Optimize
|
||||
$choices = array_filter($choices);
|
||||
|
@ -77,7 +77,7 @@ class CurrencyType extends AbstractType implements ChoiceLoaderInterface
|
||||
*/
|
||||
public function loadChoiceList($value = null)
|
||||
{
|
||||
@trigger_error(sprintf('Method "%s" is deprecated since Symfony 4.1, use "choice_loader" option instead.', __METHOD__), E_USER_DEPRECATED);
|
||||
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.1, use the "choice_loader" option instead.', __METHOD__), E_USER_DEPRECATED);
|
||||
|
||||
if (null !== $this->choiceList) {
|
||||
return $this->choiceList;
|
||||
@ -93,7 +93,7 @@ class CurrencyType extends AbstractType implements ChoiceLoaderInterface
|
||||
*/
|
||||
public function loadChoicesForValues(array $values, $value = null)
|
||||
{
|
||||
@trigger_error(sprintf('Method "%s" is deprecated since Symfony 4.1, use "choice_loader" option instead.', __METHOD__), E_USER_DEPRECATED);
|
||||
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.1, use the "choice_loader" option instead.', __METHOD__), E_USER_DEPRECATED);
|
||||
|
||||
// Optimize
|
||||
$values = array_filter($values);
|
||||
@ -116,7 +116,7 @@ class CurrencyType extends AbstractType implements ChoiceLoaderInterface
|
||||
*/
|
||||
public function loadValuesForChoices(array $choices, $value = null)
|
||||
{
|
||||
@trigger_error(sprintf('Method "%s" is deprecated since Symfony 4.1, use "choice_loader" option instead.', __METHOD__), E_USER_DEPRECATED);
|
||||
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.1, use the "choice_loader" option instead.', __METHOD__), E_USER_DEPRECATED);
|
||||
|
||||
// Optimize
|
||||
$choices = array_filter($choices);
|
||||
|
@ -77,7 +77,7 @@ class LanguageType extends AbstractType implements ChoiceLoaderInterface
|
||||
*/
|
||||
public function loadChoiceList($value = null)
|
||||
{
|
||||
@trigger_error(sprintf('Method "%s" is deprecated since Symfony 4.1, use "choice_loader" option instead.', __METHOD__), E_USER_DEPRECATED);
|
||||
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.1, use the "choice_loader" option instead.', __METHOD__), E_USER_DEPRECATED);
|
||||
|
||||
if (null !== $this->choiceList) {
|
||||
return $this->choiceList;
|
||||
@ -93,7 +93,7 @@ class LanguageType extends AbstractType implements ChoiceLoaderInterface
|
||||
*/
|
||||
public function loadChoicesForValues(array $values, $value = null)
|
||||
{
|
||||
@trigger_error(sprintf('Method "%s" is deprecated since Symfony 4.1, use "choice_loader" option instead.', __METHOD__), E_USER_DEPRECATED);
|
||||
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.1, use the "choice_loader" option instead.', __METHOD__), E_USER_DEPRECATED);
|
||||
|
||||
// Optimize
|
||||
$values = array_filter($values);
|
||||
@ -116,7 +116,7 @@ class LanguageType extends AbstractType implements ChoiceLoaderInterface
|
||||
*/
|
||||
public function loadValuesForChoices(array $choices, $value = null)
|
||||
{
|
||||
@trigger_error(sprintf('Method "%s" is deprecated since Symfony 4.1, use "choice_loader" option instead.', __METHOD__), E_USER_DEPRECATED);
|
||||
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.1, use the "choice_loader" option instead.', __METHOD__), E_USER_DEPRECATED);
|
||||
|
||||
// Optimize
|
||||
$choices = array_filter($choices);
|
||||
|
@ -77,7 +77,7 @@ class LocaleType extends AbstractType implements ChoiceLoaderInterface
|
||||
*/
|
||||
public function loadChoiceList($value = null)
|
||||
{
|
||||
@trigger_error(sprintf('Method "%s" is deprecated since Symfony 4.1, use "choice_loader" option instead.', __METHOD__), E_USER_DEPRECATED);
|
||||
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.1, use the "choice_loader" option instead.', __METHOD__), E_USER_DEPRECATED);
|
||||
|
||||
if (null !== $this->choiceList) {
|
||||
return $this->choiceList;
|
||||
@ -93,7 +93,7 @@ class LocaleType extends AbstractType implements ChoiceLoaderInterface
|
||||
*/
|
||||
public function loadChoicesForValues(array $values, $value = null)
|
||||
{
|
||||
@trigger_error(sprintf('Method "%s" is deprecated since Symfony 4.1, use "choice_loader" option instead.', __METHOD__), E_USER_DEPRECATED);
|
||||
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.1, use the "choice_loader" option instead.', __METHOD__), E_USER_DEPRECATED);
|
||||
|
||||
// Optimize
|
||||
$values = array_filter($values);
|
||||
@ -116,7 +116,7 @@ class LocaleType extends AbstractType implements ChoiceLoaderInterface
|
||||
*/
|
||||
public function loadValuesForChoices(array $choices, $value = null)
|
||||
{
|
||||
@trigger_error(sprintf('Method "%s" is deprecated since Symfony 4.1, use "choice_loader" option instead.', __METHOD__), E_USER_DEPRECATED);
|
||||
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.1, use the "choice_loader" option instead.', __METHOD__), E_USER_DEPRECATED);
|
||||
|
||||
// Optimize
|
||||
$choices = array_filter($choices);
|
||||
|
@ -158,7 +158,7 @@ class UploadedFile extends File
|
||||
*/
|
||||
public function getClientSize()
|
||||
{
|
||||
@trigger_error(sprintf('"%s" is deprecated since Symfony 4.1. Use getSize() instead.', __METHOD__), E_USER_DEPRECATED);
|
||||
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.1. Use getSize() instead.', __METHOD__), E_USER_DEPRECATED);
|
||||
|
||||
return $this->getSize();
|
||||
}
|
||||
|
@ -261,7 +261,7 @@ abstract class AbstractToken implements TokenInterface
|
||||
}
|
||||
|
||||
if ($this->user instanceof AdvancedUserInterface && $user instanceof AdvancedUserInterface) {
|
||||
@trigger_error(sprintf('Checking for the AdvancedUserInterface in %s has been deprecated in 4.1. Implement the %s to check if the user has been changed,', __METHOD__, EquatableInterface::class), E_USER_DEPRECATED);
|
||||
@trigger_error(sprintf('Checking for the AdvancedUserInterface in "%s()" is deprecated since Symfony 4.1 and support for it will be removed in 5.0. Implement the %s to check if the user has been changed,', __METHOD__, EquatableInterface::class), E_USER_DEPRECATED);
|
||||
if ($this->user->isAccountNonExpired() !== $user->isAccountNonExpired()) {
|
||||
return true;
|
||||
}
|
||||
@ -278,7 +278,7 @@ abstract class AbstractToken implements TokenInterface
|
||||
return true;
|
||||
}
|
||||
} elseif ($this->user instanceof AdvancedUserInterface xor $user instanceof AdvancedUserInterface) {
|
||||
@trigger_error(sprintf('Checking for the AdvancedUserInterface in %s has been deprecated in 4.1. Implement the %s to check if the user has been changed,', __METHOD__, EquatableInterface::class), E_USER_DEPRECATED);
|
||||
@trigger_error(sprintf('Checking for the AdvancedUserInterface in "%s()" is deprecated since Symfony 4.1 and support for it will be removed in 5.0. Implement the %s to check if the user has been changed,', __METHOD__, EquatableInterface::class), E_USER_DEPRECATED);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ class ExpressionVoter implements VoterInterface
|
||||
*/
|
||||
public function addExpressionLanguageProvider(ExpressionFunctionProviderInterface $provider)
|
||||
{
|
||||
@trigger_error(sprintf('The %s() method is deprecated since Symfony 4.1, register the provider directly on the injected ExpressionLanguage instance instead.', __METHOD__), E_USER_DEPRECATED);
|
||||
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.1, register the provider directly on the injected ExpressionLanguage instance instead.', __METHOD__), E_USER_DEPRECATED);
|
||||
|
||||
$this->expressionLanguage->registerProvider($provider);
|
||||
}
|
||||
|
@ -32,7 +32,7 @@ class UserCheckerTest extends TestCase
|
||||
|
||||
/**
|
||||
* @group legacy
|
||||
* @expectedDeprecation Calling Symfony\Component\Security\Core\User\UserChecker::checkPostAuth with an AdvancedUserInterface is deprecated since Symfony 4.1. Create a custom user checker if you wish to keep this functionality.
|
||||
* @expectedDeprecation Calling "Symfony\Component\Security\Core\User\UserChecker::checkPostAuth()" with an AdvancedUserInterface is deprecated since Symfony 4.1. Create a custom user checker if you wish to keep this functionality.
|
||||
*/
|
||||
public function testCheckPostAuthPassAdvancedUser()
|
||||
{
|
||||
@ -55,7 +55,7 @@ class UserCheckerTest extends TestCase
|
||||
|
||||
/**
|
||||
* @group legacy
|
||||
* @expectedDeprecation Calling Symfony\Component\Security\Core\User\UserChecker::checkPostAuth with an AdvancedUserInterface is deprecated since Symfony 4.1. Create a custom user checker if you wish to keep this functionality.
|
||||
* @expectedDeprecation Calling "Symfony\Component\Security\Core\User\UserChecker::checkPostAuth()" with an AdvancedUserInterface is deprecated since Symfony 4.1. Create a custom user checker if you wish to keep this functionality.
|
||||
* @expectedException \Symfony\Component\Security\Core\Exception\CredentialsExpiredException
|
||||
*/
|
||||
public function testCheckPostAuthCredentialsExpiredAdvancedUser()
|
||||
@ -70,7 +70,7 @@ class UserCheckerTest extends TestCase
|
||||
|
||||
/**
|
||||
* @group legacy
|
||||
* @expectedDeprecation Calling Symfony\Component\Security\Core\User\UserChecker::checkPreAuth with an AdvancedUserInterface is deprecated since Symfony 4.1. Create a custom user checker if you wish to keep this functionality.
|
||||
* @expectedDeprecation Calling "Symfony\Component\Security\Core\User\UserChecker::checkPreAuth()" with an AdvancedUserInterface is deprecated since Symfony 4.1. Create a custom user checker if you wish to keep this functionality.
|
||||
*/
|
||||
public function testCheckPreAuthPassAdvancedUser()
|
||||
{
|
||||
@ -95,7 +95,7 @@ class UserCheckerTest extends TestCase
|
||||
|
||||
/**
|
||||
* @group legacy
|
||||
* @expectedDeprecation Calling Symfony\Component\Security\Core\User\UserChecker::checkPreAuth with an AdvancedUserInterface is deprecated since Symfony 4.1. Create a custom user checker if you wish to keep this functionality.
|
||||
* @expectedDeprecation Calling "Symfony\Component\Security\Core\User\UserChecker::checkPreAuth()" with an AdvancedUserInterface is deprecated since Symfony 4.1. Create a custom user checker if you wish to keep this functionality.
|
||||
* @expectedException \Symfony\Component\Security\Core\Exception\LockedException
|
||||
*/
|
||||
public function testCheckPreAuthAccountLockedAdvancedUser()
|
||||
@ -119,7 +119,7 @@ class UserCheckerTest extends TestCase
|
||||
|
||||
/**
|
||||
* @group legacy
|
||||
* @expectedDeprecation Calling Symfony\Component\Security\Core\User\UserChecker::checkPreAuth with an AdvancedUserInterface is deprecated since Symfony 4.1. Create a custom user checker if you wish to keep this functionality.
|
||||
* @expectedDeprecation Calling "Symfony\Component\Security\Core\User\UserChecker::checkPreAuth()" with an AdvancedUserInterface is deprecated since Symfony 4.1. Create a custom user checker if you wish to keep this functionality.
|
||||
* @expectedException \Symfony\Component\Security\Core\Exception\DisabledException
|
||||
*/
|
||||
public function testCheckPreAuthDisabledAdvancedUser()
|
||||
@ -144,7 +144,7 @@ class UserCheckerTest extends TestCase
|
||||
|
||||
/**
|
||||
* @group legacy
|
||||
* @expectedDeprecation Calling Symfony\Component\Security\Core\User\UserChecker::checkPreAuth with an AdvancedUserInterface is deprecated since Symfony 4.1. Create a custom user checker if you wish to keep this functionality.
|
||||
* @expectedDeprecation Calling "Symfony\Component\Security\Core\User\UserChecker::checkPreAuth()" with an AdvancedUserInterface is deprecated since Symfony 4.1. Create a custom user checker if you wish to keep this functionality.
|
||||
* @expectedException \Symfony\Component\Security\Core\Exception\AccountExpiredException
|
||||
*/
|
||||
public function testCheckPreAuthAccountExpiredAdvancedUser()
|
||||
|
@ -33,7 +33,7 @@ class UserChecker implements UserCheckerInterface
|
||||
}
|
||||
|
||||
if ($user instanceof AdvancedUserInterface && !$user instanceof User) {
|
||||
@trigger_error(sprintf('Calling %s with an AdvancedUserInterface is deprecated since Symfony 4.1. Create a custom user checker if you wish to keep this functionality.', __METHOD__), E_USER_DEPRECATED);
|
||||
@trigger_error(sprintf('Calling "%s()" with an AdvancedUserInterface is deprecated since Symfony 4.1. Create a custom user checker if you wish to keep this functionality.', __METHOD__), E_USER_DEPRECATED);
|
||||
}
|
||||
|
||||
if (!$user->isAccountNonLocked()) {
|
||||
@ -65,7 +65,7 @@ class UserChecker implements UserCheckerInterface
|
||||
}
|
||||
|
||||
if ($user instanceof AdvancedUserInterface && !$user instanceof User) {
|
||||
@trigger_error(sprintf('Calling %s with an AdvancedUserInterface is deprecated since Symfony 4.1. Create a custom user checker if you wish to keep this functionality.', __METHOD__), E_USER_DEPRECATED);
|
||||
@trigger_error(sprintf('Calling "%s()" with an AdvancedUserInterface is deprecated since Symfony 4.1. Create a custom user checker if you wish to keep this functionality.', __METHOD__), E_USER_DEPRECATED);
|
||||
}
|
||||
|
||||
if (!$user->isCredentialsNonExpired()) {
|
||||
|
@ -70,7 +70,7 @@ class ContextListener implements ListenerInterface
|
||||
*/
|
||||
public function setLogoutOnUserChange($logoutOnUserChange)
|
||||
{
|
||||
@trigger_error(sprintf('The %s() method is deprecated since Symfony 4.1.', __METHOD__), E_USER_DEPRECATED);
|
||||
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.1.', __METHOD__), E_USER_DEPRECATED);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -51,7 +51,7 @@ abstract class FileDumper implements DumperInterface
|
||||
*/
|
||||
public function setBackup($backup)
|
||||
{
|
||||
@trigger_error(sprintf('The %s() method is deprecated since Symfony 4.1.', __METHOD__), E_USER_DEPRECATED);
|
||||
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.1.', __METHOD__), E_USER_DEPRECATED);
|
||||
|
||||
if (false !== $backup) {
|
||||
throw new \LogicException('The backup feature is no longer supported.');
|
||||
|
@ -43,7 +43,7 @@ class TranslationWriter implements TranslationWriterInterface
|
||||
*/
|
||||
public function disableBackup()
|
||||
{
|
||||
@trigger_error(sprintf('The %s() method is deprecated since Symfony 4.1.', __METHOD__), E_USER_DEPRECATED);
|
||||
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.1.', __METHOD__), E_USER_DEPRECATED);
|
||||
|
||||
foreach ($this->dumpers as $dumper) {
|
||||
if (method_exists($dumper, 'setBackup')) {
|
||||
|
@ -44,7 +44,7 @@ class Event extends BaseEvent
|
||||
@trigger_error(sprintf('Passing only three parameters to "%s" is deprecated since Symfony 4.1. Pass a %s instance as fourth parameter instead.', __METHOD__, WorkflowInterface::class), E_USER_DEPRECATED);
|
||||
$this->workflowName = 'unnamed';
|
||||
} elseif (is_string($workflow)) {
|
||||
@trigger_error(sprintf('Passing a string as 4th parameter of "%s" is deprecated since Symfony 4.1. Pass a %s instance instead.', __METHOD__, WorkflowInterface::class), E_USER_DEPRECATED);
|
||||
@trigger_error(sprintf('Passing a string as the 4th parameter of "%s()" is deprecated since Symfony 4.1. Pass a %s instance instead.', __METHOD__, WorkflowInterface::class), E_USER_DEPRECATED);
|
||||
$this->workflowName = $workflow;
|
||||
} elseif ($workflow instanceof WorkflowInterface) {
|
||||
$this->workflow = $workflow;
|
||||
|
@ -31,7 +31,7 @@ class Registry
|
||||
*/
|
||||
public function add(Workflow $workflow, $supportStrategy)
|
||||
{
|
||||
@trigger_error(sprintf('%s is deprecated since Symfony 4.1. Use addWorkflow() instead.', __METHOD__), E_USER_DEPRECATED);
|
||||
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.1. Use addWorkflow() instead.', __METHOD__), E_USER_DEPRECATED);
|
||||
$this->workflows[] = array($workflow, $supportStrategy);
|
||||
}
|
||||
|
||||
|
@ -31,7 +31,7 @@ class RegistryTest extends TestCase
|
||||
|
||||
/**
|
||||
* @group legacy
|
||||
* @expectedDeprecation Symfony\Component\Workflow\Registry::add is deprecated since Symfony 4.1. Use addWorkflow() instead.
|
||||
* @expectedDeprecation The "Symfony\Component\Workflow\Registry::add()" method is deprecated since Symfony 4.1. Use addWorkflow() instead.
|
||||
*/
|
||||
public function testAddIsDeprecated()
|
||||
{
|
||||
|
Reference in New Issue
Block a user