From 68126a91bc80c1f6ef730c06212793791fe20038 Mon Sep 17 00:00:00 2001 From: tchapi Date: Sun, 1 Dec 2019 12:00:55 +0100 Subject: [PATCH] Add missing SwiftMailer dependency --- .env | 7 + composer.json | 1 + composer.lock | 217 ++++++++++++++++++++++++-- config/bundles.php | 1 + config/packages/dev/swiftmailer.yaml | 4 + config/packages/swiftmailer.yaml | 3 + config/packages/test/swiftmailer.yaml | 2 + phpunit.xml.dist | 6 + symfony.lock | 20 +++ 9 files changed, 245 insertions(+), 16 deletions(-) create mode 100644 config/packages/dev/swiftmailer.yaml create mode 100644 config/packages/swiftmailer.yaml create mode 100644 config/packages/test/swiftmailer.yaml diff --git a/.env b/.env index a1ce87e..15fd6b8 100644 --- a/.env +++ b/.env @@ -28,6 +28,13 @@ APP_SECRET=630dc0d699fd37e720aff268f75583ed DATABASE_URL=mysql://davis:davis@127.0.0.1:3306/davis ###< 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=smtp://localhost:465?encryption=ssl&auth_mode=login&username=&password= +###< symfony/swiftmailer-bundle ### + # The admin password for the backend ADMIN_LOGIN=admin ADMIN_PASSWORD=test diff --git a/composer.json b/composer.json index 4f4b0a0..de35aaa 100644 --- a/composer.json +++ b/composer.json @@ -22,6 +22,7 @@ "symfony/process": "^5.0", "symfony/security-bundle": "^5.0", "symfony/serializer-pack": "*", + "symfony/swiftmailer-bundle": "^3.4", "symfony/translation": "^5.0", "symfony/twig-bundle": "^5.0", "symfony/validator": "^5.0", diff --git a/composer.lock b/composer.lock index 55c7b3e..0b711bb 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "82f2dc11bb39ad89a3d17f872f144c08", + "content-hash": "4110c0f3049159ae6b22b379318d75d3", "packages": [ { "name": "composer/semver", @@ -1247,6 +1247,64 @@ ], "time": "2018-06-14T14:45:07+00:00" }, + { + "name": "egulias/email-validator", + "version": "2.1.11", + "source": { + "type": "git", + "url": "https://github.com/egulias/EmailValidator.git", + "reference": "92dd169c32f6f55ba570c309d83f5209cefb5e23" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/92dd169c32f6f55ba570c309d83f5209cefb5e23", + "reference": "92dd169c32f6f55ba570c309d83f5209cefb5e23", + "shasum": "" + }, + "require": { + "doctrine/lexer": "^1.0.1", + "php": ">= 5.5" + }, + "require-dev": { + "dominicsayers/isemail": "dev-master", + "phpunit/phpunit": "^4.8.35||^5.7||^6.0", + "satooshi/php-coveralls": "^1.0.1", + "symfony/phpunit-bridge": "^4.4@dev" + }, + "suggest": { + "ext-intl": "PHP Internationalization Libraries are required to use the SpoofChecking validation" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Egulias\\EmailValidator\\": "EmailValidator" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Eduardo Gulias Davis" + } + ], + "description": "A library for validating emails against several RFCs", + "homepage": "https://github.com/egulias/EmailValidator", + "keywords": [ + "email", + "emailvalidation", + "emailvalidator", + "validation", + "validator" + ], + "time": "2019-08-13T17:33:27+00:00" + }, { "name": "friendsofphp/php-cs-fixer", "version": "v2.16.1", @@ -2507,6 +2565,68 @@ ], "time": "2019-10-16T18:54:45+00:00" }, + { + "name": "swiftmailer/swiftmailer", + "version": "v6.2.3", + "source": { + "type": "git", + "url": "https://github.com/swiftmailer/swiftmailer.git", + "reference": "149cfdf118b169f7840bbe3ef0d4bc795d1780c9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/149cfdf118b169f7840bbe3ef0d4bc795d1780c9", + "reference": "149cfdf118b169f7840bbe3ef0d4bc795d1780c9", + "shasum": "" + }, + "require": { + "egulias/email-validator": "~2.0", + "php": ">=7.0.0", + "symfony/polyfill-iconv": "^1.0", + "symfony/polyfill-intl-idn": "^1.10", + "symfony/polyfill-mbstring": "^1.0" + }, + "require-dev": { + "mockery/mockery": "~0.9.1", + "symfony/phpunit-bridge": "^3.4.19|^4.1.8" + }, + "suggest": { + "ext-intl": "Needed to support internationalized email addresses", + "true/punycode": "Needed to support internationalized email addresses, if ext-intl is not installed" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "6.2-dev" + } + }, + "autoload": { + "files": [ + "lib/swift_required.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Chris Corbyn" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Swiftmailer, free feature-rich PHP mailer", + "homepage": "https://swiftmailer.symfony.com", + "keywords": [ + "email", + "mail", + "mailer" + ], + "time": "2019-11-12T09:31:26+00:00" + }, { "name": "symfony/asset", "version": "v5.0.0", @@ -3193,20 +3313,20 @@ }, { "name": "symfony/event-dispatcher-contracts", - "version": "v2.0.0", + "version": "v2.0.1", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "bb09b1d8f8a35243195189ded0d41bdc798ac2fb" + "reference": "af23c2584d4577d54661c434446fb8fbed6025dd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/bb09b1d8f8a35243195189ded0d41bdc798ac2fb", - "reference": "bb09b1d8f8a35243195189ded0d41bdc798ac2fb", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/af23c2584d4577d54661c434446fb8fbed6025dd", + "reference": "af23c2584d4577d54661c434446fb8fbed6025dd", "shasum": "" }, "require": { - "php": "^7.2.9", + "php": "^7.2.5", "psr/event-dispatcher": "^1" }, "suggest": { @@ -3247,7 +3367,7 @@ "interoperability", "standards" ], - "time": "2019-11-09T09:18:34+00:00" + "time": "2019-11-18T17:27:11+00:00" }, { "name": "symfony/expression-language", @@ -4407,7 +4527,7 @@ }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.13.0", + "version": "v1.13.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", @@ -4469,7 +4589,7 @@ }, { "name": "symfony/polyfill-mbstring", - "version": "v1.13.0", + "version": "v1.13.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", @@ -4528,7 +4648,7 @@ }, { "name": "symfony/polyfill-php72", - "version": "v1.13.0", + "version": "v1.13.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", @@ -5355,20 +5475,20 @@ }, { "name": "symfony/service-contracts", - "version": "v2.0.0", + "version": "v2.0.1", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "9d99e1556417bf227a62e14856d630672bf10eaf" + "reference": "144c5e51266b281231e947b51223ba14acf1a749" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/9d99e1556417bf227a62e14856d630672bf10eaf", - "reference": "9d99e1556417bf227a62e14856d630672bf10eaf", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/144c5e51266b281231e947b51223ba14acf1a749", + "reference": "144c5e51266b281231e947b51223ba14acf1a749", "shasum": "" }, "require": { - "php": "^7.2.9", + "php": "^7.2.5", "psr/container": "^1.0" }, "suggest": { @@ -5409,7 +5529,7 @@ "interoperability", "standards" ], - "time": "2019-11-09T09:18:34+00:00" + "time": "2019-11-18T17:27:11+00:00" }, { "name": "symfony/stopwatch", @@ -5461,6 +5581,71 @@ "homepage": "https://symfony.com", "time": "2019-11-18T17:27:11+00:00" }, + { + "name": "symfony/swiftmailer-bundle", + "version": "v3.4.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/swiftmailer-bundle.git", + "reference": "553d2474288349faed873da8ab7c1551a00d26ae" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/swiftmailer-bundle/zipball/553d2474288349faed873da8ab7c1551a00d26ae", + "reference": "553d2474288349faed873da8ab7c1551a00d26ae", + "shasum": "" + }, + "require": { + "php": ">=7.1", + "swiftmailer/swiftmailer": "^6.1.3", + "symfony/config": "^4.3.8|^5.0", + "symfony/dependency-injection": "^4.3.8|^5.0", + "symfony/http-kernel": "^4.3.8|^5.0" + }, + "conflict": { + "twig/twig": "<1.41|<2.10" + }, + "require-dev": { + "symfony/console": "^4.3.8|^5.0", + "symfony/framework-bundle": "^4.3.8|^5.0", + "symfony/phpunit-bridge": "^4.3.8|^5.0", + "symfony/yaml": "^4.3.8|^5.0" + }, + "suggest": { + "psr/log": "Allows logging" + }, + "type": "symfony-bundle", + "extra": { + "branch-alias": { + "dev-master": "3.4-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Bundle\\SwiftmailerBundle\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + } + ], + "description": "Symfony SwiftmailerBundle", + "homepage": "http://symfony.com", + "time": "2019-11-14T16:18:31+00:00" + }, { "name": "symfony/translation", "version": "v5.0.0", diff --git a/config/bundles.php b/config/bundles.php index 853f398..62d8fbb 100644 --- a/config/bundles.php +++ b/config/bundles.php @@ -11,4 +11,5 @@ Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true], Symfony\Bundle\DebugBundle\DebugBundle::class => ['dev' => true, 'test' => true], Symfony\Bundle\MakerBundle\MakerBundle::class => ['dev' => true], + Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle::class => ['all' => true], ]; diff --git a/config/packages/dev/swiftmailer.yaml b/config/packages/dev/swiftmailer.yaml new file mode 100644 index 0000000..b98158e --- /dev/null +++ b/config/packages/dev/swiftmailer.yaml @@ -0,0 +1,4 @@ +# See https://symfony.com/doc/current/email/dev_environment.html +swiftmailer: + # send all emails to a specific address + #delivery_addresses: ['me@example.com'] diff --git a/config/packages/swiftmailer.yaml b/config/packages/swiftmailer.yaml new file mode 100644 index 0000000..cae6508 --- /dev/null +++ b/config/packages/swiftmailer.yaml @@ -0,0 +1,3 @@ +swiftmailer: + url: '%env(MAILER_URL)%' + spool: { type: 'memory' } diff --git a/config/packages/test/swiftmailer.yaml b/config/packages/test/swiftmailer.yaml new file mode 100644 index 0000000..f438078 --- /dev/null +++ b/config/packages/test/swiftmailer.yaml @@ -0,0 +1,2 @@ +swiftmailer: + disable_delivery: true diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 5b7c820..6472e45 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -13,6 +13,12 @@ + + + + + + diff --git a/symfony.lock b/symfony.lock index 9c40f84..5364def 100644 --- a/symfony.lock +++ b/symfony.lock @@ -93,6 +93,9 @@ "config/packages/dev/easy_log_handler.yaml" ] }, + "egulias/email-validator": { + "version": "2.1.11" + }, "friendsofphp/php-cs-fixer": { "version": "2.2", "recipe": { @@ -177,6 +180,9 @@ "config/packages/sensio_framework_extra.yaml" ] }, + "swiftmailer/swiftmailer": { + "version": "v6.2.3" + }, "symfony/asset": { "version": "v4.3.5" }, @@ -433,6 +439,20 @@ "symfony/stopwatch": { "version": "v4.3.5" }, + "symfony/swiftmailer-bundle": { + "version": "2.5", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "master", + "version": "2.5", + "ref": "ae4d22af30bbd484506bc1817c5a3ef72c855b93" + }, + "files": [ + "config/packages/dev/swiftmailer.yaml", + "config/packages/swiftmailer.yaml", + "config/packages/test/swiftmailer.yaml" + ] + }, "symfony/test-pack": { "version": "v1.0.6" },