Skip to content

Commit 94d688e

Browse files
committed
Enable the reporting of deprecations in the testsuite
Errors reported by Swiftmailer classes in the DebugClassLoader are ignored as they won't be fixed (and they are not classified as indirect ones probably because of the non-namespaced classes).
1 parent e007993 commit 94d688e

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

Tests/ignored-deprecations.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# SwiftMailer does not put phpdoc on overwritten methods and is not maintained anymore to add them.
2+
/Method "Swift_[^"]++" might add "[^"]++" as a native return type declaration in the future\. Do the same in implementation "Swift_[^"]++" now to avoid errors or add an explicit @return annotation to suppress this message\./
3+
# Weird error reported for symfony/validator
4+
/The "Symfony\\Component\\Validator\\Constraint::\$errorNames" property is considered final\. You should not override it in "Symfony\\Component\\Validator\\Constraints\\NotBlank"\./

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
"friendsofphp/php-cs-fixer": "^3.0.2, !=3.5.0",
5252
"swiftmailer/swiftmailer": "^4.3 || ^5.0 || ^6.0",
5353
"symfony/console": "^4.4 || ^5.0",
54-
"symfony/phpunit-bridge": "^5.3",
54+
"symfony/phpunit-bridge": "^6.1",
5555
"symfony/yaml": "^4.4 || ^5.0"
5656
},
5757
"config": {

phpunit.xml.dist

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
</exclude>
1919
</whitelist>
2020
</filter>
21+
2122
<php>
22-
<env name="SYMFONY_DEPRECATIONS_HELPER" value="disabled" />
23+
<env name="SYMFONY_DEPRECATIONS_HELPER" value="ignoreFile=Tests/ignored-deprecations.txt&amp;max[total]=0" />
2324
</php>
2425
</phpunit>

0 commit comments

Comments
 (0)