minor #27878 improve deprecation messages (xabbuh)
This PR was merged into the 4.2-dev branch.
Discussion
----------
improve deprecation messages
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Commits
-------
1657b82c19
improve deprecation messages
This commit is contained in:
commit
3f663fdfbb
@ -36,7 +36,7 @@ class FirewallContext
|
|||||||
$this->exceptionListener = $exceptionListener;
|
$this->exceptionListener = $exceptionListener;
|
||||||
if ($logoutListener instanceof FirewallConfig) {
|
if ($logoutListener instanceof FirewallConfig) {
|
||||||
$this->config = $logoutListener;
|
$this->config = $logoutListener;
|
||||||
@trigger_error(sprintf('Passing an instance of %s as 3rd argument to %s() is deprecated since Symfony 4.2. Pass a %s instance instead.', FirewallConfig::class, __METHOD__, LogoutListener::class), E_USER_DEPRECATED);
|
@trigger_error(sprintf('Passing an instance of %s as the 3rd argument to "%s()" is deprecated since Symfony 4.2. Pass a %s instance instead.', FirewallConfig::class, __METHOD__, LogoutListener::class), E_USER_DEPRECATED);
|
||||||
} elseif (null === $logoutListener || $logoutListener instanceof LogoutListener) {
|
} elseif (null === $logoutListener || $logoutListener instanceof LogoutListener) {
|
||||||
$this->logoutListener = $logoutListener;
|
$this->logoutListener = $logoutListener;
|
||||||
$this->config = $config;
|
$this->config = $config;
|
||||||
|
@ -162,7 +162,7 @@ final class CacheItem implements CacheItemInterface
|
|||||||
*/
|
*/
|
||||||
public function getPreviousTags()
|
public function getPreviousTags()
|
||||||
{
|
{
|
||||||
@trigger_error(sprintf('The "%s" method is deprecated since Symfony 4.2, use the "getMetadata()" method instead.', __METHOD__), E_USER_DEPRECATED);
|
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.2, use the "getMetadata()" method instead.', __METHOD__), E_USER_DEPRECATED);
|
||||||
|
|
||||||
return $this->metadata[self::METADATA_TAGS] ?? array();
|
return $this->metadata[self::METADATA_TAGS] ?? array();
|
||||||
}
|
}
|
||||||
|
@ -50,7 +50,7 @@ class AnalyzeServiceReferencesPass extends AbstractRecursivePass implements Repe
|
|||||||
*/
|
*/
|
||||||
public function setRepeatedPass(RepeatedPass $repeatedPass)
|
public function setRepeatedPass(RepeatedPass $repeatedPass)
|
||||||
{
|
{
|
||||||
@trigger_error(sprintf('The "%s" method is deprecated since Symfony 4.2.', __METHOD__), E_USER_DEPRECATED);
|
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.2.', __METHOD__), E_USER_DEPRECATED);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -42,7 +42,7 @@ class InlineServiceDefinitionsPass extends AbstractRecursivePass implements Repe
|
|||||||
*/
|
*/
|
||||||
public function setRepeatedPass(RepeatedPass $repeatedPass)
|
public function setRepeatedPass(RepeatedPass $repeatedPass)
|
||||||
{
|
{
|
||||||
@trigger_error(sprintf('The "%s" method is deprecated since Symfony 4.2.', __METHOD__), E_USER_DEPRECATED);
|
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.2.', __METHOD__), E_USER_DEPRECATED);
|
||||||
$this->repeatedPass = $repeatedPass;
|
$this->repeatedPass = $repeatedPass;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ class RemoveUnusedDefinitionsPass extends AbstractRecursivePass implements Repea
|
|||||||
*/
|
*/
|
||||||
public function setRepeatedPass(RepeatedPass $repeatedPass)
|
public function setRepeatedPass(RepeatedPass $repeatedPass)
|
||||||
{
|
{
|
||||||
@trigger_error(sprintf('The "%s" method is deprecated since Symfony 4.2.', __METHOD__), E_USER_DEPRECATED);
|
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.2.', __METHOD__), E_USER_DEPRECATED);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user