From 17cd8a8c116123af05f9d900cc50707da609654f Mon Sep 17 00:00:00 2001 From: jrfnl Date: Sat, 18 Dec 2021 04:03:22 +0100 Subject: [PATCH 1/2] Composer: update version constraints Follow up on c1a63391084a9cb55bba53cb341049428aa3a1c0 which enabled PHP 8.1 support, let's make sure that the version constraints of (dev) dependencies are such that PHP 8.1 compatible versions will be installed. Refs: * https://github.com/php-parallel-lint/PHP-Parallel-Lint/releases * https://github.com/squizlabs/PHP_CodeSniffer/releases --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 28557f59d..29509b4ce 100644 --- a/composer.json +++ b/composer.json @@ -35,10 +35,10 @@ "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", "doctrine/annotations": "^1.2", "php-parallel-lint/php-console-highlighter": "^0.5.0", - "php-parallel-lint/php-parallel-lint": "^1.3", + "php-parallel-lint/php-parallel-lint": "^1.3.1", "phpcompatibility/php-compatibility": "^9.3.5", "roave/security-advisories": "dev-latest", - "squizlabs/php_codesniffer": "^3.6.0", + "squizlabs/php_codesniffer": "^3.6.2", "yoast/phpunit-polyfills": "^1.0.0" }, "suggest": { From d5a5ad19cdeb6428575f71a990909961cb445ca8 Mon Sep 17 00:00:00 2001 From: jrfnl Date: Sat, 18 Dec 2021 04:08:22 +0100 Subject: [PATCH 2/2] CS: minor cleanup PHPCS 3.6.2 added a sniff for a PSR-12 rule which was previously not strictly checked: "No blank line after the opening brace of a class". This fixes the newly flagged issues. --- test/OAuth/OAuthTest.php | 1 - test/PHPMailer/AddEmbeddedImageTest.php | 1 - test/PHPMailer/AddStringAttachmentTest.php | 1 - test/PHPMailer/AddStringEmbeddedImageTest.php | 1 - test/PHPMailer/AuthCRAMMD5Test.php | 1 - test/PHPMailer/CustomHeaderTest.php | 1 - test/PHPMailer/DKIMTest.php | 1 - test/PHPMailer/EncodeQTest.php | 1 - test/PHPMailer/EncodeStringTest.php | 1 - test/PHPMailer/FileIsAccessibleTest.php | 1 - test/PHPMailer/FilenameToTypeTest.php | 1 - test/PHPMailer/GenerateIdTest.php | 1 - test/PHPMailer/GetLastMessageIDTest.php | 1 - test/PHPMailer/HasLineLongerThanMaxTest.php | 1 - test/PHPMailer/Html2TextTest.php | 1 - test/PHPMailer/ICalTest.php | 1 - test/PHPMailer/IsPermittedPathTest.php | 1 - test/PHPMailer/IsValidHostTest.php | 1 - test/PHPMailer/LocalizationTest.php | 1 - test/PHPMailer/MailTransportTest.php | 1 - test/PHPMailer/MbPathinfoTest.php | 1 - test/PHPMailer/MimeTypesTest.php | 1 - test/PHPMailer/NormalizeBreaksTest.php | 1 - test/PHPMailer/ParseAddressesTest.php | 1 - test/PHPMailer/PunyencodeAddressTest.php | 1 - test/PHPMailer/QuotedStringTest.php | 1 - test/PHPMailer/ReplyToGetSetClearTest.php | 1 - test/PHPMailer/SetErrorTest.php | 1 - test/PHPMailer/SetFromTest.php | 1 - test/PHPMailer/SetTest.php | 1 - test/PHPMailer/SetWordWrapTest.php | 1 - test/PHPMailer/Utf8CharBoundaryTest.php | 1 - test/PHPMailer/ValidateAddressCustomValidatorTest.php | 1 - test/PHPMailer/ValidateAddressTest.php | 1 - test/PHPMailer/WrapTextTest.php | 1 - test/POP3/PopBeforeSmtpTest.php | 1 - test/PreSendTestCase.php | 1 - test/Security/DenialOfServiceVectorsTest.php | 1 - test/SendTestCase.php | 1 - test/TestCase.php | 1 - 40 files changed, 40 deletions(-) diff --git a/test/OAuth/OAuthTest.php b/test/OAuth/OAuthTest.php index b851aab52..e141b6b79 100644 --- a/test/OAuth/OAuthTest.php +++ b/test/OAuth/OAuthTest.php @@ -22,7 +22,6 @@ */ final class OAuthTest extends TestCase { - /** * Test OAuth method. * diff --git a/test/PHPMailer/AddEmbeddedImageTest.php b/test/PHPMailer/AddEmbeddedImageTest.php index 500c5d73a..f3a9906c7 100644 --- a/test/PHPMailer/AddEmbeddedImageTest.php +++ b/test/PHPMailer/AddEmbeddedImageTest.php @@ -27,7 +27,6 @@ */ final class AddEmbeddedImageTest extends PreSendTestCase { - /** * Test successfully adding an embedded image. */ diff --git a/test/PHPMailer/AddStringAttachmentTest.php b/test/PHPMailer/AddStringAttachmentTest.php index 43d2a006d..0c58f3c6e 100644 --- a/test/PHPMailer/AddStringAttachmentTest.php +++ b/test/PHPMailer/AddStringAttachmentTest.php @@ -27,7 +27,6 @@ */ final class AddStringAttachmentTest extends PreSendTestCase { - /** * Test successfully adding a simple plain string attachment. */ diff --git a/test/PHPMailer/AddStringEmbeddedImageTest.php b/test/PHPMailer/AddStringEmbeddedImageTest.php index 5cefb97b1..f0ba9d346 100644 --- a/test/PHPMailer/AddStringEmbeddedImageTest.php +++ b/test/PHPMailer/AddStringEmbeddedImageTest.php @@ -26,7 +26,6 @@ */ final class AddStringEmbeddedImageTest extends PreSendTestCase { - /** * Test successfully adding a stingified embedded image without a name. */ diff --git a/test/PHPMailer/AuthCRAMMD5Test.php b/test/PHPMailer/AuthCRAMMD5Test.php index 31d0eb733..1f0b61f2d 100644 --- a/test/PHPMailer/AuthCRAMMD5Test.php +++ b/test/PHPMailer/AuthCRAMMD5Test.php @@ -20,7 +20,6 @@ */ final class AuthCRAMMD5Test extends SendTestCase { - /** * Test CRAM-MD5 authentication. * Needs a connection to a server that supports this auth mechanism, so commented out by default. diff --git a/test/PHPMailer/CustomHeaderTest.php b/test/PHPMailer/CustomHeaderTest.php index 5a31392f0..dce08538e 100644 --- a/test/PHPMailer/CustomHeaderTest.php +++ b/test/PHPMailer/CustomHeaderTest.php @@ -22,7 +22,6 @@ */ final class CustomHeaderTest extends TestCase { - /** * Tests setting and getting custom headers. * diff --git a/test/PHPMailer/DKIMTest.php b/test/PHPMailer/DKIMTest.php index e47c6a0f1..4a63f6913 100644 --- a/test/PHPMailer/DKIMTest.php +++ b/test/PHPMailer/DKIMTest.php @@ -24,7 +24,6 @@ */ final class DKIMTest extends SendTestCase { - /** * Whether or not to initialize the PHPMailer object to throw exceptions. * diff --git a/test/PHPMailer/EncodeQTest.php b/test/PHPMailer/EncodeQTest.php index 4dc180941..c03fbc78d 100644 --- a/test/PHPMailer/EncodeQTest.php +++ b/test/PHPMailer/EncodeQTest.php @@ -23,7 +23,6 @@ */ final class EncodeQTest extends TestCase { - /** * Test encoding a string using Q encoding. * diff --git a/test/PHPMailer/EncodeStringTest.php b/test/PHPMailer/EncodeStringTest.php index 8e343a1d6..33c14332f 100644 --- a/test/PHPMailer/EncodeStringTest.php +++ b/test/PHPMailer/EncodeStringTest.php @@ -22,7 +22,6 @@ */ final class EncodeStringTest extends TestCase { - /** * Encoding and charset tests. * diff --git a/test/PHPMailer/FileIsAccessibleTest.php b/test/PHPMailer/FileIsAccessibleTest.php index 1a1b0929f..e43f47caa 100644 --- a/test/PHPMailer/FileIsAccessibleTest.php +++ b/test/PHPMailer/FileIsAccessibleTest.php @@ -28,7 +28,6 @@ */ final class FileIsAccessibleTest extends TestCase { - /** * Verify whether the "is a file accessible" check works correctly. * diff --git a/test/PHPMailer/FilenameToTypeTest.php b/test/PHPMailer/FilenameToTypeTest.php index 9a9a851f6..fbdb9ba00 100644 --- a/test/PHPMailer/FilenameToTypeTest.php +++ b/test/PHPMailer/FilenameToTypeTest.php @@ -23,7 +23,6 @@ */ final class FilenameToTypeTest extends TestCase { - /** * Verify mapping a file name to a MIME type. * diff --git a/test/PHPMailer/GenerateIdTest.php b/test/PHPMailer/GenerateIdTest.php index fbf776203..5230b4ce9 100644 --- a/test/PHPMailer/GenerateIdTest.php +++ b/test/PHPMailer/GenerateIdTest.php @@ -23,7 +23,6 @@ */ final class GenerateIdTest extends PreSendTestCase { - /** * Test generating a unique ID. * diff --git a/test/PHPMailer/GetLastMessageIDTest.php b/test/PHPMailer/GetLastMessageIDTest.php index 7dab60452..0b5cd8ca3 100644 --- a/test/PHPMailer/GetLastMessageIDTest.php +++ b/test/PHPMailer/GetLastMessageIDTest.php @@ -23,7 +23,6 @@ */ final class GetLastMessageIDTest extends PreSendTestCase { - /** * Test setting and retrieving an invalid message ID. * diff --git a/test/PHPMailer/HasLineLongerThanMaxTest.php b/test/PHPMailer/HasLineLongerThanMaxTest.php index 404008daf..24d4f51e9 100644 --- a/test/PHPMailer/HasLineLongerThanMaxTest.php +++ b/test/PHPMailer/HasLineLongerThanMaxTest.php @@ -21,7 +21,6 @@ */ final class HasLineLongerThanMaxTest extends PreSendTestCase { - /** * Test constructing a multipart message that contains lines that are too long for RFC compliance. * diff --git a/test/PHPMailer/Html2TextTest.php b/test/PHPMailer/Html2TextTest.php index ce0ce5097..51f470097 100644 --- a/test/PHPMailer/Html2TextTest.php +++ b/test/PHPMailer/Html2TextTest.php @@ -23,7 +23,6 @@ */ final class Html2TextTest extends TestCase { - /** * Test converting an arbitrary HTML string into plain text. * diff --git a/test/PHPMailer/ICalTest.php b/test/PHPMailer/ICalTest.php index b5ff86f20..7b99b8de7 100644 --- a/test/PHPMailer/ICalTest.php +++ b/test/PHPMailer/ICalTest.php @@ -20,7 +20,6 @@ */ final class ICalTest extends PreSendTestCase { - /** * Test ICal method. * diff --git a/test/PHPMailer/IsPermittedPathTest.php b/test/PHPMailer/IsPermittedPathTest.php index 89629f6b9..bdbbd52a6 100644 --- a/test/PHPMailer/IsPermittedPathTest.php +++ b/test/PHPMailer/IsPermittedPathTest.php @@ -24,7 +24,6 @@ */ final class IsPermittedPathTest extends TestCase { - /** * Test whether the validation of whether a path is of a permitted type works correctly. * diff --git a/test/PHPMailer/IsValidHostTest.php b/test/PHPMailer/IsValidHostTest.php index 7e8b056d2..41bdeb990 100644 --- a/test/PHPMailer/IsValidHostTest.php +++ b/test/PHPMailer/IsValidHostTest.php @@ -23,7 +23,6 @@ */ final class IsValidHostTest extends TestCase { - /** * Test host validation when a valid host is passed. * diff --git a/test/PHPMailer/LocalizationTest.php b/test/PHPMailer/LocalizationTest.php index f65c82168..9d02f10b7 100644 --- a/test/PHPMailer/LocalizationTest.php +++ b/test/PHPMailer/LocalizationTest.php @@ -31,7 +31,6 @@ */ final class LocalizationTest extends TestCase { - /** * Test setting the preferred language for error messages. * diff --git a/test/PHPMailer/MailTransportTest.php b/test/PHPMailer/MailTransportTest.php index 52a49a590..e073c9189 100644 --- a/test/PHPMailer/MailTransportTest.php +++ b/test/PHPMailer/MailTransportTest.php @@ -20,7 +20,6 @@ */ final class MailTransportTest extends SendTestCase { - /** * Test sending using SendMail. * diff --git a/test/PHPMailer/MbPathinfoTest.php b/test/PHPMailer/MbPathinfoTest.php index d996c0532..72f74e8db 100644 --- a/test/PHPMailer/MbPathinfoTest.php +++ b/test/PHPMailer/MbPathinfoTest.php @@ -23,7 +23,6 @@ */ final class MbPathinfoTest extends TestCase { - /** * Verify retrieving information about a file path when the $options parameter has been passed. * diff --git a/test/PHPMailer/MimeTypesTest.php b/test/PHPMailer/MimeTypesTest.php index 60e661a8a..8a8d794b1 100644 --- a/test/PHPMailer/MimeTypesTest.php +++ b/test/PHPMailer/MimeTypesTest.php @@ -23,7 +23,6 @@ */ final class MimeTypesTest extends TestCase { - /** * Test mime type mapping. * diff --git a/test/PHPMailer/NormalizeBreaksTest.php b/test/PHPMailer/NormalizeBreaksTest.php index 85b0a75ad..d3e1f955b 100644 --- a/test/PHPMailer/NormalizeBreaksTest.php +++ b/test/PHPMailer/NormalizeBreaksTest.php @@ -24,7 +24,6 @@ */ final class NormalizeBreaksTest extends TestCase { - /** * Test line break normalization. * diff --git a/test/PHPMailer/ParseAddressesTest.php b/test/PHPMailer/ParseAddressesTest.php index bc32a51fc..131d830a2 100644 --- a/test/PHPMailer/ParseAddressesTest.php +++ b/test/PHPMailer/ParseAddressesTest.php @@ -28,7 +28,6 @@ */ final class ParseAddressesTest extends TestCase { - /** * Test RFC822 address splitting using the PHPMailer native implementation * with the Mbstring extension available. diff --git a/test/PHPMailer/PunyencodeAddressTest.php b/test/PHPMailer/PunyencodeAddressTest.php index a5fa6e3f3..d45c8e252 100644 --- a/test/PHPMailer/PunyencodeAddressTest.php +++ b/test/PHPMailer/PunyencodeAddressTest.php @@ -23,7 +23,6 @@ */ final class PunyencodeAddressTest extends TestCase { - /** * Test IDN to ASCII form/punycode conversion for an email address. * diff --git a/test/PHPMailer/QuotedStringTest.php b/test/PHPMailer/QuotedStringTest.php index 7948054b2..7a6d0ba5f 100644 --- a/test/PHPMailer/QuotedStringTest.php +++ b/test/PHPMailer/QuotedStringTest.php @@ -23,7 +23,6 @@ */ final class QuotedStringTest extends TestCase { - /** * Test quoting of a string depending on the content of the string. * diff --git a/test/PHPMailer/ReplyToGetSetClearTest.php b/test/PHPMailer/ReplyToGetSetClearTest.php index 48b89d192..4a067203a 100644 --- a/test/PHPMailer/ReplyToGetSetClearTest.php +++ b/test/PHPMailer/ReplyToGetSetClearTest.php @@ -22,7 +22,6 @@ */ final class ReplyToGetSetClearTest extends PreSendTestCase { - /** * Test adding a non-IDN reply-to address. * diff --git a/test/PHPMailer/SetErrorTest.php b/test/PHPMailer/SetErrorTest.php index d2daa7a78..e26850a57 100644 --- a/test/PHPMailer/SetErrorTest.php +++ b/test/PHPMailer/SetErrorTest.php @@ -24,7 +24,6 @@ */ final class SetErrorTest extends TestCase { - /** * Test simple, non-STMP, error registration. */ diff --git a/test/PHPMailer/SetFromTest.php b/test/PHPMailer/SetFromTest.php index f74e32e64..41800e7e1 100644 --- a/test/PHPMailer/SetFromTest.php +++ b/test/PHPMailer/SetFromTest.php @@ -24,7 +24,6 @@ */ final class SetFromTest extends TestCase { - /** * Test succesfully setting the From, FromName and Sender properties. * diff --git a/test/PHPMailer/SetTest.php b/test/PHPMailer/SetTest.php index 629c86f8b..a66ec551f 100644 --- a/test/PHPMailer/SetTest.php +++ b/test/PHPMailer/SetTest.php @@ -22,7 +22,6 @@ */ final class SetTest extends TestCase { - /** * Test setting the value of a class property. * diff --git a/test/PHPMailer/SetWordWrapTest.php b/test/PHPMailer/SetWordWrapTest.php index ae1745445..8a4f6f808 100644 --- a/test/PHPMailer/SetWordWrapTest.php +++ b/test/PHPMailer/SetWordWrapTest.php @@ -23,7 +23,6 @@ */ final class SetWordWrapTest extends PreSendTestCase { - /** * Test word-wrapping a message. * diff --git a/test/PHPMailer/Utf8CharBoundaryTest.php b/test/PHPMailer/Utf8CharBoundaryTest.php index 7b19056cb..463f785f5 100644 --- a/test/PHPMailer/Utf8CharBoundaryTest.php +++ b/test/PHPMailer/Utf8CharBoundaryTest.php @@ -24,7 +24,6 @@ */ final class Utf8CharBoundaryTest extends TestCase { - /** * Verify that the utf8CharBoundary() returns the correct last character boundary for encoded text. * diff --git a/test/PHPMailer/ValidateAddressCustomValidatorTest.php b/test/PHPMailer/ValidateAddressCustomValidatorTest.php index 1e729a3a3..d9660c068 100644 --- a/test/PHPMailer/ValidateAddressCustomValidatorTest.php +++ b/test/PHPMailer/ValidateAddressCustomValidatorTest.php @@ -23,7 +23,6 @@ */ final class ValidateAddressCustomValidatorTest extends TestCase { - /** * Test injecting a one-off custom validator. */ diff --git a/test/PHPMailer/ValidateAddressTest.php b/test/PHPMailer/ValidateAddressTest.php index 3bda974cc..f8400e9a8 100644 --- a/test/PHPMailer/ValidateAddressTest.php +++ b/test/PHPMailer/ValidateAddressTest.php @@ -33,7 +33,6 @@ */ final class ValidateAddressTest extends TestCase { - /** * Run before this test class. */ diff --git a/test/PHPMailer/WrapTextTest.php b/test/PHPMailer/WrapTextTest.php index c50417c65..43bd0dfe8 100644 --- a/test/PHPMailer/WrapTextTest.php +++ b/test/PHPMailer/WrapTextTest.php @@ -23,7 +23,6 @@ */ final class WrapTextTest extends TestCase { - /** * Test wrapping text. * diff --git a/test/POP3/PopBeforeSmtpTest.php b/test/POP3/PopBeforeSmtpTest.php index 49c313af1..76fe017d5 100644 --- a/test/POP3/PopBeforeSmtpTest.php +++ b/test/POP3/PopBeforeSmtpTest.php @@ -25,7 +25,6 @@ */ final class PopBeforeSmtpTest extends TestCase { - /** * PIDs of any processes we need to kill. * diff --git a/test/PreSendTestCase.php b/test/PreSendTestCase.php index 0498219a2..08a518582 100644 --- a/test/PreSendTestCase.php +++ b/test/PreSendTestCase.php @@ -21,7 +21,6 @@ */ abstract class PreSendTestCase extends TestCase { - /** * Property names and their values for the test instance of the PHPMailer class. * diff --git a/test/Security/DenialOfServiceVectorsTest.php b/test/Security/DenialOfServiceVectorsTest.php index 450716a9b..313382505 100644 --- a/test/Security/DenialOfServiceVectorsTest.php +++ b/test/Security/DenialOfServiceVectorsTest.php @@ -22,7 +22,6 @@ */ final class DenialOfServiceVectorsTest extends SendTestCase { - /** * Test this denial of service attack. * diff --git a/test/SendTestCase.php b/test/SendTestCase.php index 5bb74e9a5..24338eb51 100644 --- a/test/SendTestCase.php +++ b/test/SendTestCase.php @@ -20,7 +20,6 @@ */ abstract class SendTestCase extends PreSendTestCase { - /** * Translation map for supported $REQUEST keys to the property name in the PHPMailer class. * diff --git a/test/TestCase.php b/test/TestCase.php index 98ec9063f..bd3622def 100644 --- a/test/TestCase.php +++ b/test/TestCase.php @@ -24,7 +24,6 @@ */ abstract class TestCase extends PolyfillTestCase { - /** * Whether or not to initialize the PHPMailer object to throw exceptions. *