From 0a85f0c58b5112e3f4383ab22fea2f5b1835060f Mon Sep 17 00:00:00 2001 From: Ivo Monteiro Date: Wed, 22 Mar 2023 21:51:32 +0000 Subject: [PATCH 1/7] Move to Psr containers (deprecate Interop\Container\ContainerInterface) --- composer.json | 4 ++-- src/Factory/AwsSdkFactory.php | 2 +- src/Factory/ElasticEmailServiceFactory.php | 2 +- src/Factory/ElasticEmailTransportFactory.php | 2 +- src/Factory/HttpClientFactory.php | 2 +- src/Factory/MailgunServiceFactory.php | 4 ++-- src/Factory/MailgunTransportFactory.php | 2 +- src/Factory/MandrillServiceFactory.php | 2 +- src/Factory/MandrillTransportFactory.php | 2 +- src/Factory/PostageServiceFactory.php | 4 ++-- src/Factory/PostageTransportFactory.php | 2 +- src/Factory/PostmarkServiceFactory.php | 2 +- src/Factory/PostmarkTransportFactory.php | 2 +- src/Factory/SendGridServiceFactory.php | 2 +- src/Factory/SendGridTransportFactory.php | 2 +- src/Factory/SesServiceFactory.php | 2 +- src/Factory/SesTransportFactory.php | 2 +- src/Factory/SparkPostServiceFactory.php | 2 +- src/Factory/SparkPostTransportFactory.php | 2 +- 19 files changed, 22 insertions(+), 22 deletions(-) diff --git a/composer.json b/composer.json index ad230b0..12ca6ae 100644 --- a/composer.json +++ b/composer.json @@ -40,10 +40,10 @@ "laminas/laminas-mail": "^2.9", "laminas/laminas-http": "^2.8", "laminas/laminas-mime": "^2.7", - "laminas/laminas-servicemanager": "^3.3" + "laminas/laminas-servicemanager": "^3.11" }, "require-dev": { - "container-interop/container-interop": "^1.1", + "psr/container": "^1.0 || ^2.0", "guzzlehttp/guzzle": "^7.4", "laminas/laminas-modulemanager": "^2.8", "laminas/laminas-mvc": "^3.1", diff --git a/src/Factory/AwsSdkFactory.php b/src/Factory/AwsSdkFactory.php index f2e2571..736b3e4 100644 --- a/src/Factory/AwsSdkFactory.php +++ b/src/Factory/AwsSdkFactory.php @@ -5,7 +5,7 @@ use Aws\Sdk; -use Interop\Container\ContainerInterface; +use Psr\Container\ContainerInterface; use Laminas\ServiceManager\Factory\FactoryInterface; use SlmMail\Factory\Exception\RuntimeException; diff --git a/src/Factory/ElasticEmailServiceFactory.php b/src/Factory/ElasticEmailServiceFactory.php index da12fbe..2a4e3ec 100644 --- a/src/Factory/ElasticEmailServiceFactory.php +++ b/src/Factory/ElasticEmailServiceFactory.php @@ -41,7 +41,7 @@ namespace SlmMail\Factory; -use Interop\Container\ContainerInterface; +use Psr\Container\ContainerInterface; use Laminas\ServiceManager\Factory\FactoryInterface; use SlmMail\Factory\Exception\RuntimeException; use SlmMail\Service\ElasticEmailService; diff --git a/src/Factory/ElasticEmailTransportFactory.php b/src/Factory/ElasticEmailTransportFactory.php index 90155d5..431477d 100644 --- a/src/Factory/ElasticEmailTransportFactory.php +++ b/src/Factory/ElasticEmailTransportFactory.php @@ -41,7 +41,7 @@ namespace SlmMail\Factory; -use Interop\Container\ContainerInterface; +use Psr\Container\ContainerInterface; use Laminas\ServiceManager\Factory\FactoryInterface; use SlmMail\Mail\Transport\HttpTransport; use SlmMail\Service\ElasticEmailService; diff --git a/src/Factory/HttpClientFactory.php b/src/Factory/HttpClientFactory.php index 54d54f6..d5b9006 100644 --- a/src/Factory/HttpClientFactory.php +++ b/src/Factory/HttpClientFactory.php @@ -41,7 +41,7 @@ namespace SlmMail\Factory; -use Interop\Container\ContainerInterface; +use Psr\Container\ContainerInterface; use Laminas\Http\Client as HttpClient; use Laminas\ServiceManager\Factory\FactoryInterface; diff --git a/src/Factory/MailgunServiceFactory.php b/src/Factory/MailgunServiceFactory.php index cc42e89..45aadbc 100644 --- a/src/Factory/MailgunServiceFactory.php +++ b/src/Factory/MailgunServiceFactory.php @@ -41,8 +41,8 @@ namespace SlmMail\Factory; -use Interop\Container\ContainerInterface; -use Interop\Container\Exception\ContainerException; +use Psr\Container\ContainerInterface; +use Psr\Container\ContainerExceptionInterface; use SlmMail\Factory\Exception\RuntimeException; use SlmMail\Service\MailgunService; use Laminas\ServiceManager\Exception\ServiceNotCreatedException; diff --git a/src/Factory/MailgunTransportFactory.php b/src/Factory/MailgunTransportFactory.php index 3ab6426..807f7b5 100644 --- a/src/Factory/MailgunTransportFactory.php +++ b/src/Factory/MailgunTransportFactory.php @@ -41,7 +41,7 @@ namespace SlmMail\Factory; -use Interop\Container\ContainerInterface; +use Psr\Container\ContainerInterface; use Laminas\ServiceManager\Factory\FactoryInterface; use SlmMail\Mail\Transport\HttpTransport; use SlmMail\Service\MailgunService; diff --git a/src/Factory/MandrillServiceFactory.php b/src/Factory/MandrillServiceFactory.php index 02d772e..5be8c93 100644 --- a/src/Factory/MandrillServiceFactory.php +++ b/src/Factory/MandrillServiceFactory.php @@ -41,7 +41,7 @@ namespace SlmMail\Factory; -use Interop\Container\ContainerInterface; +use Psr\Container\ContainerInterface; use Laminas\ServiceManager\Factory\FactoryInterface; use SlmMail\Factory\Exception\RuntimeException; use SlmMail\Service\MandrillService; diff --git a/src/Factory/MandrillTransportFactory.php b/src/Factory/MandrillTransportFactory.php index 808a8d9..a9460cf 100644 --- a/src/Factory/MandrillTransportFactory.php +++ b/src/Factory/MandrillTransportFactory.php @@ -41,7 +41,7 @@ namespace SlmMail\Factory; -use Interop\Container\ContainerInterface; +use Psr\Container\ContainerInterface; use Laminas\ServiceManager\Factory\FactoryInterface; use SlmMail\Mail\Transport\HttpTransport; use SlmMail\Service\MandrillService; diff --git a/src/Factory/PostageServiceFactory.php b/src/Factory/PostageServiceFactory.php index 57db13f..b7c543e 100644 --- a/src/Factory/PostageServiceFactory.php +++ b/src/Factory/PostageServiceFactory.php @@ -41,8 +41,8 @@ namespace SlmMail\Factory; -use Interop\Container\ContainerInterface; -use Interop\Container\Exception\ContainerException; +use Psr\Container\ContainerInterface; +use Psr\Container\ContainerExceptionInterface; use SlmMail\Factory\Exception\RuntimeException; use SlmMail\Service\PostageService; use Laminas\ServiceManager\Exception\ServiceNotCreatedException; diff --git a/src/Factory/PostageTransportFactory.php b/src/Factory/PostageTransportFactory.php index c5a5c4f..893b0e2 100644 --- a/src/Factory/PostageTransportFactory.php +++ b/src/Factory/PostageTransportFactory.php @@ -41,7 +41,7 @@ namespace SlmMail\Factory; -use Interop\Container\ContainerInterface; +use Psr\Container\ContainerInterface; use Laminas\ServiceManager\Factory\FactoryInterface; use SlmMail\Mail\Transport\HttpTransport; use SlmMail\Service\PostageService; diff --git a/src/Factory/PostmarkServiceFactory.php b/src/Factory/PostmarkServiceFactory.php index 51abf17..b8d235b 100644 --- a/src/Factory/PostmarkServiceFactory.php +++ b/src/Factory/PostmarkServiceFactory.php @@ -41,7 +41,7 @@ namespace SlmMail\Factory; -use Interop\Container\ContainerInterface; +use Psr\Container\ContainerInterface; use Laminas\ServiceManager\Factory\FactoryInterface; use SlmMail\Factory\Exception\RuntimeException; use SlmMail\Service\PostmarkService; diff --git a/src/Factory/PostmarkTransportFactory.php b/src/Factory/PostmarkTransportFactory.php index 2a86dd4..8db758c 100644 --- a/src/Factory/PostmarkTransportFactory.php +++ b/src/Factory/PostmarkTransportFactory.php @@ -41,7 +41,7 @@ namespace SlmMail\Factory; -use Interop\Container\ContainerInterface; +use Psr\Container\ContainerInterface; use Laminas\ServiceManager\Factory\FactoryInterface; use SlmMail\Mail\Transport\HttpTransport; use SlmMail\Service\PostmarkService; diff --git a/src/Factory/SendGridServiceFactory.php b/src/Factory/SendGridServiceFactory.php index 149752c..ad2694e 100644 --- a/src/Factory/SendGridServiceFactory.php +++ b/src/Factory/SendGridServiceFactory.php @@ -41,7 +41,7 @@ namespace SlmMail\Factory; -use Interop\Container\ContainerInterface; +use Psr\Container\ContainerInterface; use Laminas\ServiceManager\Factory\FactoryInterface; use SlmMail\Factory\Exception\RuntimeException; use SlmMail\Service\SendGridService; diff --git a/src/Factory/SendGridTransportFactory.php b/src/Factory/SendGridTransportFactory.php index 5c9b11d..a1f5934 100644 --- a/src/Factory/SendGridTransportFactory.php +++ b/src/Factory/SendGridTransportFactory.php @@ -41,7 +41,7 @@ namespace SlmMail\Factory; -use Interop\Container\ContainerInterface; +use Psr\Container\ContainerInterface; use Laminas\ServiceManager\Factory\FactoryInterface; use SlmMail\Mail\Transport\HttpTransport; use SlmMail\Service\SendGridService; diff --git a/src/Factory/SesServiceFactory.php b/src/Factory/SesServiceFactory.php index 09b5366..0a5c71b 100644 --- a/src/Factory/SesServiceFactory.php +++ b/src/Factory/SesServiceFactory.php @@ -41,7 +41,7 @@ namespace SlmMail\Factory; -use Interop\Container\ContainerInterface; +use Psr\Container\ContainerInterface; use Laminas\ServiceManager\Factory\FactoryInterface; use SlmMail\Service\SesService; diff --git a/src/Factory/SesTransportFactory.php b/src/Factory/SesTransportFactory.php index 19905af..f487cc6 100644 --- a/src/Factory/SesTransportFactory.php +++ b/src/Factory/SesTransportFactory.php @@ -41,7 +41,7 @@ namespace SlmMail\Factory; -use Interop\Container\ContainerInterface; +use Psr\Container\ContainerInterface; use Laminas\ServiceManager\Factory\FactoryInterface; use SlmMail\Mail\Transport\HttpTransport; use SlmMail\Service\SesService; diff --git a/src/Factory/SparkPostServiceFactory.php b/src/Factory/SparkPostServiceFactory.php index f330a3a..6ac5417 100644 --- a/src/Factory/SparkPostServiceFactory.php +++ b/src/Factory/SparkPostServiceFactory.php @@ -41,7 +41,7 @@ namespace SlmMail\Factory; -use Interop\Container\ContainerInterface; +use Psr\Container\ContainerInterface; use Laminas\ServiceManager\Factory\FactoryInterface; use SlmMail\Factory\Exception\RuntimeException; use SlmMail\Service\SparkPostService; diff --git a/src/Factory/SparkPostTransportFactory.php b/src/Factory/SparkPostTransportFactory.php index ee02a02..02384e3 100644 --- a/src/Factory/SparkPostTransportFactory.php +++ b/src/Factory/SparkPostTransportFactory.php @@ -41,7 +41,7 @@ namespace SlmMail\Factory; -use Interop\Container\ContainerInterface; +use Psr\Container\ContainerInterface; use Laminas\ServiceManager\Factory\FactoryInterface; use SlmMail\Mail\Transport\HttpTransport; use SlmMail\Service\SparkPostService; From c8dfa74592db6e966c8cced67e295fdd7faad64f Mon Sep 17 00:00:00 2001 From: Ivo Monteiro Date: Wed, 22 Mar 2023 22:09:37 +0000 Subject: [PATCH 2/7] Small fix to composer.json --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 12ca6ae..3ec9601 100644 --- a/composer.json +++ b/composer.json @@ -71,7 +71,7 @@ } }, "extra": { - "zf": { + "laminas": { "component": "SlmMail", "config-provider": "SlmMail\\ConfigProvider" } From 8cfc236113129abc1014ed05fcdeb706b9b2a66e Mon Sep 17 00:00:00 2001 From: Ivo Monteiro Date: Wed, 22 Mar 2023 22:19:11 +0000 Subject: [PATCH 3/7] Require PHP 7.4 and allow PHP 8.1 and 8.2 --- .github/workflows/ci.yml | 4 ++-- composer.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9cdcba5..c114a58 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,10 +15,10 @@ jobs: strategy: matrix: php-version: - - "7.2" - - "7.3" - "7.4" - "8.0" + - "8.1" + - "8.2" dependencies: - "highest" - "lowest" diff --git a/composer.json b/composer.json index 3ec9601..fe29535 100644 --- a/composer.json +++ b/composer.json @@ -36,7 +36,7 @@ } ], "require": { - "php": "^7.2 || ^8.0", + "php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0", "laminas/laminas-mail": "^2.9", "laminas/laminas-http": "^2.8", "laminas/laminas-mime": "^2.7", From 1ded6d0f8394b43ac5053f4436223dbfa8a8dddf Mon Sep 17 00:00:00 2001 From: Ivo Monteiro Date: Wed, 22 Mar 2023 22:33:16 +0000 Subject: [PATCH 4/7] Fix $GLOBALS issue with PHPUnit (variable restriction since PHP 8.1) --- tests/phpunit.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/phpunit.xml b/tests/phpunit.xml index b7e6e90..3018bc3 100644 --- a/tests/phpunit.xml +++ b/tests/phpunit.xml @@ -1,5 +1,5 @@ - + ./src From 72c7f61987f4f969816982add4319bc799865942 Mon Sep 17 00:00:00 2001 From: Ivo Monteiro Date: Wed, 22 Mar 2023 22:33:16 +0000 Subject: [PATCH 5/7] Fix $GLOBALS issue with PHPUnit (variable restriction since PHP 8.1) --- composer.json | 2 +- tests/phpunit.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index fe29535..605d1b6 100644 --- a/composer.json +++ b/composer.json @@ -54,7 +54,7 @@ "laminas/laminas-config": "^3.3", "doctrine/instantiator": "^1.3", "squizlabs/php_codesniffer": "^3.5", - "phpunit/phpunit": "^8.5.8 || ^9.4.2", + "phpunit/phpunit": "^9.4.2", "aws/aws-sdk-php": "^3.184" }, "suggest": { diff --git a/tests/phpunit.xml b/tests/phpunit.xml index b7e6e90..3018bc3 100644 --- a/tests/phpunit.xml +++ b/tests/phpunit.xml @@ -1,5 +1,5 @@ - + ./src From e599d382ea78a756749c7c21d777cf42e15e82f6 Mon Sep 17 00:00:00 2001 From: Ivo Monteiro Date: Wed, 22 Mar 2023 23:02:06 +0000 Subject: [PATCH 6/7] Bump aws-sdk (phpunit test issue) --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 605d1b6..133734d 100644 --- a/composer.json +++ b/composer.json @@ -55,7 +55,7 @@ "doctrine/instantiator": "^1.3", "squizlabs/php_codesniffer": "^3.5", "phpunit/phpunit": "^9.4.2", - "aws/aws-sdk-php": "^3.184" + "aws/aws-sdk-php": "^3.208.4" }, "suggest": { "aws/aws-sdk-php": "If you need to use Amazon SES" From 901fdc76aa9ff6f891b8fdcf217cda607a302ee9 Mon Sep 17 00:00:00 2001 From: Ivo Monteiro Date: Wed, 22 Mar 2023 23:05:21 +0000 Subject: [PATCH 7/7] Bump PHPUnit --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 133734d..c9f5111 100644 --- a/composer.json +++ b/composer.json @@ -54,7 +54,7 @@ "laminas/laminas-config": "^3.3", "doctrine/instantiator": "^1.3", "squizlabs/php_codesniffer": "^3.5", - "phpunit/phpunit": "^9.4.2", + "phpunit/phpunit": "^9.6.5", "aws/aws-sdk-php": "^3.208.4" }, "suggest": {