Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace Switfmailer with Symfony Mailer #848

Merged
merged 5 commits into from
Oct 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 ###
8 changes: 6 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
run: vendor/bin/behat --colors --strict --no-interaction -vvv -f progress --tags="~@javascript&&~@todo&&~@cli&&@~managing_catalog_promotions&&@~managing_exchange_rates"
run: vendor/bin/behat --colors --strict --no-interaction -vvv -f progress --tags="~@javascript&&~@todo&&~@cli&&~@managing_catalog_promotions&&~@managing_exchange_rates"

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How is that releated to the replacement of SwiftMailer by SymfonyMailer ?


-
name: Run JS Behat
Expand Down
1 change: 0 additions & 1 deletion config/bundles.php
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down
2 changes: 0 additions & 2 deletions config/packages/dev/swiftmailer.yaml

This file was deleted.

4 changes: 3 additions & 1 deletion config/packages/framework.yaml
Original file line number Diff line number Diff line change
@@ -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: ~
Expand Down
3 changes: 3 additions & 0 deletions config/packages/mailer.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
framework:
mailer:
dsn: '%env(MAILER_DSN)%'
2 changes: 0 additions & 2 deletions config/packages/staging/swiftmailer.yaml

This file was deleted.

2 changes: 0 additions & 2 deletions config/packages/swiftmailer.yaml

This file was deleted.

6 changes: 5 additions & 1 deletion config/packages/test/framework.yaml
Original file line number Diff line number Diff line change
@@ -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
7 changes: 0 additions & 7 deletions config/packages/test/security.yaml

This file was deleted.

6 changes: 0 additions & 6 deletions config/packages/test/swiftmailer.yaml

This file was deleted.

6 changes: 5 additions & 1 deletion config/packages/test_cached/framework.yaml
Original file line number Diff line number Diff line change
@@ -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
7 changes: 0 additions & 7 deletions config/packages/test_cached/security.yaml

This file was deleted.

6 changes: 0 additions & 6 deletions config/packages/test_cached/swiftmailer.yaml

This file was deleted.

30 changes: 12 additions & 18 deletions symfony.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down Expand Up @@ -308,9 +305,6 @@
"pagerfanta/pagerfanta": {
"version": "v2.0.1"
},
"paragonie/random_compat": {
"version": "v2.0.17"
},
"payum/iso4217": {
"version": "1.0.1"
},
Expand Down Expand Up @@ -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"
},
Expand Down Expand Up @@ -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": {
Expand Down Expand Up @@ -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"
},
Expand Down