Merge branch '4.1'

* 4.1:
  [Filesystem] fix lock file mode
  [Console] fix typo in phpdoc
  improve deprecation messages
This commit is contained in:
Nicolas Grekas 2018-07-09 15:30:59 +02:00
commit 88f063ddb4
20 changed files with 42 additions and 42 deletions

View File

@ -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);
} }

View File

@ -33,7 +33,7 @@ interface OutputInterface
/** /**
* Writes a message to the output. * Writes a message to the output.
* *
* @param string|iterable $messages The message as an iterable of lines or a single string * @param string|iterable $messages The message as an iterable of strings or a single string
* @param bool $newline Whether to add a newline * @param bool $newline Whether to add a newline
* @param int $options A bitmask of options (one of the OUTPUT or VERBOSITY constants), 0 is considered the same as self::OUTPUT_NORMAL | self::VERBOSITY_NORMAL * @param int $options A bitmask of options (one of the OUTPUT or VERBOSITY constants), 0 is considered the same as self::OUTPUT_NORMAL | self::VERBOSITY_NORMAL
*/ */
@ -42,7 +42,7 @@ interface OutputInterface
/** /**
* Writes a message to the output and adds a newline at the end. * Writes a message to the output and adds a newline at the end.
* *
* @param string|iterable $messages The message as an iterable of lines of a single string * @param string|iterable $messages The message as an iterable of strings or a single string
* @param int $options A bitmask of options (one of the OUTPUT or VERBOSITY constants), 0 is considered the same as self::OUTPUT_NORMAL | self::VERBOSITY_NORMAL * @param int $options A bitmask of options (one of the OUTPUT or VERBOSITY constants), 0 is considered the same as self::OUTPUT_NORMAL | self::VERBOSITY_NORMAL
*/ */
public function writeln($messages, $options = 0); public function writeln($messages, $options = 0);

View File

@ -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);
} }

View File

@ -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);
} }

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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();
} }

View File

@ -81,7 +81,7 @@ class FlockStore implements StoreInterface
set_error_handler(function ($type, $msg) use (&$error) { $error = $msg; }); set_error_handler(function ($type, $msg) use (&$error) { $error = $msg; });
if (!$handle = fopen($fileName, 'r+') ?: fopen($fileName, 'r')) { if (!$handle = fopen($fileName, 'r+') ?: fopen($fileName, 'r')) {
if ($handle = fopen($fileName, 'x')) { if ($handle = fopen($fileName, 'x')) {
chmod($fileName, 0644); chmod($fileName, 0666);
} elseif (!$handle = fopen($fileName, 'r+') ?: fopen($fileName, 'r')) { } elseif (!$handle = fopen($fileName, 'r+') ?: fopen($fileName, 'r')) {
usleep(100); // Give some time for chmod() to complete usleep(100); // Give some time for chmod() to complete
$handle = fopen($fileName, 'r+') ?: fopen($fileName, 'r'); $handle = fopen($fileName, 'r+') ?: fopen($fileName, 'r');

View File

@ -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;
} }

View File

@ -58,7 +58,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);
} }

View File

@ -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()

View File

@ -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()) {

View File

@ -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);
} }
/** /**

View File

@ -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.');

View File

@ -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')) {

View File

@ -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;

View File

@ -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);
} }

View File

@ -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()
{ {