From c70a6166476bd95e3340bff40c0f19e8e3c0fdbe Mon Sep 17 00:00:00 2001 From: Hugo Hamon Date: Sat, 20 Dec 2014 01:11:36 +0100 Subject: [PATCH] =?UTF-8?q?[Bridge]=C2=A0[Swiftmailer]=20removes=20Swiftma?= =?UTF-8?q?iler=20bridge=20namespace.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- UPGRADE-3.0.md | 3 + composer.json | 1 - src/Symfony/Bridge/Swiftmailer/.gitignore | 3 - src/Symfony/Bridge/Swiftmailer/CHANGELOG.md | 7 -- .../DataCollector/MessageDataCollector.php | 88 ------------------- src/Symfony/Bridge/Swiftmailer/LICENSE | 19 ---- src/Symfony/Bridge/Swiftmailer/composer.json | 35 -------- 7 files changed, 3 insertions(+), 153 deletions(-) delete mode 100644 src/Symfony/Bridge/Swiftmailer/.gitignore delete mode 100644 src/Symfony/Bridge/Swiftmailer/CHANGELOG.md delete mode 100644 src/Symfony/Bridge/Swiftmailer/DataCollector/MessageDataCollector.php delete mode 100644 src/Symfony/Bridge/Swiftmailer/LICENSE delete mode 100644 src/Symfony/Bridge/Swiftmailer/composer.json diff --git a/UPGRADE-3.0.md b/UPGRADE-3.0.md index 7dbd535056..9b915e75dd 100644 --- a/UPGRADE-3.0.md +++ b/UPGRADE-3.0.md @@ -1006,3 +1006,6 @@ UPGRADE FROM 2.x to 3.0 * `Symfony\Bridge\Monolog\Logger::err()` was removed. Use `error()` which is PSR-3 compatible. * `Symfony\Bridge\Monolog\Logger::warn()` was removed. Use `warning()` which is PSR-3 compatible. +### Swiftmailer Bridge + + * `Symfony\Bridge\Swiftmailer\DataCollector\MessageDataCollector` was removed. Use the `Symfony\Bundle\SwiftmailerBundle\DataCollector\MessageDataCollector` class instead. diff --git a/composer.json b/composer.json index fa875605b2..af9c9d4341 100644 --- a/composer.json +++ b/composer.json @@ -57,7 +57,6 @@ "symfony/security-bundle": "self.version", "symfony/serializer": "self.version", "symfony/stopwatch": "self.version", - "symfony/swiftmailer-bridge": "self.version", "symfony/templating": "self.version", "symfony/translation": "self.version", "symfony/twig-bridge": "self.version", diff --git a/src/Symfony/Bridge/Swiftmailer/.gitignore b/src/Symfony/Bridge/Swiftmailer/.gitignore deleted file mode 100644 index c49a5d8df5..0000000000 --- a/src/Symfony/Bridge/Swiftmailer/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -vendor/ -composer.lock -phpunit.xml diff --git a/src/Symfony/Bridge/Swiftmailer/CHANGELOG.md b/src/Symfony/Bridge/Swiftmailer/CHANGELOG.md deleted file mode 100644 index 67100f8b06..0000000000 --- a/src/Symfony/Bridge/Swiftmailer/CHANGELOG.md +++ /dev/null @@ -1,7 +0,0 @@ -CHANGELOG -========= - -2.1.0 ------ - - * added a data collector diff --git a/src/Symfony/Bridge/Swiftmailer/DataCollector/MessageDataCollector.php b/src/Symfony/Bridge/Swiftmailer/DataCollector/MessageDataCollector.php deleted file mode 100644 index 932ac6ef3e..0000000000 --- a/src/Symfony/Bridge/Swiftmailer/DataCollector/MessageDataCollector.php +++ /dev/null @@ -1,88 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Swiftmailer\DataCollector; - -use Symfony\Component\HttpKernel\DataCollector\DataCollector; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\DependencyInjection\ContainerInterface; - -/** - * MessageDataCollector. - * - * @author Fabien Potencier - * @author Clément JOBEILI - * - * @deprecated Deprecated since version 2.4, to be removed in 3.0. Use - * MessageDataCollector of SwiftmailerBundle instead. - */ -class MessageDataCollector extends DataCollector -{ - private $container; - private $isSpool; - - /** - * Constructor. - * - * We don't inject the message logger and mailer here - * to avoid the creation of these objects when no emails are sent. - * - * @param ContainerInterface $container A ContainerInterface instance - * @param bool $isSpool - */ - public function __construct(ContainerInterface $container, $isSpool) - { - $this->container = $container; - $this->isSpool = $isSpool; - } - - /** - * {@inheritdoc} - */ - public function collect(Request $request, Response $response, \Exception $exception = null) - { - // only collect when Swiftmailer has already been initialized - if (class_exists('Swift_Mailer', false)) { - $logger = $this->container->get('swiftmailer.plugin.messagelogger'); - $this->data['messages'] = $logger->getMessages(); - $this->data['messageCount'] = $logger->countMessages(); - } else { - $this->data['messages'] = array(); - $this->data['messageCount'] = 0; - } - - $this->data['isSpool'] = $this->isSpool; - } - - public function getMessageCount() - { - return $this->data['messageCount']; - } - - public function getMessages() - { - return $this->data['messages']; - } - - public function isSpool() - { - return $this->data['isSpool']; - } - - /** - * {@inheritdoc} - */ - public function getName() - { - return 'swiftmailer'; - } -} diff --git a/src/Symfony/Bridge/Swiftmailer/LICENSE b/src/Symfony/Bridge/Swiftmailer/LICENSE deleted file mode 100644 index 0b3292cf90..0000000000 --- a/src/Symfony/Bridge/Swiftmailer/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2004-2014 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/src/Symfony/Bridge/Swiftmailer/composer.json b/src/Symfony/Bridge/Swiftmailer/composer.json deleted file mode 100644 index 470dd54f81..0000000000 --- a/src/Symfony/Bridge/Swiftmailer/composer.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "symfony/swiftmailer-bridge", - "type": "symfony-bridge", - "description": "Symfony Swiftmailer Bridge", - "keywords": [], - "homepage": "http://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - } - ], - "require": { - "php": ">=5.3.3", - "swiftmailer/swiftmailer": ">=4.2.0,<6.0-dev" - }, - "suggest": { - "symfony/http-kernel": "" - }, - "autoload": { - "psr-0": { "Symfony\\Bridge\\Swiftmailer\\": "" } - }, - "target-dir": "Symfony/Bridge/Swiftmailer", - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - } -}