8000 made deprecation notices less verbose · symfony/symfony@e898d7b · GitHub
[go: up one dir, main page]

Skip to content

Commit e898d7b

Browse files
committed
made deprecation notices less verbose
1 parent 3aa59b6 commit e898d7b

File tree

24 files changed

+68
-64
lines changed

24 files changed

+68
-64
lines changed

UPGRADE-4.1.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ Config
55
------
66

77
* Implementing `ParentNodeDefinitionInterface` without the `getChildNodeDefinitions()` method
8-
is deprecated and will be unsupported in 5.0.
8+
is deprecated.
99

1010
EventDispatcher
1111
---------------
1212

13-
* The `TraceableEventDispatcherInterface` has been deprecated and will be removed in 5.0.
13+
* The `TraceableEventDispatcherInterface` has been deprecated.
1414

1515
FrameworkBundle
1616
---------------
@@ -29,24 +29,28 @@ HttpFoundation
2929
Security
3030
--------
3131

32+
<<<<<<< HEAD
3233
* The `ContextListener::setLogoutOnUserChange()` method is deprecated and will be removed in 5.0.
3334
* Using the `AdvancedUserInterface` is now deprecated. To use the existing
3435
functionality, create a custom user-checker based on the
3536
`Symfony\Component\Security\Core\User\UserChecker`. This functionality will
3637
be removed in Symfony 5.0.
38+
=======
39+
* The `ContextListener::setLogoutOnUserChange()` method is deprecated.
40+
>>>>>>> made deprecation notices less verbose
3741
3842
SecurityBundle
3943
--------------
4044

41-
* The `logout_on_user_change` firewall option is deprecated and will be removed in 5.0.
42-
* The `SecurityUserValueResolver` class is deprecated and will be removed in 5.0, use
45+
* The `logout_on_user_change` firewall option is deprecated.
46+
* The `SecurityUserValueResolver` class is deprecated, use
4347
`Symfony\Component\Security\Http\Controller\UserValueResolver` instead.
4448

4549
Translation
4650
-----------
4751

48-
* The `FileDumper::setBackup()` method is deprecated and will be removed in 5.0.
49-
* The `TranslationWriter::disableBackup()` method is deprecated and will be removed in 5.0.
52+
* The `FileDumper::setBackup()` method is deprecated.
53+
* The `TranslationWriter::disableBackup()` method is deprecated.
5054

5155
TwigBundle
5256
----------
@@ -56,9 +60,9 @@ TwigBundle
5660
Validator
5761
--------
5862

59-
* The `Email::__construct()` 'strict' property is deprecated and will be removed in 5.0. Use 'mode'=>"strict" instead.
60-
* Calling `EmailValidator::__construct()` method with a boolean parameter is deprecated and will be removed in 5.0, use `EmailValidator("strict")` instead.
61-
* Deprecated the `checkDNS` and `dnsMessage` options of the `Url` constraint. They will be removed in 5.0.
63+
* The `Email::__construct()` 'strict' property is deprecated. Use 'mode'=>"strict" instead.
64+
* Calling `EmailValidator::__construct()` method with a boolean parameter is deprecated, use `EmailValidator("strict")` instead.
65+
* Deprecated the `checkDNS` and `dnsMessage` options of the `Url` constraint.
6266

6367
Workflow
6468
--------

src/Symfony/Bundle/SecurityBundle/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ CHANGELOG
44
4.1.0
55
-----
66

7-
* The `logout_on_user_change` firewall option is deprecated and will be removed in 5.0.
7+
* The `logout_on_user_change` firewall option is deprecated.
88
* deprecated `SecurityUserValueResolver`, use
99
`Symfony\Component\Security\Http\Controller\UserValueResolver` instead.
1010

