From a54b4d69ad1bc986e38323c62bbceb085287e71c Mon Sep 17 00:00:00 2001 From: core23 Date: Tue, 7 Dec 2021 19:17:33 +0100 Subject: [PATCH] Add symfony 6 support --- .github/settings.yml | 4 +++ .github/workflows/continuous-integration.yml | 1 + composer.json | 30 ++++++++++---------- src/Mailer/SymfonyMailer.php | 4 +-- tests/App/config/config.yaml | 2 +- 5 files changed, 23 insertions(+), 18 deletions(-) diff --git a/.github/settings.yml b/.github/settings.yml index c71327a..f17264f 100644 --- a/.github/settings.yml +++ b/.github/settings.yml @@ -18,8 +18,12 @@ branches: - "Static Code Analysis (8.1)" - "Test (PHP 8, symfony 5.4, lowest)" - "Test (PHP 8, symfony 5.4, highest)" + - "Test (PHP 8, symfony 6, lowest)" + - "Test (PHP 8, symfony 6, highest)" - "Test (PHP 8.1, symfony 5.4, lowest)" - "Test (PHP 8.1, symfony 5.4, highest)" + - "Test (PHP 8.1, symfony 6, lowest)" + - "Test (PHP 8.1, symfony 6, highest)" - "Code Coverage (8.1)" - "Mutation Tests (8.1)" strict: true diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 19e04d6..856100e 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -119,6 +119,7 @@ jobs: symfony: - 5.4 + - 6.0 steps: - name: "Checkout" diff --git a/composer.json b/composer.json index 553bcc6..77bb2e6 100644 --- a/composer.json +++ b/composer.json @@ -41,30 +41,30 @@ "ext-json": "*", "ext-soap": "*", "nucleos/twig-extensions": "^2.0", - "psr/log": "^1.0 || ^2.0", + "psr/log": "^1.0 || ^2.0 || ^3.0", "sonata-project/block-bundle": "^3.23.0 || ^4.5.1", "sonata-project/doctrine-extensions": "^1.1", "sonata-project/form-extensions": "^0.1.1 || ^1.4", - "symfony/config": "^5.4", - "symfony/console": "^5.4", - "symfony/dependency-injection": "^5.4", - "symfony/expression-language": "^5.4", - "symfony/form": "^5.4", - "symfony/framework-bundle": "^5.4", - "symfony/http-foundation": "^5.4", - "symfony/http-kernel": "^5.4", - "symfony/mailer": "^5.4", - "symfony/mime": "^5.4", - "symfony/options-resolver": "^5.4", - "symfony/translation-contracts": "^1.1 || ^2.0", - "symfony/twig-bridge": "^5.4", + "symfony/config": "^5.4 || ^6.0", + "symfony/console": "^5.4 || ^6.0", + "symfony/dependency-injection": "^5.4 || ^6.0", + "symfony/expression-language": "^5.4 || ^6.0", + "symfony/form": "^5.4 || ^6.0", + "symfony/framework-bundle": "^5.4 || ^6.0", + "symfony/http-foundation": "^5.4 || ^6.0", + "symfony/http-kernel": "^5.4 || ^6.0", + "symfony/mailer": "^5.4 || ^6.0", + "symfony/mime": "^5.4 || ^6.0", + "symfony/options-resolver": "^5.4 || ^6.0", + "symfony/translation-contracts": "^1.1 || ^2.0 || ^3.0", + "symfony/twig-bridge": "^5.4 || ^6.0", "twig/intl-extra": "^2.4 || ^3.0", "twig/twig": "^2.4 || ^3.0" }, "require-dev": { "bamarni/composer-bin-plugin": "^1.2", "ergebnis/composer-normalize": "^2.0.1", - "symfony/browser-kit": "^5.4" + "symfony/browser-kit": "^5.4 || ^6.0" }, "autoload": { "psr-4": { diff --git a/src/Mailer/SymfonyMailer.php b/src/Mailer/SymfonyMailer.php index 703ac93..e2e8148 100755 --- a/src/Mailer/SymfonyMailer.php +++ b/src/Mailer/SymfonyMailer.php @@ -49,8 +49,8 @@ public function sendSpaceWarning(AccountWarning $warning): bool } $mail = (new SpaceWarningMail()) - ->from(Address::fromString($this->emails['warning']['from'])) - ->to(Address::fromString($this->emails['warning']['to'])) + ->from(Address::create($this->emails['warning']['from'])) + ->to(Address::create($this->emails['warning']['to'])) ->subject($this->translator->trans('space_warning.subject', [ '%account%' => $warning->getAccount(), ], 'NucleosAllInklBundle')) diff --git a/tests/App/config/config.yaml b/tests/App/config/config.yaml index 24e8977..3f31a47 100644 --- a/tests/App/config/config.yaml +++ b/tests/App/config/config.yaml @@ -4,7 +4,7 @@ framework: translator: null session: - storage_id: session.storage.mock_file + storage_factory_id: session.storage.factory.mock_file handler_id: session.handler.native_file mailer: