diff --git a/composer.json b/composer.json index f7a71a6fbc..7816ddb8c3 100644 --- a/composer.json +++ b/composer.json @@ -62,7 +62,7 @@ }, "extra": { "branch-alias": { - "dev-master": "3.x-dev" + "dev-master": "4.x-dev" } }, "autoload": { diff --git a/docs/index.rst b/docs/index.rst index decbc96202..0e87bc83c4 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -216,44 +216,6 @@ this to start: } } -c) CouchDB User class -..................... - -.. note:: - Support for the CouchDB ODM is deprecated as the Doctrine CouchDB ODM is unmaintained. - -If you're persisting your users via the Doctrine CouchDB ODM, then your ``User`` -class should live in the ``CouchDocument`` namespace of your bundle and look -like this to start: - -.. code-block:: php - - - + * * @internal - * - * @final */ #[AsCommand(name: 'fos:user:activate', description: 'Activate a user')] -class ActivateUserCommand extends Command +final class ActivateUserCommand extends Command { // BC with Symfony <5.3 protected static $defaultName = 'fos:user:activate'; diff --git a/src/Command/ChangePasswordCommand.php b/src/Command/ChangePasswordCommand.php index 3f9f7e2943..c6cd947815 100644 --- a/src/Command/ChangePasswordCommand.php +++ b/src/Command/ChangePasswordCommand.php @@ -22,11 +22,9 @@ /** * @internal - * - * @final */ #[AsCommand(name: 'fos:user:change-password', description: 'Change the password of a user.')] -class ChangePasswordCommand extends Command +final class ChangePasswordCommand extends Command { // BC with Symfony <5.3 protected static $defaultName = 'fos:user:change-password'; diff --git a/src/Command/CreateUserCommand.php b/src/Command/CreateUserCommand.php index 9c638695a1..abba0d43d1 100644 --- a/src/Command/CreateUserCommand.php +++ b/src/Command/CreateUserCommand.php @@ -27,11 +27,9 @@ * @author Luis Cordova * * @internal - * - * @final */ #[AsCommand(name: 'fos:user:create', description: 'Create a user.')] -class CreateUserCommand extends Command +final class CreateUserCommand extends Command { // BC with Symfony <5.3 protected static $defaultName = 'fos:user:create'; diff --git a/src/Command/DeactivateUserCommand.php b/src/Command/DeactivateUserCommand.php index d92b71a76d..3b1ce69f66 100644 --- a/src/Command/DeactivateUserCommand.php +++ b/src/Command/DeactivateUserCommand.php @@ -24,11 +24,9 @@ * @author Antoine Hérault * * @internal - * - * @final */ #[AsCommand(name: 'fos:user:deactivate', description: 'Deactivate a user')] -class DeactivateUserCommand extends Command +final class DeactivateUserCommand extends Command { // BC with Symfony <5.3 protected static $defaultName = 'fos:user:deactivate'; diff --git a/src/Command/DemoteUserCommand.php b/src/Command/DemoteUserCommand.php index a875c01ce0..9b4c130fe3 100644 --- a/src/Command/DemoteUserCommand.php +++ b/src/Command/DemoteUserCommand.php @@ -20,11 +20,9 @@ * @author Lenar Lõhmus * * @internal - * - * @final */ #[AsCommand(name: 'fos:user:demote', description: 'Demote a user by removing a role')] -class DemoteUserCommand extends RoleCommand +final class DemoteUserCommand extends RoleCommand { // BC with Symfony <5.3 protected static $defaultName = 'fos:user:demote'; diff --git a/src/Command/PromoteUserCommand.php b/src/Command/PromoteUserCommand.php index c518507771..abfc3a804c 100644 --- a/src/Command/PromoteUserCommand.php +++ b/src/Command/PromoteUserCommand.php @@ -22,11 +22,9 @@ * @author Lenar Lõhmus * * @internal - * - * @final */ #[AsCommand(name: 'fos:user:promote', description: 'Promotes a user by adding a role')] -class PromoteUserCommand extends RoleCommand +final class PromoteUserCommand extends RoleCommand { // BC with Symfony <5.3 protected static $defaultName = 'fos:user:promote'; diff --git a/src/Controller/ChangePasswordController.php b/src/Controller/ChangePasswordController.php index 1c64ca124c..e3448efbe1 100644 --- a/src/Controller/ChangePasswordController.php +++ b/src/Controller/ChangePasswordController.php @@ -31,10 +31,8 @@ * * @author Thibault Duplessis * @author Christophe Coevoet - * - * @final */ -class ChangePasswordController extends AbstractController +final class ChangePasswordController extends AbstractController { private $eventDispatcher; private $formFactory; diff --git a/src/Controller/ProfileController.php b/src/Controller/ProfileController.php index 10b232503c..cc8b4d70c5 100644 --- a/src/Controller/ProfileController.php +++ b/src/Controller/ProfileController.php @@ -30,10 +30,8 @@ * Controller managing the user profile. * * @author Christophe Coevoet - * - * @final */ -class ProfileController extends AbstractController +final class ProfileController extends AbstractController { private $eventDispatcher; private $formFactory; diff --git a/src/Controller/RegistrationController.php b/src/Controller/RegistrationController.php index 447d40864f..9e9188fae4 100644 --- a/src/Controller/RegistrationController.php +++ b/src/Controller/RegistrationController.php @@ -33,10 +33,8 @@ * * @author Thibault Duplessis * @author Christophe Coevoet - * - * @final */ -class RegistrationController extends AbstractController +final class RegistrationController extends AbstractController { private $eventDispatcher; private $formFactory; diff --git a/src/Controller/ResettingController.php b/src/Controller/ResettingController.php index a7f9539a57..367b58294e 100644 --- a/src/Controller/ResettingController.php +++ b/src/Controller/ResettingController.php @@ -32,10 +32,8 @@ * * @author Thibault Duplessis * @author Christophe Coevoet - * - * @final */ -class ResettingController extends AbstractController +final class ResettingController extends AbstractController { private $eventDispatcher; private $formFactory; diff --git a/src/Controller/SecurityController.php b/src/Controller/SecurityController.php index 1e9ac832c2..e0fda6a458 100644 --- a/src/Controller/SecurityController.php +++ b/src/Controller/SecurityController.php @@ -21,10 +21,8 @@ * * @author Thibault Duplessis * @author Christophe Coevoet - * - * @final */ -class SecurityController extends AbstractController +final class SecurityController extends AbstractController { private $authenticationUtils; private $tokenManager; diff --git a/src/DependencyInjection/Compiler/CheckForSessionPass.php b/src/DependencyInjection/Compiler/CheckForSessionPass.php index bf7ba91947..4a47917dfd 100644 --- a/src/DependencyInjection/Compiler/CheckForSessionPass.php +++ b/src/DependencyInjection/Compiler/CheckForSessionPass.php @@ -21,10 +21,8 @@ * @author Ryan Weaver * * @internal - * - * @final */ -class CheckForSessionPass implements CompilerPassInterface +final class CheckForSessionPass implements CompilerPassInterface { public function process(ContainerBuilder $container): void { diff --git a/src/DependencyInjection/Compiler/CheckForSwiftMailerPass.php b/src/DependencyInjection/Compiler/CheckForSwiftMailerPass.php index 5067066f23..ef34f1fb55 100644 --- a/src/DependencyInjection/Compiler/CheckForSwiftMailerPass.php +++ b/src/DependencyInjection/Compiler/CheckForSwiftMailerPass.php @@ -21,10 +21,8 @@ * @author Ryan Weaver * * @internal - * - * @final */ -class CheckForSwiftMailerPass implements CompilerPassInterface +final class CheckForSwiftMailerPass implements CompilerPassInterface { public function process(ContainerBuilder $container): void { diff --git a/src/DependencyInjection/Compiler/InjectRememberMeServicesPass.php b/src/DependencyInjection/Compiler/InjectRememberMeServicesPass.php index b108750b02..1d51ddc562 100644 --- a/src/DependencyInjection/Compiler/InjectRememberMeServicesPass.php +++ b/src/DependencyInjection/Compiler/InjectRememberMeServicesPass.php @@ -21,10 +21,8 @@ * @author Vasily Khayrulin * * @internal - * - * @final */ -class InjectRememberMeServicesPass implements CompilerPassInterface +final class InjectRememberMeServicesPass implements CompilerPassInterface { public function process(ContainerBuilder $container): void { diff --git a/src/DependencyInjection/Compiler/InjectUserCheckerPass.php b/src/DependencyInjection/Compiler/InjectUserCheckerPass.php index f0ef8dcdba..91e32c7456 100644 --- a/src/DependencyInjection/Compiler/InjectUserCheckerPass.php +++ b/src/DependencyInjection/Compiler/InjectUserCheckerPass.php @@ -21,10 +21,8 @@ * @author Gocha Ossinkine * * @internal - * - * @final */ -class InjectUserCheckerPass implements CompilerPassInterface +final class InjectUserCheckerPass implements CompilerPassInterface { public function process(ContainerBuilder $container): void { diff --git a/src/DependencyInjection/Compiler/ValidationPass.php b/src/DependencyInjection/Compiler/ValidationPass.php index f77cc01635..17a27fd072 100644 --- a/src/DependencyInjection/Compiler/ValidationPass.php +++ b/src/DependencyInjection/Compiler/ValidationPass.php @@ -20,10 +20,8 @@ * @author Christophe Coevoet * * @internal - * - * @final */ -class ValidationPass implements CompilerPassInterface +final class ValidationPass implements CompilerPassInterface { public function process(ContainerBuilder $container): void { diff --git a/src/DependencyInjection/Configuration.php b/src/DependencyInjection/Configuration.php index 2dbd8e6cc1..888f7c51b6 100644 --- a/src/DependencyInjection/Configuration.php +++ b/src/DependencyInjection/Configuration.php @@ -25,17 +25,15 @@ * @author Christophe Coevoet * * @internal - * - * @final */ -class Configuration implements ConfigurationInterface +final class Configuration implements ConfigurationInterface { public function getConfigTreeBuilder(): TreeBuilder { $treeBuilder = new TreeBuilder('fos_user'); $rootNode = $treeBuilder->getRootNode(); - $supportedDrivers = ['orm', 'mongodb', 'couchdb', 'custom']; + $supportedDrivers = ['orm', 'mongodb', 'custom']; $rootNode ->children() @@ -44,14 +42,6 @@ public function getConfigTreeBuilder(): TreeBuilder ->ifNotInArray($supportedDrivers) ->thenInvalid('The driver %s is not supported. Please choose one of '.json_encode($supportedDrivers)) ->end() - ->validate() - ->ifInArray(['couchdb']) - ->then(function ($v) { - trigger_deprecation('friendsofsymfony/user-bundle', '3.3.0', 'The CouchDB ODM integration is deprecated because the CouchDB ODM itself is unmaintained.'); - - return $v; - }) - ->end() ->cannotBeOverwritten() ->isRequired() ->cannotBeEmpty() diff --git a/src/DependencyInjection/FOSUserExtension.php b/src/DependencyInjection/FOSUserExtension.php index 2e8aaae587..56cceb97da 100644 --- a/src/DependencyInjection/FOSUserExtension.php +++ b/src/DependencyInjection/FOSUserExtension.php @@ -16,19 +16,17 @@ use Symfony\Component\Config\FileLocator; use Symfony\Component\DependencyInjection\Alias; use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Extension\Extension; use Symfony\Component\DependencyInjection\Loader\XmlFileLoader; use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\HttpKernel\DependencyInjection\Extension; /** * @internal - * - * @final */ -class FOSUserExtension extends Extension +final class FOSUserExtension extends Extension { /** - * @var array + * @var array */ private static $doctrineDrivers = [ 'orm' => [ @@ -39,11 +37,6 @@ class FOSUserExtension extends Extension 'registry' => 'doctrine_mongodb', 'tag' => 'doctrine_mongodb.odm.event_listener', ], - 'couchdb' => [ - 'registry' => 'doctrine_couchdb', - 'tag' => 'doctrine_couchdb.event_listener', - 'listener_class' => 'FOS\UserBundle\Doctrine\CouchDB\UserListener', - ], ]; private bool $mailerNeeded = false; @@ -99,9 +92,6 @@ public function load(array $configs, ContainerBuilder $container): void $listenerDefinition = $container->getDefinition('fos_user.user_listener'); $listenerDefinition->addTag(self::$doctrineDrivers[$config['db_driver']]['tag'], ['event' => 'prePersist']); $listenerDefinition->addTag(self::$doctrineDrivers[$config['db_driver']]['tag'], ['event' => 'preUpdate']); - if (isset(self::$doctrineDrivers[$config['db_driver']]['listener_class'])) { - $listenerDefinition->setClass(self::$doctrineDrivers[$config['db_driver']]['listener_class']); - } } if ($config['use_username_form_type']) { diff --git a/src/Doctrine/CouchDB/UserListener.php b/src/Doctrine/CouchDB/UserListener.php deleted file mode 100644 index 9d8c58624b..0000000000 --- a/src/Doctrine/CouchDB/UserListener.php +++ /dev/null @@ -1,71 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace FOS\UserBundle\Doctrine\CouchDB; - -use Doctrine\Common\EventSubscriber; -use Doctrine\ODM\CouchDB\Event; -use Doctrine\ODM\CouchDB\Event\LifecycleEventArgs; -use FOS\UserBundle\Model\UserInterface; -use FOS\UserBundle\Util\CanonicalFieldsUpdater; -use FOS\UserBundle\Util\PasswordUpdaterInterface; - -/** - * @internal - * - * @final - * - * @deprecated The CouchDB ODM integration is deprecated since 3.3.0 because the CouchDB ODM itself is unmaintained. - */ -class UserListener implements EventSubscriber -{ - private $passwordUpdater; - private $canonicalFieldsUpdater; - - public function __construct(PasswordUpdaterInterface $passwordUpdater, CanonicalFieldsUpdater $canonicalFieldsUpdater) - { - $this->passwordUpdater = $passwordUpdater; - $this->canonicalFieldsUpdater = $canonicalFieldsUpdater; - } - - public function getSubscribedEvents(): array - { - return [ - Event::prePersist, - Event::preUpdate, - ]; - } - - public function prePersist(LifecycleEventArgs $args): void - { - $object = $args->getDocument(); - if ($object instanceof UserInterface) { - $this->updateUserFields($object); - } - } - - public function preUpdate(LifecycleEventArgs $args): void - { - $object = $args->getDocument(); - if ($object instanceof UserInterface) { - $this->updateUserFields($object); - } - } - - /** - * Updates the user properties. - */ - private function updateUserFields(UserInterface $user): void - { - $this->canonicalFieldsUpdater->updateCanonicalFields($user); - $this->passwordUpdater->hashPassword($user); - } -} diff --git a/src/Doctrine/UserListener.php b/src/Doctrine/UserListener.php index ee67118ff0..900f2a4973 100644 --- a/src/Doctrine/UserListener.php +++ b/src/Doctrine/UserListener.php @@ -27,10 +27,8 @@ * @author David Buchmann * * @internal - * - * @final */ -class UserListener implements EventSubscriber +final class UserListener implements EventSubscriber { private $passwordUpdater; private $canonicalFieldsUpdater; diff --git a/src/Event/FilterUserResponseEvent.php b/src/Event/FilterUserResponseEvent.php index 9687d99030..306c72190a 100644 --- a/src/Event/FilterUserResponseEvent.php +++ b/src/Event/FilterUserResponseEvent.php @@ -15,10 +15,7 @@ use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; -/** - * @final - */ -class FilterUserResponseEvent extends UserEvent +final class FilterUserResponseEvent extends UserEvent { private $response; diff --git a/src/Event/FormEvent.php b/src/Event/FormEvent.php index e58e170e85..c0dd0c858c 100644 --- a/src/Event/FormEvent.php +++ b/src/Event/FormEvent.php @@ -16,10 +16,7 @@ use Symfony\Component\HttpFoundation\Response; use Symfony\Contracts\EventDispatcher\Event; -/** - * @final - */ -class FormEvent extends Event +final class FormEvent extends Event { /** * @var FormInterface diff --git a/src/Event/GetResponseNullableUserEvent.php b/src/Event/GetResponseNullableUserEvent.php index bed6797069..a359e18480 100644 --- a/src/Event/GetResponseNullableUserEvent.php +++ b/src/Event/GetResponseNullableUserEvent.php @@ -20,10 +20,8 @@ * Response user event that allows null user. * * @author Konstantinos Christofilos - * - * @final */ -class GetResponseNullableUserEvent extends Event +final class GetResponseNullableUserEvent extends Event { /** * @var Request diff --git a/src/Event/GetResponseUserEvent.php b/src/Event/GetResponseUserEvent.php index b36cf61ee2..af965a777f 100644 --- a/src/Event/GetResponseUserEvent.php +++ b/src/Event/GetResponseUserEvent.php @@ -13,10 +13,7 @@ use Symfony\Component\HttpFoundation\Response; -/** - * @final - */ -class GetResponseUserEvent extends UserEvent +final class GetResponseUserEvent extends UserEvent { /** * @var Response|null diff --git a/src/EventListener/AuthenticationListener.php b/src/EventListener/AuthenticationListener.php index e008b50979..15f7efac2b 100644 --- a/src/EventListener/AuthenticationListener.php +++ b/src/EventListener/AuthenticationListener.php @@ -22,10 +22,8 @@ /** * @internal - * - * @final */ -class AuthenticationListener implements EventSubscriberInterface +final class AuthenticationListener implements EventSubscriberInterface { /** * @var LoginManagerInterface diff --git a/src/EventListener/EmailConfirmationListener.php b/src/EventListener/EmailConfirmationListener.php index a2589a19be..9a3ed5e070 100644 --- a/src/EventListener/EmailConfirmationListener.php +++ b/src/EventListener/EmailConfirmationListener.php @@ -21,10 +21,8 @@ /** * @internal - * - * @final */ -class EmailConfirmationListener implements EventSubscriberInterface +final class EmailConfirmationListener implements EventSubscriberInterface { private $mailer; private $tokenGenerator; diff --git a/src/EventListener/FlashListener.php b/src/EventListener/FlashListener.php index f39c59fac0..09facc324e 100644 --- a/src/EventListener/FlashListener.php +++ b/src/EventListener/FlashListener.php @@ -20,10 +20,8 @@ /** * @internal - * - * @final */ -class FlashListener implements EventSubscriberInterface +final class FlashListener implements EventSubscriberInterface { /** * @var string[] diff --git a/src/EventListener/LastLoginListener.php b/src/EventListener/LastLoginListener.php index 687866a617..556de6d0e3 100644 --- a/src/EventListener/LastLoginListener.php +++ b/src/EventListener/LastLoginListener.php @@ -21,10 +21,8 @@ /** * @internal - * - * @final */ -class LastLoginListener implements EventSubscriberInterface +final class LastLoginListener implements EventSubscriberInterface { /** * @var UserManagerInterface diff --git a/src/EventListener/ResettingListener.php b/src/EventListener/ResettingListener.php index 7d4efadcb8..47960b0757 100644 --- a/src/EventListener/ResettingListener.php +++ b/src/EventListener/ResettingListener.php @@ -20,10 +20,8 @@ /** * @internal - * - * @final */ -class ResettingListener implements EventSubscriberInterface +final class ResettingListener implements EventSubscriberInterface { /** * @var UrlGeneratorInterface diff --git a/src/FOSUserBundle.php b/src/FOSUserBundle.php index 75cf1aa97e..d6860b8248 100644 --- a/src/FOSUserBundle.php +++ b/src/FOSUserBundle.php @@ -11,7 +11,6 @@ namespace FOS\UserBundle; -use Doctrine\Bundle\CouchDBBundle\DependencyInjection\Compiler\DoctrineCouchDBMappingsPass; use Doctrine\Bundle\DoctrineBundle\DependencyInjection\Compiler\DoctrineOrmMappingsPass; use Doctrine\Bundle\MongoDBBundle\DependencyInjection\Compiler\DoctrineMongoDBMappingsPass; use FOS\UserBundle\DependencyInjection\Compiler\CheckForSessionPass; @@ -26,10 +25,8 @@ /** * @author Matthieu Bontemps * @author Thibault Duplessis - * - * @final */ -class FOSUserBundle extends Bundle +final class FOSUserBundle extends Bundle { public function build(ContainerBuilder $container): void { @@ -57,9 +54,5 @@ private function addRegisterMappingsPass(ContainerBuilder $container): void if (class_exists('Doctrine\Bundle\MongoDBBundle\DependencyInjection\Compiler\DoctrineMongoDBMappingsPass')) { $container->addCompilerPass(DoctrineMongoDBMappingsPass::createXmlMappingDriver($mappings, ['fos_user.model_manager_name'], 'fos_user.backend_type_mongodb')); } - - if (class_exists('Doctrine\Bundle\CouchDBBundle\DependencyInjection\Compiler\DoctrineCouchDBMappingsPass')) { - $container->addCompilerPass(DoctrineCouchDBMappingsPass::createXmlMappingDriver($mappings, ['fos_user.model_manager_name'], 'fos_user.backend_type_couchdb')); - } } } diff --git a/src/Form/DataTransformer/UserToUsernameTransformer.php b/src/Form/DataTransformer/UserToUsernameTransformer.php index a196e02c8d..72ef3a1df6 100644 --- a/src/Form/DataTransformer/UserToUsernameTransformer.php +++ b/src/Form/DataTransformer/UserToUsernameTransformer.php @@ -22,10 +22,8 @@ * @author Thibault Duplessis * * @template-implements DataTransformerInterface - * - * @final */ -class UserToUsernameTransformer implements DataTransformerInterface +final class UserToUsernameTransformer implements DataTransformerInterface { /** * @var UserManagerInterface diff --git a/src/Form/Type/ChangePasswordFormType.php b/src/Form/Type/ChangePasswordFormType.php index bb31770ec4..77ec5ed043 100644 --- a/src/Form/Type/ChangePasswordFormType.php +++ b/src/Form/Type/ChangePasswordFormType.php @@ -19,10 +19,7 @@ use Symfony\Component\Security\Core\Validator\Constraints\UserPassword; use Symfony\Component\Validator\Constraints\NotBlank; -/** - * @final - */ -class ChangePasswordFormType extends AbstractType +final class ChangePasswordFormType extends AbstractType { /** * @var string diff --git a/src/Form/Type/ProfileFormType.php b/src/Form/Type/ProfileFormType.php index 78aeabafa2..f672e4b09c 100644 --- a/src/Form/Type/ProfileFormType.php +++ b/src/Form/Type/ProfileFormType.php @@ -19,10 +19,7 @@ use Symfony\Component\Security\Core\Validator\Constraints\UserPassword; use Symfony\Component\Validator\Constraints\NotBlank; -/** - * @final - */ -class ProfileFormType extends AbstractType +final class ProfileFormType extends AbstractType { /** * @var string diff --git a/src/Form/Type/RegistrationFormType.php b/src/Form/Type/RegistrationFormType.php index f7cc8b70d9..ee0ce02754 100644 --- a/src/Form/Type/RegistrationFormType.php +++ b/src/Form/Type/RegistrationFormType.php @@ -18,10 +18,7 @@ use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\OptionsResolver\OptionsResolver; -/** - * @final - */ -class RegistrationFormType extends AbstractType +final class RegistrationFormType extends AbstractType { /** * @var string diff --git a/src/Form/Type/ResettingFormType.php b/src/Form/Type/ResettingFormType.php index aa47590572..01c037bab8 100644 --- a/src/Form/Type/ResettingFormType.php +++ b/src/Form/Type/ResettingFormType.php @@ -17,10 +17,7 @@ use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\OptionsResolver\OptionsResolver; -/** - * @final - */ -class ResettingFormType extends AbstractType +final class ResettingFormType extends AbstractType { /** * @var string diff --git a/src/Form/Type/UsernameFormType.php b/src/Form/Type/UsernameFormType.php index b60152c11b..22505c6c86 100644 --- a/src/Form/Type/UsernameFormType.php +++ b/src/Form/Type/UsernameFormType.php @@ -20,10 +20,8 @@ * Form type for representing a UserInterface instance by its username string. * * @author Thibault Duplessis - * - * @final */ -class UsernameFormType extends AbstractType +final class UsernameFormType extends AbstractType { /** * @var UserToUsernameTransformer diff --git a/src/Mailer/NoopMailer.php b/src/Mailer/NoopMailer.php index 215cc81213..e240a59832 100644 --- a/src/Mailer/NoopMailer.php +++ b/src/Mailer/NoopMailer.php @@ -19,10 +19,8 @@ * and allows to use this bundle without swiftmailer. * * @author Thibault Duplessis - * - * @final */ -class NoopMailer implements MailerInterface +final class NoopMailer implements MailerInterface { /** * @return void diff --git a/src/Resources/config/doctrine-mapping/User.couchdb.xml b/src/Resources/config/doctrine-mapping/User.couchdb.xml deleted file mode 100644 index 4a660da35a..0000000000 --- a/src/Resources/config/doctrine-mapping/User.couchdb.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/Resources/config/storage-validation/couchdb.xml b/src/Resources/config/storage-validation/couchdb.xml deleted file mode 100644 index 66c006b981..0000000000 --- a/src/Resources/config/storage-validation/couchdb.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/src/Validator/Initializer.php b/src/Validator/Initializer.php index e181c0888a..d2d6ce13a4 100644 --- a/src/Validator/Initializer.php +++ b/src/Validator/Initializer.php @@ -21,10 +21,8 @@ * @author Christophe Coevoet * * @internal - * - * @final */ -class Initializer implements ObjectInitializerInterface +final class Initializer implements ObjectInitializerInterface { private $canonicalFieldsUpdater; diff --git a/tests/DependencyInjection/FOSUserExtensionTest.php b/tests/DependencyInjection/FOSUserExtensionTest.php index fc8e8df3db..32803cb7aa 100644 --- a/tests/DependencyInjection/FOSUserExtensionTest.php +++ b/tests/DependencyInjection/FOSUserExtensionTest.php @@ -373,28 +373,6 @@ public function userManagerSetFactoryProvider() ]; } - /** - * @group legacy - */ - public function testUserManagerSetFactoryCouchdb() - { - $this->configuration = new ContainerBuilder(); - $loader = new FOSUserExtension(); - $config = $this->getEmptyConfig(); - $config['db_driver'] = 'couchdb'; - $loader->load([$config], $this->configuration); - - $definition = $this->configuration->getDefinition('fos_user.object_manager'); - - $this->assertAlias('doctrine_couchdb', 'fos_user.doctrine_registry'); - - $factory = $definition->getFactory(); - - $this->assertInstanceOf('Symfony\Component\DependencyInjection\Reference', $factory[0]); - $this->assertSame('fos_user.doctrine_registry', (string) $factory[0]); - $this->assertSame('getManager', $factory[1]); - } - protected function createEmptyConfiguration() { $this->configuration = new ContainerBuilder();