diff --git a/.env b/.env index 56d36a88ec..dbc55561d1 100644 --- a/.env +++ b/.env @@ -14,14 +14,6 @@ APP_SECRET=EDITME # Set "serverVersion" to your server version to avoid edge-case exceptions and extra database calls DATABASE_URL=mysql://root@127.0.0.1/sylius_%kernel.environment% ###< doctrine/doctrine-bundle ### - -###> symfony/swiftmailer-bundle ### -# For Gmail as a transport, use: "gmail://username:password@localhost" -# For a generic SMTP server, use: "smtp://localhost:25?encryption=&auth_mode=" -# Delivery is disabled by default via "null://localhost" -MAILER_URL=null://localhost -###< symfony/swiftmailer-bundle ### - ###> symfony/messenger ### # Choose one of the transports below # MESSENGER_TRANSPORT_DSN=amqp://guest:guest@localhost:5672/%2f/messages @@ -34,3 +26,7 @@ JWT_SECRET_KEY=%kernel.project_dir%/config/jwt/private.pem JWT_PUBLIC_KEY=%kernel.project_dir%/config/jwt/public.pem JWT_PASSPHRASE=e7c5fca1060bdf6ad23c33e4c236081f ###< lexik/jwt-authentication-bundle ### + +###> symfony/mailer ### +MAILER_DSN=null://null +###< symfony/mailer ### diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index feb0d00893..a39107281e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -180,8 +180,12 @@ jobs: run: vendor/bin/behat --colors --strict --no-interaction -vvv -f progress --tags="~@javascript&&~@todo&&~@cli&&@managing_catalog_promotions" - - name: Run non-JS Behat (without managing catalog promotion scenarios) - run: vendor/bin/behat --colors --strict --no-interaction -vvv -f progress --tags="~@javascript&&~@todo&&~@cli&&@~managing_catalog_promotions" + name: Run managing exchange rates scenarios + run: vendor/bin/behat --colors --strict --no-interaction -vvv -f progress --tags="~@javascript&&~@todo&&~@cli&&@managing_exchange_rates" + + - + name: Run non-JS Behat (without managing catalog promotion scenarios and exchange rates) + run: vendor/bin/behat --colors --strict --no-interaction -vvv -f progress --tags="~@javascript&&~@todo&&~@cli&&@~managing_catalog_promotions&&@~managing_exchange_rates" - name: Run JS Behat diff --git a/config/bundles.php b/config/bundles.php index 7582b0782a..08f9762a40 100644 --- a/config/bundles.php +++ b/config/bundles.php @@ -4,7 +4,6 @@ Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true], Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true], Symfony\Bundle\SecurityBundle\SecurityBundle::class => ['all' => true], - Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle::class => ['all' => true], Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true], Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true], Sylius\Calendar\SyliusCalendarBundle::class => ['all' => true], diff --git a/config/packages/dev/swiftmailer.yaml b/config/packages/dev/swiftmailer.yaml deleted file mode 100644 index f43807805e..0000000000 --- a/config/packages/dev/swiftmailer.yaml +++ /dev/null @@ -1,2 +0,0 @@ -swiftmailer: - disable_delivery: true diff --git a/config/packages/framework.yaml b/config/packages/framework.yaml index 7a34263834..97695e6248 100644 --- a/config/packages/framework.yaml +++ b/config/packages/framework.yaml @@ -1,7 +1,9 @@ framework: translator: { fallbacks: ["%locale%"] } secret: '%env(APP_SECRET)%' - form: true + form: + enabled: true + legacy_error_messages: false csrf_protection: true session: handler_id: ~ diff --git a/config/packages/mailer.yaml b/config/packages/mailer.yaml new file mode 100644 index 0000000000..56a650d89b --- /dev/null +++ b/config/packages/mailer.yaml @@ -0,0 +1,3 @@ +framework: + mailer: + dsn: '%env(MAILER_DSN)%' diff --git a/config/packages/staging/swiftmailer.yaml b/config/packages/staging/swiftmailer.yaml deleted file mode 100644 index f43807805e..0000000000 --- a/config/packages/staging/swiftmailer.yaml +++ /dev/null @@ -1,2 +0,0 @@ -swiftmailer: - disable_delivery: true diff --git a/config/packages/swiftmailer.yaml b/config/packages/swiftmailer.yaml deleted file mode 100644 index 3bab0d32f3..0000000000 --- a/config/packages/swiftmailer.yaml +++ /dev/null @@ -1,2 +0,0 @@ -swiftmailer: - url: '%env(MAILER_URL)%' diff --git a/config/packages/test/framework.yaml b/config/packages/test/framework.yaml index 76d7e5e115..a47667c15e 100644 --- a/config/packages/test/framework.yaml +++ b/config/packages/test/framework.yaml @@ -1,4 +1,8 @@ framework: test: ~ session: - storage_id: session.storage.mock_file + storage_factory_id: session.storage.factory.mock_file + cache: + pools: + test.mailer_pool: + adapter: cache.adapter.filesystem diff --git a/config/packages/test/security.yaml b/config/packages/test/security.yaml deleted file mode 100644 index c04de4ddb7..0000000000 --- a/config/packages/test/security.yaml +++ /dev/null @@ -1,7 +0,0 @@ -security: - encoders: - sha512: sha512 - Sylius\Component\User\Model\UserInterface: sha512 - -sylius_user: - encoder: sha512 diff --git a/config/packages/test/swiftmailer.yaml b/config/packages/test/swiftmailer.yaml deleted file mode 100644 index c438f4b256..0000000000 --- a/config/packages/test/swiftmailer.yaml +++ /dev/null @@ -1,6 +0,0 @@ -swiftmailer: - disable_delivery: true - logging: true - spool: - type: file - path: "%kernel.cache_dir%/spool" diff --git a/config/packages/test_cached/framework.yaml b/config/packages/test_cached/framework.yaml index 76d7e5e115..a47667c15e 100644 --- a/config/packages/test_cached/framework.yaml +++ b/config/packages/test_cached/framework.yaml @@ -1,4 +1,8 @@ framework: test: ~ session: - storage_id: session.storage.mock_file + storage_factory_id: session.storage.factory.mock_file + cache: + pools: + test.mailer_pool: + adapter: cache.adapter.filesystem diff --git a/config/packages/test_cached/security.yaml b/config/packages/test_cached/security.yaml deleted file mode 100644 index c04de4ddb7..0000000000 --- a/config/packages/test_cached/security.yaml +++ /dev/null @@ -1,7 +0,0 @@ -security: - encoders: - sha512: sha512 - Sylius\Component\User\Model\UserInterface: sha512 - -sylius_user: - encoder: sha512 diff --git a/config/packages/test_cached/swiftmailer.yaml b/config/packages/test_cached/swiftmailer.yaml deleted file mode 100644 index c438f4b256..0000000000 --- a/config/packages/test_cached/swiftmailer.yaml +++ /dev/null @@ -1,6 +0,0 @@ -swiftmailer: - disable_delivery: true - logging: true - spool: - type: file - path: "%kernel.cache_dir%/spool" diff --git a/symfony.lock b/symfony.lock index 89eb8ae29e..38466de000 100644 --- a/symfony.lock +++ b/symfony.lock @@ -43,9 +43,6 @@ "coduo/php-to-string": { "version": "2.0.1" }, - "composer/package-versions-deprecated": { - "version": "1.11.99.1" - }, "dealerdirect/phpcodesniffer-composer-installer": { "version": "v0.7.1" }, @@ -308,9 +305,6 @@ "pagerfanta/pagerfanta": { "version": "v2.0.1" }, - "paragonie/random_compat": { - "version": "v2.0.17" - }, "payum/iso4217": { "version": "1.0.1" }, @@ -503,9 +497,6 @@ "stripe/stripe-php": { "version": "v6.28.1" }, - "swiftmailer/swiftmailer": { - "version": "v6.1.2" - }, "sylius-labs/association-hydrator": { "version": "v1.1.0" }, @@ -656,6 +647,18 @@ "symfony/intl": { "version": "v4.1.3" }, + "symfony/mailer": { + "version": "5.4", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "main", + "version": "4.3", + "ref": "97a61eabb351d7f6cb7702039bcfe07fe9d7e03c" + }, + "files": [ + "config/packages/mailer.yaml" + ] + }, "symfony/messenger": { "version": "4.3", "recipe": { @@ -752,15 +755,6 @@ "symfony/string": { "version": "v5.2.1" }, - "symfony/swiftmailer-bundle": { - "version": "2.5", - "recipe": { - "repo": "github.com/symfony/recipes", - "branch": "master", - "version": "2.5", - "ref": "3db029c03e452b4a23f7fc45cec7c922c2247eb8" - } - }, "symfony/templating": { "version": "v4.1.3" },