src/Symfony/Bundle/SecurityBundle/DependencyInjection/MainConfiguration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ private function addFirewallsSection(ArrayNodeDefinition $rootNode, array $facto
200200
->booleanNode('logout_on_user_change')
201201
->defaultTrue()
202202
->info('When true, it will trigger a logout for the user if something has changed. Note: No-Op option since 4.0. Will always be true.')
203-
->setDeprecated('The "%path%.%node%" configuration key has been deprecated in Symfony 4.1 and will be removed in 5.0.')
203+
->setDeprecated('The "%path%.%node%" configuration key has been deprecated in Symfony 4.1.')
204204
->end()
205205
->arrayNode('logout')
206206
->treatTrueLike(array())

src/Symfony/Bundle/SecurityBundle/Resources/config/security.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@
165165
<!-- Provisioning -->
166166
<service id="security.user.provider.in_memory" class="Symfony\Component\Security\Core\User\InMemoryUserProvider" abstract="true" />
167167
<service id="security.user.provider.in_memory.user" class="Symfony\Component\Security\Core\User\User" abstract="true">
168-
<deprecated>The "%service_id%" service is deprecated since Symfony 4.1 and will be removed in 5.0.</deprecated>
168+
<deprecated>The "%service_id%" service is deprecated since Symfony 4.1.</deprecated>
169169
</service>
170170

171171
<service id="security.user.provider.ldap" class="Symfony\Component\Security\Core\User\LdapUserProvider" abstract="true">

src/Symfony/Bundle/SecurityBundle/SecurityUserValueResolver.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@
1919
use Symfony\Component\Security\Core\User\UserInterface;
2020
use Symfony\Component\Security\Http\Controller\UserValueResolver;
2121

22-
@trigger_error(sprintf('The "%s" class is deprecated since Symfony 4.1 and will be removed in 5.0, use "%s" instead.', SecurityUserValueResolver::class, UserValueResolver::class), E_USER_DEPRECATED);
22+
@trigger_error(sprintf('The "%s" class is deprecated since Symfony 4.1, use "%s" instead.', SecurityUserValueResolver::class, UserValueResolver::class), E_USER_DEPRECATED);
2323

2424
/**
2525
* Supports the argument type of {@see UserInterface}.
2626
*
2727
* @author Iltar van der Berg <kjarli@gmail.com>
2828
*
29-
* @deprecated since Symfony 4.1, to be removed in 5.0. Use {@link UserValueResolver} instead
29+
* @deprecated since Symfony 4.1, use {@link UserValueResolver} instead
3030
*/
3131
final class SecurityUserValueResolver implements ArgumentValueResolverInterface
3232
{

src/Symfony/Component/EventDispatcher/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ CHANGELOG
66

77
* added support for invokable event listeners tagged with `kernel.event_listener` by default
88
* The `TraceableEventDispatcher::getOrphanedEvents()` method has been added.
9-
* The `TraceableEventDispatcherInterface` has been deprecated and will be removed in 5.0.
9+
* The `TraceableEventDispatcherInterface` has been deprecated.
1010

1111
4.0.0
1212
-----

src/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcherInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
1515

1616
/**
17-
* @deprecated since version 4.1, will be removed in 5.0.
17+
* @deprecated since version 4.1.
1818
*
1919
* @author Fabien Potencier <fabien@symfony.com>
2020
*/

src/Symfony/Component/HttpFoundation/File/UploadedFile.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public function __construct(string $path, string $originalName, string $mimeType
5959
$this->mimeType = $mimeType ?: 'application/octet-stream';
6060

6161
if (4 < func_num_args() ? !is_bool($test) : null !== $error && @filesize($path) === $error) {
62-
@trigger_error(sprintf('Passing a size as 4th argument to the constructor of "%s" is deprecated since Symfony 4.1 and will be unsupported in 5.0.', __CLASS__), E_USER_DEPRECATED);
62+
@trigger_error(sprintf('Passing a size as 4th argument to the constructor of "%s" is deprecated since Symfony 4.1.', __CLASS__), E_USER_DEPRECATED);
6363
$error = $test;
6464
$test = 5 < func_num_args() ? func_get_arg(5) : false;
6565
}
@@ -145,13 +145,13 @@ public function guessClientExtension()
145145
* It is extracted from the request from which the file has been uploaded.
146146
* Then it should not be considered as a safe value.
147147
*
148-
* @deprecated since 4.1 will be removed in 5.0 use getSize() instead.
148+
* @deprecated since 4.1, use getSize() instead.
149149
*
150150
* @return int|null The file sizes
151151
*/
152152
public function getClientSize()
153153
{
154-
@trigger_error(sprintf('"%s" is deprecated since Symfony 4.1 and will be removed in 5.0. Use getSize() instead.', __METHOD__), E_USER_DEPRECATED);
154+
@trigger_error(sprintf('"%s" is deprecated since Symfony 4.1. Use getSize() instead.', __METHOD__), E_USER_DEPRECATED);
155155

156156
return $this->getSize();
157157
}

src/Symfony/Component/HttpFoundation/Tests/File/UploadedFileTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ public function testGetSize()
195195

196196
/**
197197
* @group legacy
198-
* @expectedDeprecation Passing a size as 4th argument to the constructor of "Symfony\Component\HttpFoundation\File\UploadedFile" is deprecated since Symfony 4.1 and will be unsupported in 5.0.
198+
* @expectedDeprecation Passing a size as 4th argument to the constructor of "Symfony\Component\HttpFoundation\File\UploadedFile" is deprecated since Symfony 4.1.
199199
*/
200200
public function testConstructDeprecatedSize()
201201
{
@@ -213,7 +213,7 @@ public function testConstructDeprecatedSize()
213213

214214
/**
215215
* @group legacy
216-
* @expectedDeprecation Passing a size as 4th argument to the constructor of "Symfony\Component\HttpFoundation\File\UploadedFile" is deprecated since Symfony 4.1 and will be unsupported in 5.0.
216+
* @expectedDeprecation Passing a size as 4th argument to the constructor of "Symfony\Component\HttpFoundation\File\UploadedFile" is deprecated since Symfony 4.1.
217217
*/
218218
public function testConstructDeprecatedSizeWhenPassingOnlyThe4Needed()
219219
{

src/Symfony/Component/Security/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ CHANGELOG
44
4.1.0
55
-----
66

7-
* The `ContextListener::setLogoutOnUserChange()` method is deprecated and will be removed in 5.0.
7+
* The `ContextListener::setLogoutOnUserChange()` method is deprecated.
88
* added `UserValueResolver`.
99
* Using the AdvancedUserInterface is now deprecated. To use the existing
1010
functionality, create a custom user-checker based on the

src/Symfony/Component/Security/Http/Firewall/ContextListener.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,11 @@ public function __construct(TokenStorageInterface $tokenStorage, iterable $userP
6767
*
6868
* @param bool $logoutOnUserChange
6969
*
70-
* @deprecated since Symfony 4.1, to be removed in 5.0
70+
* @deprecated since Symfony 4.1
7171
*/
7272
public function setLogoutOnUserChange($logoutOnUserChange)
7373
{
74-
@trigger_error(sprintf('The %s() method is deprecated since Symfony 4.1 and will be removed in 5.0.', __METHOD__), E_USER_DEPRECATED);
74+
@trigger_error(sprintf('The %s() method is deprecated since Symfony 4.1.', __METHOD__), E_USER_DEPRECATED);
7575
}
7676

7777
/**

src/Symfony/Component/Translation/CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ CHANGELOG
44
4.1.0
55
-----
66

7-
* The `FileDumper::setBackup()` method is deprecated and will be removed in 5.0.
8-
* The `TranslationWriter::disableBackup()` method is deprecated and will be removed in 5.0.
7+
* The `FileDumper::setBackup()` method is deprecated.
8+
* The `TranslationWriter::disableBackup()` method is deprecated.
99
* The `XliffFileDumper` will write "name" on the "unit" node when dumping XLIFF 2.0.
1010

1111
4.0.0

src/Symfony/Component/Translation/Dumper/FileDumper.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,11 @@ public function setRelativePathTemplate($relativePathTemplate)
4747
*
4848
* @param bool
4949
*
50-
* @deprecated since Symfony 4.1, to be removed in 5.0
50+
* @deprecated since Symfony 4.1
5151
*/
5252
public function setBackup($backup)
5353
{
54-
@trigger_error(sprintf('The %s() method is deprecated since Symfony 4.1 and will be removed in 5.0.', __METHOD__), E_USER_DEPRECATED);
54+
@trigger_error(sprintf('The %s() method is deprecated since Symfony 4.1.', __METHOD__), E_USER_DEPRECATED);
5555

5656
if (false !== $backup) {
5757
throw new \LogicException('The backup feature is no longer supported.');

src/Symfony/Component/Translation/Writer/TranslationWriter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ public function addDumper($format, DumperInterface $dumper)
3939
/**
4040
* Disables dumper backup.
4141
*
42-
* @deprecated since Symfony 4.1, to be removed in 5.0
42+
* @deprecated since Symfony 4.1
4343
*/
4444
public function disableBackup()
4545
{
46-
@trigger_error(sprintf('The %s() method is deprecated since Symfony 4.1 and will be removed in 5.0.', __METHOD__), E_USER_DEPRECATED);
46+
@trigger_error(sprintf('The %s() method is deprecated since Symfony 4.1.', __METHOD__), E_USER_DEPRECATED);
4747

4848
foreach ($this->dumpers as $dumper) {
4949
if (method_exists($dumper, 'setBackup')) {

src/Symfony/Component/Validator/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ CHANGELOG
44
4.1.0
55
-----
66

7-
* Deprecated the `checkDNS` and `dnsMessage` options of the `Url` constraint. They will be removed in 5.0.
7+
* Deprecated the `checkDNS` and `dnsMessage` options of the `Url` constraint.
88
* added a `values` option to the `Expression` constraint
99

1010
4.0.0

src/Symfony/Component/Validator/Constraints/Email.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,15 @@ class Email extends Constraint
5151
public $checkHost = false;
5252

5353
/**
54-
* @deprecated since Symfony 4.1, to be removed in 5.0. Set mode to "strict" instead.
54+
* @deprecated since Symfony 4.1. Set mode to "strict" instead.
5555
*/
5656
public $strict;
5757
public $mode;
5858

5959
public function __construct($options = null)
6060
{
6161
if (is_array($options) && array_key_exists('strict', $options)) {
62-
@trigger_error(sprintf('The "strict" property is deprecated since Symfony 4.1 and will be removed in 5.0. Use "mode"=>"%s" instead.', self::VALIDATION_MODE_STRICT), E_USER_DEPRECATED);
62+
@trigger_error(sprintf('The "strict" property is deprecated since Symfony 4.1. Use "mode"=>"%s" instead.', self::VALIDATION_MODE_STRICT), E_USER_DEPRECATED);
6363
}
6464

6565
if (is_array($options) && array_key_exists('mode', $options) && !in_array($options['mode'], self::$validationModes, true)) {

src/Symfony/Component/Validator/Constraints/EmailValidator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class EmailValidator extends ConstraintValidator
4949
public function __construct($defaultMode = Email::VALIDATION_MODE_LOOSE)
5050
{
5151
if (is_bool($defaultMode)) {
52-
@trigger_error(sprintf('Calling `new %s(%s)` is deprecated since Symfony 4.1 and will be removed in 5.0, use `new %s("%s")` instead.', self::class, $defaultMode ? 'true' : 'false', self::class, $defaultMode ? Email::VALIDATION_MODE_STRICT : Email::VALIDATION_MODE_LOOSE), E_USER_DEPRECATED);
52+
@trigger_error(sprintf('Calling `new %s(%s)` is deprecated since Symfony 4.1, use `new %s("%s")` instead.', self::class, $defaultMode ? 'true' : 'false', self::class, $defaultMode ? Email::VALIDATION_MODE_STRICT : Email::VALIDATION_MODE_LOOSE), E_USER_DEPRECATED);
5353

5454
$defaultMode = $defaultMode ? Email::VALIDATION_MODE_STRICT : Email::VALIDATION_MODE_LOOSE;
5555
}
@@ -81,7 +81,7 @@ public function validate($value, Constraint $constraint)
8181
$value = (string) $value;
8282

8383
if (null !== $constraint->strict) {
84-
@trigger_error(sprintf('The %s::$strict property is deprecated since Symfony 4.1 and will be removed in 5.0. Use %s::mode="%s" instead.', Email::class, Email::class, Email::VALIDATION_MODE_STRICT), E_USER_DEPRECATED);
84+
@trigger_error(sprintf('The %s::$strict property is deprecated since Symfony 4.1. Use %s::mode="%s" instead.', Email::class, Email::class, Email::VALIDATION_MODE_STRICT), E_USER_DEPRECATED);
8585

8686
if ($constraint->strict) {
8787
$constraint->mode = Email::VALIDATION_MODE_STRICT;

src/Symfony/Component/Validator/Constraints/Url.php

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -22,67 +22,67 @@
2222
class Url extends Constraint
2323
{
2424
/**
25-
* @deprecated since Symfony 4.1, to be removed in 5.0
25+
* @deprecated since Symfony 4.1
2626
*/
2727
const CHECK_DNS_TYPE_ANY = 'ANY';
2828

2929
/**
30-
* @deprecated since Symfony 4.1, to be removed in 5.0
30+
* @deprecated since Symfony 4.1
3131
*/
3232
const CHECK_DNS_TYPE_NONE = false;
3333

3434
/**
35-
* @deprecated since Symfony 4.1, to be removed in 5.0
35+
* @deprecated since Symfony 4.1
3636
*/
3737
const CHECK_DNS_TYPE_A = 'A';
3838

3939
/**
40-
* @deprecated since Symfony 4.1, to be removed in 5.0
40+
* @deprecated since Symfony 4.1
4141
*/
4242
const CHECK_DNS_TYPE_A6 = 'A6';
4343

4444
/**
45-
* @deprecated since Symfony 4.1, to be removed in 5.0
45+
* @deprecated since Symfony 4.1
4646
*/
4747
const CHECK_DNS_TYPE_AAAA = 'AAAA';
4848

4949
/**
50-
* @deprecated since Symfony 4.1, to be removed in 5.0
50+
* @deprecated since Symfony 4.1
5151
*/
5252
const CHECK_DNS_TYPE_CNAME = 'CNAME';
5353

5454
/**
55-
* @deprecated since Symfony 4.1, to be removed in 5.0
55+
* @deprecated since Symfony 4.1
5656
*/
5757
const CHECK_DNS_TYPE_MX = 'MX';
5858

5959
/**
60-
* @deprecated since Symfony 4.1, to be removed in 5.0
60+
* @deprecated since Symfony 4.1
6161
*/
6262
const CHECK_DNS_TYPE_NAPTR = 'NAPTR';
6363

6464
/**
65-
* @deprecated since Symfony 4.1, to be removed in 5.0
65+
* @deprecated since Symfony 4.1
6666
*/
6767
const CHECK_DNS_TYPE_NS = 'NS';
6868

6969
/**
70-
* @deprecated since Symfony 4.1, to be removed in 5.0
70+
* @deprecated since Symfony 4.1
7171
*/
7272
const CHECK_DNS_TYPE_PTR = 'PTR';
7373

7474
/**
75-
* @deprecated since Symfony 4.1, to be removed in 5.0
75+
* @deprecated since Symfony 4.1
7676
*/
7777
const CHECK_DNS_TYPE_SOA = 'SOA';
7878

7979
/**
80-
* @deprecated since Symfony 4.1, to be removed in 5.0
80+
* @deprecated since Symfony 4.1
8181
*/
8282
const CHECK_DNS_TYPE_SRV = 'SRV';
8383

8484
/**
85-
* @deprecated since Symfony 4.1, to be removed in 5.0
85+
* @deprecated since Symfony 4.1
8686
*/
8787
const CHECK_DNS_TYPE_TXT = 'TXT';
8888

@@ -95,13 +95,13 @@ class Url extends Constraint
9595
public $message = 'This value is not a valid URL.';
9696

9797
/**
98-
* @deprecated since Symfony 4.1, to be removed in 5.0
98+
* @deprecated since Symfony 4.1
9999
*/
100100
public $dnsMessage = 'The host could not be resolved.';
101101
public $protocols = array('http', 'https');
102102

103103
/**
104-
* @deprecated since Symfony 4.1, to be removed in 5.0
104+
* @deprecated since Symfony 4.1
105105
*/
106106
public $checkDNS = self::CHECK_DNS_TYPE_NONE;
107107
public $relativeProtocol = false;
@@ -110,10 +110,10 @@ public function __construct($options = null)
110110
{
111111
if (is_array($options)) {
112112
if (array_key_exists('checkDNS', $options)) {
113-
@trigger_error(sprintf('The "checkDNS" option in "%s" is deprecated since Symfony 4.1 and will be removed in 5.0. Its false-positive rate is too high to be relied upon.', self::class), E_USER_DEPRECATED);
113+
@trigger_error(sprintf('The "checkDNS" option in "%s" is deprecated since Symfony 4.1. Its false-positive rate is too high to be relied upon.', self::class), E_USER_DEPRECATED);
114114
}
115115
if (array_key_exists('dnsMessage', $options)) {
116-
@trigger_error(sprintf('The "dnsMessage" option in "%s" is deprecated since Symfony 4.1 and will be removed in 5.0.', self::class), E_USER_DEPRECATED);
116+
@trigger_error(sprintf('The "dnsMessage" option in "%s" is deprecated since Symfony 4.1.', self::class), E_USER_DEPRECATED);
117117
}
118118
}
119119

src/Symfony/Component/Validator/Tests/Constraints/EmailTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
class EmailTest extends TestCase
1818
{
1919
/**
20-
* @expectedDeprecation The "strict" property is deprecated since Symfony 4.1 and will be removed in 5.0. Use "mode"=>"strict" instead.
20+
* @expectedDeprecation The "strict" property is deprecated since Symfony 4.1. Use "mode"=>"strict" instead.
2121
* @group legacy
2222
*/
2323
public function testLegacyConstructorStrict()

0 commit comments

Comments
 (0)
0