improve deprecation messages
This commit is contained in:
parent
d40fed9253
commit
e4ae5a4ca9
@ -110,7 +110,7 @@ class TableStyle
|
|||||||
*/
|
*/
|
||||||
public function setHorizontalBorderChar($horizontalBorderChar)
|
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);
|
return $this->setHorizontalBorderChars($horizontalBorderChar, $horizontalBorderChar);
|
||||||
}
|
}
|
||||||
@ -124,7 +124,7 @@ class TableStyle
|
|||||||
*/
|
*/
|
||||||
public function getHorizontalBorderChar()
|
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;
|
return $this->horizontalOutsideBorderChar;
|
||||||
}
|
}
|
||||||
@ -166,7 +166,7 @@ class TableStyle
|
|||||||
*/
|
*/
|
||||||
public function setVerticalBorderChar($verticalBorderChar)
|
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);
|
return $this->setVerticalBorderChars($verticalBorderChar, $verticalBorderChar);
|
||||||
}
|
}
|
||||||
@ -180,7 +180,7 @@ class TableStyle
|
|||||||
*/
|
*/
|
||||||
public function getVerticalBorderChar()
|
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;
|
return $this->verticalOutsideBorderChar;
|
||||||
}
|
}
|
||||||
@ -268,7 +268,7 @@ class TableStyle
|
|||||||
*/
|
*/
|
||||||
public function setCrossingChar($crossingChar)
|
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);
|
return $this->setDefaultCrossingChar($crossingChar);
|
||||||
}
|
}
|
||||||
|
@ -186,7 +186,7 @@ class FlattenException
|
|||||||
*/
|
*/
|
||||||
public function setTraceFromException(\Exception $exception)
|
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);
|
$this->setTraceFromThrowable($exception);
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,7 @@ class TypedReference extends Reference
|
|||||||
public function __construct(string $id, string $type, $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE)
|
public function __construct(string $id, string $type, $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE)
|
||||||
{
|
{
|
||||||
if (\is_string($invalidBehavior) || 3 < \func_num_args()) {
|
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;
|
$this->requiringClass = $invalidBehavior;
|
||||||
$invalidBehavior = 3 < \func_num_args() ? \func_get_arg(3) : ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE;
|
$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()
|
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 ?? '';
|
return $this->requiringClass ?? '';
|
||||||
}
|
}
|
||||||
@ -58,7 +58,7 @@ class TypedReference extends Reference
|
|||||||
*/
|
*/
|
||||||
public function canBeAutoregistered()
|
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);
|
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)
|
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) {
|
if (null !== $this->choiceList) {
|
||||||
return $this->choiceList;
|
return $this->choiceList;
|
||||||
@ -93,7 +93,7 @@ class CountryType 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 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
|
// Optimize
|
||||||
$values = array_filter($values);
|
$values = array_filter($values);
|
||||||
@ -116,7 +116,7 @@ class CountryType 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 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
|
// Optimize
|
||||||
$choices = array_filter($choices);
|
$choices = array_filter($choices);
|
||||||
|
@ -77,7 +77,7 @@ class CurrencyType extends AbstractType implements ChoiceLoaderInterface
|
|||||||
*/
|
*/
|
||||||
public function loadChoiceList($value = null)
|
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) {
|
if (null !== $this->choiceList) {
|
||||||
return $this->choiceList;
|
return $this->choiceList;
|
||||||
@ -93,7 +93,7 @@ class CurrencyType 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 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
|
// Optimize
|
||||||
$values = array_filter($values);
|
$values = array_filter($values);
|
||||||
@ -116,7 +116,7 @@ class CurrencyType 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 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
|
// Optimize
|
||||||
$choices = array_filter($choices);
|
$choices = array_filter($choices);
|
||||||
|
@ -77,7 +77,7 @@ class LanguageType extends AbstractType implements ChoiceLoaderInterface
|
|||||||
*/
|
*/
|
||||||
public function loadChoiceList($value = null)
|
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) {
|
if (null !== $this->choiceList) {
|
||||||
return $this->choiceList;
|
return $this->choiceList;
|
||||||
@ -93,7 +93,7 @@ class LanguageType 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 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
|
// Optimize
|
||||||
$values = array_filter($values);
|
$values = array_filter($values);
|
||||||
@ -116,7 +116,7 @@ class LanguageType 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 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
|
// Optimize
|
||||||
$choices = array_filter($choices);
|
$choices = array_filter($choices);
|
||||||
|
@ -77,7 +77,7 @@ class LocaleType extends AbstractType implements ChoiceLoaderInterface
|
|||||||
*/
|
*/
|
||||||
public function loadChoiceList($value = null)
|
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) {
|
if (null !== $this->choiceList) {
|
||||||
return $this->choiceList;
|
return $this->choiceList;
|
||||||
@ -93,7 +93,7 @@ class LocaleType 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 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
|
// Optimize
|
||||||
$values = array_filter($values);
|
$values = array_filter($values);
|
||||||
@ -116,7 +116,7 @@ class LocaleType 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 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
|
// Optimize
|
||||||
$choices = array_filter($choices);
|
$choices = array_filter($choices);
|
||||||
|
@ -158,7 +158,7 @@ class UploadedFile extends File
|
|||||||
*/
|
*/
|
||||||
public function getClientSize()
|
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();
|
return $this->getSize();
|
||||||
}
|
}
|
||||||
|
@ -261,7 +261,7 @@ abstract class AbstractToken implements TokenInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($this->user instanceof AdvancedUserInterface && $user instanceof AdvancedUserInterface) {
|
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()) {
|
if ($this->user->isAccountNonExpired() !== $user->isAccountNonExpired()) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -278,7 +278,7 @@ abstract class AbstractToken implements TokenInterface
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
} elseif ($this->user instanceof AdvancedUserInterface xor $user instanceof AdvancedUserInterface) {
|
} 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;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -42,7 +42,7 @@ class ExpressionVoter implements VoterInterface
|
|||||||
*/
|
*/
|
||||||
public function addExpressionLanguageProvider(ExpressionFunctionProviderInterface $provider)
|
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);
|
$this->expressionLanguage->registerProvider($provider);
|
||||||
}
|
}
|
||||||
|
@ -32,7 +32,7 @@ class UserCheckerTest extends TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @group legacy
|
* @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()
|
public function testCheckPostAuthPassAdvancedUser()
|
||||||
{
|
{
|
||||||
@ -55,7 +55,7 @@ class UserCheckerTest extends TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @group legacy
|
* @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
|
* @expectedException \Symfony\Component\Security\Core\Exception\CredentialsExpiredException
|
||||||
*/
|
*/
|
||||||
public function testCheckPostAuthCredentialsExpiredAdvancedUser()
|
public function testCheckPostAuthCredentialsExpiredAdvancedUser()
|
||||||
@ -70,7 +70,7 @@ class UserCheckerTest extends TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @group legacy
|
* @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()
|
public function testCheckPreAuthPassAdvancedUser()
|
||||||
{
|
{
|
||||||
@ -95,7 +95,7 @@ class UserCheckerTest extends TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @group legacy
|
* @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
|
* @expectedException \Symfony\Component\Security\Core\Exception\LockedException
|
||||||
*/
|
*/
|
||||||
public function testCheckPreAuthAccountLockedAdvancedUser()
|
public function testCheckPreAuthAccountLockedAdvancedUser()
|
||||||
@ -119,7 +119,7 @@ class UserCheckerTest extends TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @group legacy
|
* @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
|
* @expectedException \Symfony\Component\Security\Core\Exception\DisabledException
|
||||||
*/
|
*/
|
||||||
public function testCheckPreAuthDisabledAdvancedUser()
|
public function testCheckPreAuthDisabledAdvancedUser()
|
||||||
@ -144,7 +144,7 @@ class UserCheckerTest extends TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @group legacy
|
* @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
|
* @expectedException \Symfony\Component\Security\Core\Exception\AccountExpiredException
|
||||||
*/
|
*/
|
||||||
public function testCheckPreAuthAccountExpiredAdvancedUser()
|
public function testCheckPreAuthAccountExpiredAdvancedUser()
|
||||||
|
@ -33,7 +33,7 @@ class UserChecker implements UserCheckerInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($user instanceof AdvancedUserInterface && !$user instanceof User) {
|
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()) {
|
if (!$user->isAccountNonLocked()) {
|
||||||
@ -65,7 +65,7 @@ class UserChecker implements UserCheckerInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($user instanceof AdvancedUserInterface && !$user instanceof User) {
|
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()) {
|
if (!$user->isCredentialsNonExpired()) {
|
||||||
|
@ -70,7 +70,7 @@ class ContextListener implements ListenerInterface
|
|||||||
*/
|
*/
|
||||||
public function setLogoutOnUserChange($logoutOnUserChange)
|
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)
|
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) {
|
if (false !== $backup) {
|
||||||
throw new \LogicException('The backup feature is no longer supported.');
|
throw new \LogicException('The backup feature is no longer supported.');
|
||||||
|
@ -43,7 +43,7 @@ class TranslationWriter implements TranslationWriterInterface
|
|||||||
*/
|
*/
|
||||||
public function disableBackup()
|
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) {
|
foreach ($this->dumpers as $dumper) {
|
||||||
if (method_exists($dumper, 'setBackup')) {
|
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);
|
@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';
|
$this->workflowName = 'unnamed';
|
||||||
} elseif (is_string($workflow)) {
|
} 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;
|
$this->workflowName = $workflow;
|
||||||
} elseif ($workflow instanceof WorkflowInterface) {
|
} elseif ($workflow instanceof WorkflowInterface) {
|
||||||
$this->workflow = $workflow;
|
$this->workflow = $workflow;
|
||||||
|
@ -31,7 +31,7 @@ class Registry
|
|||||||
*/
|
*/
|
||||||
public function add(Workflow $workflow, $supportStrategy)
|
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);
|
$this->workflows[] = array($workflow, $supportStrategy);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ class RegistryTest extends TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @group legacy
|
* @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()
|
public function testAddIsDeprecated()
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user