]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Symfony Upgrade Fixer FTW
authorJeremy Benoist <jeremy.benoist@gmail.com>
Tue, 22 Dec 2015 09:16:34 +0000 (10:16 +0100)
committerJeremy Benoist <jeremy.benoist@gmail.com>
Fri, 15 Jan 2016 08:35:38 +0000 (09:35 +0100)
symfony-upgrade-fixer fix src/Wallabag/

41 files changed:
src/Wallabag/ApiBundle/Controller/WallabagRestController.php
src/Wallabag/ApiBundle/Entity/AccessToken.php
src/Wallabag/ApiBundle/Entity/AuthCode.php
src/Wallabag/ApiBundle/Entity/Client.php
src/Wallabag/ApiBundle/Entity/RefreshToken.php
src/Wallabag/CoreBundle/Command/InstallCommand.php
src/Wallabag/CoreBundle/Controller/ConfigController.php
src/Wallabag/CoreBundle/Controller/EntryController.php
src/Wallabag/CoreBundle/Controller/RssController.php
src/Wallabag/CoreBundle/Controller/TagController.php
src/Wallabag/CoreBundle/DependencyInjection/WallabagCoreExtension.php
src/Wallabag/CoreBundle/Entity/Entry.php
src/Wallabag/CoreBundle/Entity/Tag.php
src/Wallabag/CoreBundle/Entity/TaggingRule.php
src/Wallabag/CoreBundle/Event/Subscriber/CustomDoctrineORMSubscriber.php
src/Wallabag/CoreBundle/EventListener/LocaleListener.php
src/Wallabag/CoreBundle/EventListener/RegistrationConfirmedListener.php
src/Wallabag/CoreBundle/Filter/EntryFilterType.php
src/Wallabag/CoreBundle/Form/Type/ChangePasswordType.php
src/Wallabag/CoreBundle/Form/Type/ConfigType.php
src/Wallabag/CoreBundle/Form/Type/EditEntryType.php
src/Wallabag/CoreBundle/Form/Type/NewEntryType.php
src/Wallabag/CoreBundle/Form/Type/NewTagType.php
src/Wallabag/CoreBundle/Form/Type/NewUserType.php
src/Wallabag/CoreBundle/Form/Type/RssType.php
src/Wallabag/CoreBundle/Form/Type/TaggingRuleType.php
src/Wallabag/CoreBundle/Form/Type/UserInformationType.php
src/Wallabag/CoreBundle/Helper/EntriesExport.php
src/Wallabag/CoreBundle/ParamConverter/UsernameRssTokenConverter.php
src/Wallabag/CoreBundle/Resources/config/services.yml
src/Wallabag/CoreBundle/Subscriber/TablePrefixSubscriber.php
src/Wallabag/CoreBundle/Tests/Command/InstallCommandTest.php
src/Wallabag/CoreBundle/Tests/EventListener/LocaleListenerTest.php
src/Wallabag/CoreBundle/Tests/EventListener/RegistrationConfirmedListenerTest.php
src/Wallabag/CoreBundle/Tests/EventListener/UserLocaleListenerTest.php
src/Wallabag/CoreBundle/Tests/Helper/ContentProxyTest.php
src/Wallabag/CoreBundle/Tests/Helper/RuleBasedTaggerTest.php
src/Wallabag/CoreBundle/Tests/ParamConverter/UsernameRssTokenConverterTest.php
src/Wallabag/CoreBundle/Tests/Subscriber/TablePrefixSubscriberTest.php
src/Wallabag/UserBundle/Controller/ResettingController.php
src/Wallabag/UserBundle/Entity/User.php

index 354a6f8e7a0b750c63ec06b26fb68a4f6506a81f..f8a2745a47dce2696fa562f526166ffc34d54982 100644 (file)
@@ -3,13 +3,13 @@
 namespace Wallabag\ApiBundle\Controller;
 
 use FOS\RestBundle\Controller\FOSRestController;
+use Hateoas\Configuration\Route;
+use Hateoas\Representation\Factory\PagerfantaFactory;
 use Nelmio\ApiDocBundle\Annotation\ApiDoc;
 use Symfony\Component\HttpFoundation\Request;
 use Symfony\Component\HttpFoundation\Response;
 use Wallabag\CoreBundle\Entity\Entry;
 use Wallabag\CoreBundle\Entity\Tag;
-use Hateoas\Configuration\Route;
-use Hateoas\Representation\Factory\PagerfantaFactory;
 
 class WallabagRestController extends FOSRestController
 {
index b1f4e7de223208b1f6d4df7ead9f2725dbf9a49b..2ff63a83e4ca9e37ff1e5bd68051b86a2c0c636e 100644 (file)
@@ -2,8 +2,8 @@
 
 namespace Wallabag\ApiBundle\Entity;
 
-use FOS\OAuthServerBundle\Entity\AccessToken as BaseAccessToken;
 use Doctrine\ORM\Mapping as ORM;
+use FOS\OAuthServerBundle\Entity\AccessToken as BaseAccessToken;
 
 /**
  * @ORM\Table("oauth2_access_tokens")
index 81398158b1f16c4fce84f3bd95b8ee6d222b4544..4d4b09fea7178ac9fed0f1bec0483db96d89d331 100644 (file)
@@ -2,8 +2,8 @@
 
 namespace Wallabag\ApiBundle\Entity;
 
-use FOS\OAuthServerBundle\Entity\AuthCode as BaseAuthCode;
 use Doctrine\ORM\Mapping as ORM;
+use FOS\OAuthServerBundle\Entity\AuthCode as BaseAuthCode;
 
 /**
  * @ORM\Table("oauth2_auth_codes")
index d449870a4fdce25d325729fc011e5c7269bf7028..c04ed0f62f0469f6dbb345a29dbb7aff97c5c62f 100644 (file)
@@ -2,8 +2,8 @@
 
 namespace Wallabag\ApiBundle\Entity;
 
-use FOS\OAuthServerBundle\Entity\Client as BaseClient;
 use Doctrine\ORM\Mapping as ORM;
+use FOS\OAuthServerBundle\Entity\Client as BaseClient;
 
 /**
  * @ORM\Table("oauth2_clients")
index be2c1d2e97f70853ac19e1acd2edbd86ee95f692..6d0cab688f9e182a8c32531d2d1dff3b0ff19ab9 100644 (file)
@@ -2,8 +2,8 @@
 
 namespace Wallabag\ApiBundle\Entity;
 
-use FOS\OAuthServerBundle\Entity\RefreshToken as BaseRefreshToken;
 use Doctrine\ORM\Mapping as ORM;
+use FOS\OAuthServerBundle\Entity\RefreshToken as BaseRefreshToken;
 
 /**
  * @ORM\Table("oauth2_refresh_tokens")
index e791d4dda5b462a7262e350b75bdb7165064f5e2..941cb8cdc2c3f86fc04c8a6a1a71ee31235c41c3 100644 (file)
@@ -3,15 +3,16 @@
 namespace Wallabag\CoreBundle\Command;
 
 use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
+use Symfony\Component\Console\Helper\Table;
+use Symfony\Component\Console\Input\ArrayInput;
 use Symfony\Component\Console\Input\InputInterface;
 use Symfony\Component\Console\Input\InputOption;
-use Symfony\Component\Console\Input\ArrayInput;
-use Symfony\Component\Console\Output\OutputInterface;
 use Symfony\Component\Console\Output\NullOutput;
-use Symfony\Component\Console\Question\Question;
+use Symfony\Component\Console\Output\OutputInterface;
 use Symfony\Component\Console\Question\ConfirmationQuestion;
-use Symfony\Component\Console\Helper\Table;
+use Symfony\Component\Console\Question\Question;
 use Wallabag\CoreBundle\Entity\Config;
+use Wallabag\UserBundle\Entity\User;
 
 class InstallCommand extends ContainerAwareCommand
 {
index 7a187710f3ee07e24fcfb7de49b821e65af347f4..f51ccaa486c9fe43dbfeca1d1cd5c1c740ed2b5c 100644 (file)
@@ -4,17 +4,17 @@ namespace Wallabag\CoreBundle\Controller;
 
 use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
 use Symfony\Bundle\FrameworkBundle\Controller\Controller;
-use Symfony\Component\HttpFoundation\Request;
 use Symfony\Component\HttpFoundation\JsonResponse;
+use Symfony\Component\HttpFoundation\Request;
 use Wallabag\CoreBundle\Entity\Config;
 use Wallabag\CoreBundle\Entity\TaggingRule;
-use Wallabag\UserBundle\Entity\User;
 use Wallabag\CoreBundle\Form\Type\ChangePasswordType;
-use Wallabag\CoreBundle\Form\Type\UserInformationType;
-use Wallabag\CoreBundle\Form\Type\TaggingRuleType;
 use Wallabag\CoreBundle\Form\Type\NewUserType;
 use Wallabag\CoreBundle\Form\Type\RssType;
+use Wallabag\CoreBundle\Form\Type\TaggingRuleType;
+use Wallabag\CoreBundle\Form\Type\UserInformationType;
 use Wallabag\CoreBundle\Tools\Utils;
+use Wallabag\UserBundle\Entity\User;
 
 class ConfigController extends Controller
 {
index 37f7ab60a6822df11733d6d5366ecde021b4d289..c1b5a71ba046dde16e5adc67057ffd6ecdbc1c89 100644 (file)
@@ -2,16 +2,16 @@
 
 namespace Wallabag\CoreBundle\Controller;
 
+use Pagerfanta\Adapter\DoctrineORMAdapter;
+use Pagerfanta\Pagerfanta;
 use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
 use Symfony\Bundle\FrameworkBundle\Controller\Controller;
 use Symfony\Component\HttpFoundation\Request;
 use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
 use Wallabag\CoreBundle\Entity\Entry;
-use Wallabag\CoreBundle\Form\Type\NewEntryType;
-use Wallabag\CoreBundle\Form\Type\EditEntryType;
 use Wallabag\CoreBundle\Filter\EntryFilterType;
-use Pagerfanta\Adapter\DoctrineORMAdapter;
-use Pagerfanta\Pagerfanta;
+use Wallabag\CoreBundle\Form\Type\EditEntryType;
+use Wallabag\CoreBundle\Form\Type\NewEntryType;
 
 class EntryController extends Controller
 {
index 023a6228eab246815ea46c184b378fa00981658d..2b7ef5985e6900c4235ef741989e2a6103b88774 100644 (file)
@@ -2,13 +2,13 @@
 
 namespace Wallabag\CoreBundle\Controller;
 
-use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
+use Pagerfanta\Adapter\DoctrineORMAdapter;
+use Pagerfanta\Pagerfanta;
 use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
+use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
 use Symfony\Bundle\FrameworkBundle\Controller\Controller;
-use Wallabag\UserBundle\Entity\User;
 use Wallabag\CoreBundle\Entity\Entry;
-use Pagerfanta\Adapter\DoctrineORMAdapter;
-use Pagerfanta\Pagerfanta;
+use Wallabag\UserBundle\Entity\User;
 
 class RssController extends Controller
 {
index 64d53f0c7913bc72d509eedc6c62b1b3bfca5f30..682cc6e6306a822429e2cab0215c486ffde26305 100644 (file)
@@ -5,9 +5,9 @@ namespace Wallabag\CoreBundle\Controller;
 use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
 use Symfony\Bundle\FrameworkBundle\Controller\Controller;
 use Symfony\Component\HttpFoundation\Request;
-use Wallabag\CoreBundle\Form\Type\NewTagType;
-use Wallabag\CoreBundle\Entity\Tag;
 use Wallabag\CoreBundle\Entity\Entry;
+use Wallabag\CoreBundle\Entity\Tag;
+use Wallabag\CoreBundle\Form\Type\NewTagType;
 
 class TagController extends Controller
 {
index 330cc957698660ad95eab41e095419fedca206da..9ff9b732f0b972d99ce287e17b1fc757bfe2beca 100644 (file)
@@ -2,10 +2,10 @@
 
 namespace Wallabag\CoreBundle\DependencyInjection;
 
-use Symfony\Component\DependencyInjection\ContainerBuilder;
 use Symfony\Component\Config\FileLocator;
-use Symfony\Component\HttpKernel\DependencyInjection\Extension;
+use Symfony\Component\DependencyInjection\ContainerBuilder;
 use Symfony\Component\DependencyInjection\Loader;
+use Symfony\Component\HttpKernel\DependencyInjection\Extension;
 
 class WallabagCoreExtension extends Extension
 {
index f11a77860450105624623e5eae91869fbac09849..24b24dbb13dc6ac29cc6a5fd736367cf26d72387 100644 (file)
@@ -4,10 +4,10 @@ namespace Wallabag\CoreBundle\Entity;
 
 use Doctrine\Common\Collections\ArrayCollection;
 use Doctrine\ORM\Mapping as ORM;
-use Symfony\Component\Validator\Constraints as Assert;
 use Hateoas\Configuration\Annotation as Hateoas;
 use JMS\Serializer\Annotation\Groups;
 use JMS\Serializer\Annotation\XmlRoot;
+use Symfony\Component\Validator\Constraints as Assert;
 use Wallabag\UserBundle\Entity\User;
 
 /**
index 0689c7b31854fc0dbd58c40ca105d8a1c9c7cc68..c1940e99b29f4723196fc4f8665e2a9da68cf087 100644 (file)
@@ -2,12 +2,12 @@
 
 namespace Wallabag\CoreBundle\Entity;
 
+use Doctrine\Common\Collections\ArrayCollection;
 use Doctrine\ORM\Mapping as ORM;
-use JMS\Serializer\Annotation\XmlRoot;
 use JMS\Serializer\Annotation\ExclusionPolicy;
 use JMS\Serializer\Annotation\Expose;
-use Doctrine\Common\Collections\ArrayCollection;
 use Gedmo\Mapping\Annotation as Gedmo;
+use JMS\Serializer\Annotation\XmlRoot;
 
 /**
  * Tag.
index 329d7ff85551ed6fbf291352636b572042648f79..28914cc1949efb94ec3cb59fe688f6e1cd4a5da8 100644 (file)
@@ -3,8 +3,8 @@
 namespace Wallabag\CoreBundle\Entity;
 
 use Doctrine\ORM\Mapping as ORM;
-use Symfony\Component\Validator\Constraints as Assert;
 use KPhoen\RulerZBundle\Validator\Constraints as RulerZAssert;
+use Symfony\Component\Validator\Constraints as Assert;
 
 /**
  * Tagging rule.
index cfdbfe973f759a7545e8bca9694d8aa90b26d388..cabb3eca3678170cf7acd5456419f928066d20a8 100644 (file)
@@ -2,8 +2,8 @@
 
 namespace Wallabag\CoreBundle\Event\Subscriber;
 
-use Lexik\Bundle\FormFilterBundle\Event\Subscriber\DoctrineORMSubscriber;
 use Lexik\Bundle\FormFilterBundle\Event\GetFilterConditionEvent;
+use Lexik\Bundle\FormFilterBundle\Event\Subscriber\DoctrineORMSubscriber;
 use Symfony\Component\EventDispatcher\EventSubscriberInterface;
 
 /**
index 80f5950462bd108a1e6ce4bfff00453627fb13a6..05deac0accc877d3f1ed50fc346e9399303220bd 100644 (file)
@@ -2,9 +2,9 @@
 
 namespace Wallabag\CoreBundle\EventListener;
 
+use Symfony\Component\EventDispatcher\EventSubscriberInterface;
 use Symfony\Component\HttpKernel\Event\GetResponseEvent;
 use Symfony\Component\HttpKernel\KernelEvents;
-use Symfony\Component\EventDispatcher\EventSubscriberInterface;
 
 /**
  * @see http://symfony.com/doc/current/cookbook/session/locale_sticky_session.html
index 68c25f1f5a800173e9077be8842836befa4a12e7..1c9160d5651d7a2247562bb6cc1e3e5705ce8c8d 100644 (file)
@@ -2,11 +2,11 @@
 
 namespace Wallabag\CoreBundle\EventListener;
 
-use Symfony\Component\EventDispatcher\EventDispatcherInterface;
-use Symfony\Component\EventDispatcher\EventSubscriberInterface;
 use Doctrine\ORM\EntityManager;
 use FOS\UserBundle\Event\FilterUserResponseEvent;
 use FOS\UserBundle\FOSUserEvents;
+use Symfony\Component\EventDispatcher\EventDispatcherInterface;
+use Symfony\Component\EventDispatcher\EventSubscriberInterface;
 use Wallabag\CoreBundle\Entity\Config;
 
 class RegistrationConfirmedListener implements EventSubscriberInterface
index 32de21ca8ab97efa04acd4cd185caa351753ebc7..e0a1cb31b487f12f6f5e93e721533bd88845f2bc 100644 (file)
@@ -2,11 +2,11 @@
 
 namespace Wallabag\CoreBundle\Filter;
 
+use Doctrine\ORM\EntityRepository;
+use Lexik\Bundle\FormFilterBundle\Filter\Query\QueryInterface;
 use Symfony\Component\Form\AbstractType;
 use Symfony\Component\Form\FormBuilderInterface;
 use Symfony\Component\OptionsResolver\OptionsResolver;
-use Lexik\Bundle\FormFilterBundle\Filter\Query\QueryInterface;
-use Doctrine\ORM\EntityRepository;
 use Wallabag\UserBundle\Entity\User;
 
 class EntryFilterType extends AbstractType
@@ -77,7 +77,7 @@ class EntryFilterType extends AbstractType
         ;
     }
 
-    public function getName()
+    public function getBlockPrefix()
     {
         return 'entry_filter';
     }
index 82e1954d1a871906c5220ff6a5bbf39edbf01e53..615b81690653b1ba34035d217df10846f11e6ee6 100644 (file)
@@ -3,6 +3,9 @@
 namespace Wallabag\CoreBundle\Form\Type;
 
 use Symfony\Component\Form\AbstractType;
+use Symfony\Component\Form\Extension\Core\Type\PasswordType;
+use Symfony\Component\Form\Extension\Core\Type\RepeatedType;
+use Symfony\Component\Form\Extension\Core\Type\SubmitType;
 use Symfony\Component\Form\FormBuilderInterface;
 use Symfony\Component\Security\Core\Validator\Constraints\UserPassword;
 use Symfony\Component\Validator\Constraints;
@@ -12,10 +15,10 @@ class ChangePasswordType extends AbstractType
     public function buildForm(FormBuilderInterface $builder, array $options)
     {
         $builder
-            ->add('old_password', 'password', array(
+            ->add('old_password', PasswordType::class, array(
                 'constraints' => new UserPassword(array('message' => 'Wrong value for your current password')),
             ))
-            ->add('new_password', 'repeated', array(
+            ->add('new_password', RepeatedType::class, array(
                 'type' => 'password',
                 'invalid_message' => 'The password fields must match.',
                 'required' => true,
@@ -29,11 +32,11 @@ class ChangePasswordType extends AbstractType
                     new Constraints\NotBlank(),
                 ),
             ))
-            ->add('save', 'submit')
+            ->add('save', SubmitType::class)
         ;
     }
 
-    public function getName()
+    public function getBlockPrefix()
     {
         return 'change_passwd';
     }
index 1f0ad89dfad578ffeac5c5067a0748da61dfe3fd..88082a040c0d752544b2dd5c4a91151baae7564e 100644 (file)
@@ -3,6 +3,8 @@
 namespace Wallabag\CoreBundle\Form\Type;
 
 use Symfony\Component\Form\AbstractType;
+use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
+use Symfony\Component\Form\Extension\Core\Type\SubmitType;
 use Symfony\Component\Form\FormBuilderInterface;
 use Symfony\Component\OptionsResolver\OptionsResolver;
 
@@ -28,15 +30,15 @@ class ConfigType extends AbstractType
     public function buildForm(FormBuilderInterface $builder, array $options)
     {
         $builder
-            ->add('theme', 'choice', array(
+            ->add('theme', ChoiceType::class, array(
                 'choices' => array_flip($this->themes),
                 'choices_as_values' => true,
             ))
             ->add('items_per_page')
-            ->add('language', 'choice', array(
+            ->add('language', ChoiceType::class, array(
                 'choices' => $this->languages,
             ))
-            ->add('save', 'submit')
+            ->add('save', SubmitType::class)
         ;
     }
 
@@ -47,7 +49,7 @@ class ConfigType extends AbstractType
         ));
     }
 
-    public function getName()
+    public function getBlockPrefix()
     {
         return 'config';
     }
index 0fa4b71f4583d8f685bee1024c95f924317124fa..0cb29881834db98ebe0ffee1b20aca29f28e9696 100644 (file)
@@ -3,6 +3,9 @@
 namespace Wallabag\CoreBundle\Form\Type;
 
 use Symfony\Component\Form\AbstractType;
+use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
+use Symfony\Component\Form\Extension\Core\Type\SubmitType;
+use Symfony\Component\Form\Extension\Core\Type\TextType;
 use Symfony\Component\Form\FormBuilderInterface;
 use Symfony\Component\OptionsResolver\OptionsResolver;
 
@@ -11,14 +14,14 @@ class EditEntryType extends AbstractType
     public function buildForm(FormBuilderInterface $builder, array $options)
     {
         $builder
-            ->add('title', 'text', array('required' => true))
-            ->add('is_public', 'checkbox', array('required' => false))
+            ->add('title', TextType::class, array('required' => true))
+            ->add('is_public', CheckboxType::class, array('required' => false))
             // @todo: add autocomplete
             // ->add('tags', 'entity', array(
             //     'class' => 'Wallabag\CoreBundle\Entity\Tag',
             //     'choice_translation_domain' => true,
             // ))
-            ->add('save', 'submit')
+            ->add('save', SubmitType::class)
         ;
     }
 
@@ -29,7 +32,7 @@ class EditEntryType extends AbstractType
         ));
     }
 
-    public function getName()
+    public function getBlockPrefix()
     {
         return 'entry';
     }
index cb96d11a2aa79194eeb11afa79c17c109d3b04b5..fbce13f1fe0cd97b73f29bde1b4cc4ebfe4bb840 100644 (file)
@@ -3,6 +3,8 @@
 namespace Wallabag\CoreBundle\Form\Type;
 
 use Symfony\Component\Form\AbstractType;
+use Symfony\Component\Form\Extension\Core\Type\SubmitType;
+use Symfony\Component\Form\Extension\Core\Type\UrlType;
 use Symfony\Component\Form\FormBuilderInterface;
 use Symfony\Component\OptionsResolver\OptionsResolver;
 
@@ -11,8 +13,8 @@ class NewEntryType extends AbstractType
     public function buildForm(FormBuilderInterface $builder, array $options)
     {
         $builder
-            ->add('url', 'url', array('required' => true))
-            ->add('save', 'submit')
+            ->add('url', UrlType::class, array('required' => true))
+            ->add('save', SubmitType::class)
         ;
     }
 
@@ -23,7 +25,7 @@ class NewEntryType extends AbstractType
         ));
     }
 
-    public function getName()
+    public function getBlockPrefix()
     {
         return 'entry';
     }
index 8e4ab649b050646e7ded31037035f3e4a223b7f9..0f5590311dbd9cba91bf29a1b21cd5ec56968171 100644 (file)
@@ -3,6 +3,8 @@
 namespace Wallabag\CoreBundle\Form\Type;
 
 use Symfony\Component\Form\AbstractType;
+use Symfony\Component\Form\Extension\Core\Type\SubmitType;
+use Symfony\Component\Form\Extension\Core\Type\TextType;
 use Symfony\Component\Form\FormBuilderInterface;
 use Symfony\Component\OptionsResolver\OptionsResolver;
 
@@ -11,8 +13,8 @@ class NewTagType extends AbstractType
     public function buildForm(FormBuilderInterface $builder, array $options)
     {
         $builder
-            ->add('label', 'text', array('required' => true))
-            ->add('save', 'submit')
+            ->add('label', TextType::class, array('required' => true))
+            ->add('save', SubmitType::class)
         ;
     }
 
@@ -23,7 +25,7 @@ class NewTagType extends AbstractType
         ));
     }
 
-    public function getName()
+    public function getBlockPrefix()
     {
         return 'tag';
     }
index 8aabc8bbbc40ecffdaabc6543e7a0928678329a9..e6fff976647afea3e41c6ed59ffb8d41134d6bb4 100644 (file)
@@ -3,6 +3,10 @@
 namespace Wallabag\CoreBundle\Form\Type;
 
 use Symfony\Component\Form\AbstractType;
+use Symfony\Component\Form\Extension\Core\Type\EmailType;
+use Symfony\Component\Form\Extension\Core\Type\RepeatedType;
+use Symfony\Component\Form\Extension\Core\Type\SubmitType;
+use Symfony\Component\Form\Extension\Core\Type\TextType;
 use Symfony\Component\Form\FormBuilderInterface;
 use Symfony\Component\OptionsResolver\OptionsResolver;
 use Symfony\Component\Validator\Constraints;
@@ -12,8 +16,8 @@ class NewUserType extends AbstractType
     public function buildForm(FormBuilderInterface $builder, array $options)
     {
         $builder
-            ->add('username', 'text', array('required' => true))
-            ->add('plainPassword', 'repeated', array(
+            ->add('username', TextType::class, array('required' => true))
+            ->add('plainPassword', RepeatedType::class, array(
                 'type' => 'password',
                 'constraints' => array(
                     new Constraints\Length(array(
@@ -23,8 +27,8 @@ class NewUserType extends AbstractType
                     new Constraints\NotBlank(),
                 ),
             ))
-            ->add('email', 'email')
-            ->add('save', 'submit')
+            ->add('email', EmailType::class)
+            ->add('save', SubmitType::class)
         ;
     }
 
@@ -35,7 +39,7 @@ class NewUserType extends AbstractType
         ));
     }
 
-    public function getName()
+    public function getBlockPrefix()
     {
         return 'new_user';
     }
index 1f7f4c682b4ec7a447d7dc2093e8f740eceb3cc6..def8782cc12261afe35d57e8555d60ebfff474ac 100644 (file)
@@ -3,6 +3,7 @@
 namespace Wallabag\CoreBundle\Form\Type;
 
 use Symfony\Component\Form\AbstractType;
+use Symfony\Component\Form\Extension\Core\Type\SubmitType;
 use Symfony\Component\Form\FormBuilderInterface;
 use Symfony\Component\OptionsResolver\OptionsResolver;
 
@@ -12,7 +13,7 @@ class RssType extends AbstractType
     {
         $builder
             ->add('rss_limit')
-            ->add('save', 'submit')
+            ->add('save', SubmitType::class)
         ;
     }
 
@@ -23,7 +24,7 @@ class RssType extends AbstractType
         ));
     }
 
-    public function getName()
+    public function getBlockPrefix()
     {
         return 'rss_config';
     }
index 428d94b38d995089a67a8e22b21011eeeed13910..296cec9e51211cbf5243e657b3c557a678b28bca 100644 (file)
@@ -3,6 +3,8 @@
 namespace Wallabag\CoreBundle\Form\Type;
 
 use Symfony\Component\Form\AbstractType;
+use Symfony\Component\Form\Extension\Core\Type\SubmitType;
+use Symfony\Component\Form\Extension\Core\Type\TextType;
 use Symfony\Component\Form\FormBuilderInterface;
 use Symfony\Component\OptionsResolver\OptionsResolver;
 use Wallabag\CoreBundle\Form\DataTransformer\StringToListTransformer;
@@ -12,8 +14,8 @@ class TaggingRuleType extends AbstractType
     public function buildForm(FormBuilderInterface $builder, array $options)
     {
         $builder
-            ->add('rule', 'text', array('required' => true))
-            ->add('save', 'submit')
+            ->add('rule', TextType::class, array('required' => true))
+            ->add('save', SubmitType::class)
         ;
 
         $tagsField = $builder
@@ -30,7 +32,7 @@ class TaggingRuleType extends AbstractType
         ));
     }
 
-    public function getName()
+    public function getBlockPrefix()
     {
         return 'tagging_rule';
     }
index e06c937dae891553bbaa8ce9250194121e853d1f..f52e409aced6acdf0b5d07520f97fdc354c9f353 100644 (file)
@@ -3,6 +3,10 @@
 namespace Wallabag\CoreBundle\Form\Type;
 
 use Symfony\Component\Form\AbstractType;
+use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
+use Symfony\Component\Form\Extension\Core\Type\EmailType;
+use Symfony\Component\Form\Extension\Core\Type\SubmitType;
+use Symfony\Component\Form\Extension\Core\Type\TextType;
 use Symfony\Component\Form\FormBuilderInterface;
 use Symfony\Component\OptionsResolver\OptionsResolver;
 
@@ -11,10 +15,10 @@ class UserInformationType extends AbstractType
     public function buildForm(FormBuilderInterface $builder, array $options)
     {
         $builder
-            ->add('name', 'text')
-            ->add('email', 'email')
-            ->add('twoFactorAuthentication', 'checkbox', array('required' => false))
-            ->add('save', 'submit')
+            ->add('name', TextType::class)
+            ->add('email', EmailType::class)
+            ->add('twoFactorAuthentication', CheckboxType::class, array('required' => false))
+            ->add('save', SubmitType::class)
             ->remove('username')
             ->remove('plainPassword')
         ;
@@ -32,7 +36,7 @@ class UserInformationType extends AbstractType
         ));
     }
 
-    public function getName()
+    public function getBlockPrefix()
     {
         return 'update_user';
     }
index d6a4d094aba9e709cc699937d288fb45ccb5ca04..31a80d6e3283b12365f7fe2e228a20ffcde372b4 100644 (file)
@@ -2,12 +2,12 @@
 
 namespace Wallabag\CoreBundle\Helper;
 
+use JMS\Serializer;
+use JMS\Serializer\SerializationContext;
+use JMS\Serializer\SerializerBuilder;
 use PHPePub\Core\EPub;
 use PHPePub\Core\Structure\OPF\DublinCore;
 use Symfony\Component\HttpFoundation\Response;
-use JMS\Serializer;
-use JMS\Serializer\SerializerBuilder;
-use JMS\Serializer\SerializationContext;
 
 /**
  * This class doesn't have unit test BUT it's fully covered by a functional test with ExportControllerTest.
index f7faa2c131f58104f00b679810caccd90bb0d825..6ea2a4f3af29edbb1872291e61d4ac7fa684959f 100644 (file)
@@ -2,9 +2,9 @@
 
 namespace Wallabag\CoreBundle\ParamConverter;
 
-use Sensio\Bundle\FrameworkExtraBundle\Request\ParamConverter\ParamConverterInterface;
 use Doctrine\Common\Persistence\ManagerRegistry;
 use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
+use Sensio\Bundle\FrameworkExtraBundle\Request\ParamConverter\ParamConverterInterface;
 use Symfony\Component\HttpFoundation\Request;
 use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
 use Wallabag\UserBundle\Entity\User;
index 96b1c931339eb37760a6eb04cbd114c317d42f8d..80f737f8aa3eb32bdaf9758a233dcf6ac99e33e9 100644 (file)
@@ -2,7 +2,7 @@ services:
     wallabag_core.helper.detect_active_theme:
         class: Wallabag\CoreBundle\Helper\DetectActiveTheme
         arguments:
-            - @security.token_storage
+            - "@security.token_storage"
             - %theme% # default theme from parameters.yml
 
     # custom form type
@@ -22,7 +22,7 @@ services:
     wallabag_core.form.type.forgot_password:
         class: Wallabag\CoreBundle\Form\Type\ForgotPasswordType
         arguments:
-            - @doctrine
+            - "@doctrine"
         tags:
             - { name: form.type, alias: forgot_password }
 
@@ -31,7 +31,7 @@ services:
         tags:
             - { name: request.param_converter, converter: username_rsstoken_converter }
         arguments:
-            - @doctrine
+            - "@doctrine"
 
     wallabag_core.table_prefix_subscriber:
         class: Wallabag\CoreBundle\Subscriber\TablePrefixSubscriber
@@ -45,23 +45,23 @@ services:
         arguments:
             - { error_message: false }
         calls:
-            - [ setLogger, [ @logger ] ]
+            - [ setLogger, [ "@logger" ] ]
         tags:
             - { name: monolog.logger, channel: graby }
 
     wallabag_core.content_proxy:
         class: Wallabag\CoreBundle\Helper\ContentProxy
         arguments:
-            - @wallabag_core.graby
-            - @wallabag_core.rule_based_tagger
-            - @logger
+            - "@wallabag_core.graby"
+            - "@wallabag_core.rule_based_tagger"
+            - "@logger"
 
     wallabag_core.rule_based_tagger:
         class: Wallabag\CoreBundle\Helper\RuleBasedTagger
         arguments:
-            - @rulerz
-            - @wallabag_core.tag_repository
-            - @wallabag_core.entry_repository
+            - "@rulerz"
+            - "@wallabag_core.tag_repository"
+            - "@wallabag_core.entry_repository"
 
     # repository as a service
     wallabag_core.entry_repository:
@@ -79,7 +79,7 @@ services:
     wallabag_core.registration_confirmed:
         class: Wallabag\CoreBundle\EventListener\RegistrationConfirmedListener
         arguments:
-            - @doctrine.orm.entity_manager
+            - "@doctrine.orm.entity_manager"
             - %theme%
             - %items_on_page%
             - %rss_limit%
index 0019eead23298f797508b181243f9b4b63976f68..9a4b16ee621c89fb301fde7d70d92191987b297b 100644 (file)
@@ -2,8 +2,8 @@
 
 namespace Wallabag\CoreBundle\Subscriber;
 
-use Doctrine\ORM\Event\LoadClassMetadataEventArgs;
 use Doctrine\Common\EventSubscriber;
+use Doctrine\ORM\Event\LoadClassMetadataEventArgs;
 use Doctrine\ORM\Mapping\ClassMetadataInfo;
 
 /**
index c9346040678abb2a26992c01eab33b1687cbd383..7d75e2b7b2755ee5878a51644aeb37ef4bc53e87 100644 (file)
@@ -2,15 +2,15 @@
 
 namespace Wallabag\CoreBundle\Tests\Command;
 
-use Wallabag\CoreBundle\Tests\WallabagCoreTestCase;
-use Wallabag\CoreBundle\Command\InstallCommand;
-use Wallabag\CoreBundle\Tests\Mock\InstallCommandMock;
+use Doctrine\Bundle\DoctrineBundle\Command\CreateDatabaseDoctrineCommand;
+use Doctrine\Bundle\DoctrineBundle\Command\DropDatabaseDoctrineCommand;
 use Symfony\Bundle\FrameworkBundle\Console\Application;
-use Symfony\Component\Console\Tester\CommandTester;
 use Symfony\Component\Console\Input\ArrayInput;
 use Symfony\Component\Console\Output\NullOutput;
-use Doctrine\Bundle\DoctrineBundle\Command\DropDatabaseDoctrineCommand;
-use Doctrine\Bundle\DoctrineBundle\Command\CreateDatabaseDoctrineCommand;
+use Symfony\Component\Console\Tester\CommandTester;
+use Wallabag\CoreBundle\Command\InstallCommand;
+use Wallabag\CoreBundle\Tests\Mock\InstallCommandMock;
+use Wallabag\CoreBundle\Tests\WallabagCoreTestCase;
 
 class InstallCommandTest extends WallabagCoreTestCase
 {
index d89bee0471129acb874f20cbc2e710471dfe3632..b4c022d53647c7de0b7b84e677ab34553560591a 100644 (file)
@@ -4,11 +4,11 @@ namespace Wallabag\CoreBundle\Tests\EventListener;
 
 use Symfony\Component\EventDispatcher\EventDispatcher;
 use Symfony\Component\HttpFoundation\Request;
-use Symfony\Component\HttpKernel\KernelEvents;
+use Symfony\Component\HttpFoundation\Session\Session;
+use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage;
 use Symfony\Component\HttpKernel\Event\GetResponseEvent;
 use Symfony\Component\HttpKernel\HttpKernelInterface;
-use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage;
-use Symfony\Component\HttpFoundation\Session\Session;
+use Symfony\Component\HttpKernel\KernelEvents;
 use Wallabag\CoreBundle\EventListener\LocaleListener;
 
 class LocaleListenerTest extends \PHPUnit_Framework_TestCase
index 31283399d33715a2fb80f922750d11aa77ccb14f..7039dc6192d90af2fbf7cfb92baefcf8921f864d 100644 (file)
@@ -2,13 +2,13 @@
 
 namespace Wallabag\CoreBundle\Tests\EventListener;
 
+use FOS\UserBundle\Event\FilterUserResponseEvent;
+use FOS\UserBundle\FOSUserEvents;
 use Symfony\Component\EventDispatcher\EventDispatcher;
 use Symfony\Component\HttpFoundation\Request;
 use Symfony\Component\HttpFoundation\Response;
-use FOS\UserBundle\FOSUserEvents;
-use FOS\UserBundle\Event\FilterUserResponseEvent;
-use Wallabag\CoreBundle\EventListener\RegistrationConfirmedListener;
 use Wallabag\CoreBundle\Entity\Config;
+use Wallabag\CoreBundle\EventListener\RegistrationConfirmedListener;
 use Wallabag\UserBundle\Entity\User;
 
 class RegistrationConfirmedListenerTest extends \PHPUnit_Framework_TestCase
index 80ddb4572db64aa9ed7a427c52c0bd36273516c3..d9ffe30ef207e70eba98987066f10e8dcee4f1fb 100644 (file)
@@ -3,12 +3,12 @@
 namespace Wallabag\CoreBundle\Tests\EventListener;
 
 use Symfony\Component\HttpFoundation\Request;
-use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage;
 use Symfony\Component\HttpFoundation\Session\Session;
-use Symfony\Component\Security\Http\Event\InteractiveLoginEvent;
+use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage;
 use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
-use Wallabag\CoreBundle\EventListener\UserLocaleListener;
+use Symfony\Component\Security\Http\Event\InteractiveLoginEvent;
 use Wallabag\CoreBundle\Entity\Config;
+use Wallabag\CoreBundle\EventListener\UserLocaleListener;
 use Wallabag\UserBundle\Entity\User;
 
 class UserLocaleListenerTest extends \PHPUnit_Framework_TestCase
index ac518dbb122cadad2e1d101c00f564ef507d0d24..d29984e97f94f7729ec9648c7982c73372abd8ce 100644 (file)
@@ -4,8 +4,8 @@ namespace Wallabag\CoreBundle\Tests\Helper;
 
 use Psr\Log\NullLogger;
 use Wallabag\CoreBundle\Entity\Entry;
-use Wallabag\UserBundle\Entity\User;
 use Wallabag\CoreBundle\Helper\ContentProxy;
+use Wallabag\UserBundle\Entity\User;
 
 class ContentProxyTest extends \PHPUnit_Framework_TestCase
 {
index dee17d6575fe179b05b84d9fa41787bd227e91f1..c43c62c3bf86800d80787f3d2ece61739867ec1b 100644 (file)
@@ -6,8 +6,8 @@ use Wallabag\CoreBundle\Entity\Config;
 use Wallabag\CoreBundle\Entity\Entry;
 use Wallabag\CoreBundle\Entity\Tag;
 use Wallabag\CoreBundle\Entity\TaggingRule;
-use Wallabag\UserBundle\Entity\User;
 use Wallabag\CoreBundle\Helper\RuleBasedTagger;
+use Wallabag\UserBundle\Entity\User;
 
 class RuleBasedTaggerTest extends \PHPUnit_Framework_TestCase
 {
index 1c9a4ad7c4603f5942d7cdad995fcef257a4e670..b95be1331288b64f1e763df5b74ef56296aa4de1 100644 (file)
@@ -2,9 +2,9 @@
 
 namespace Wallabag\CoreBundle\Tests\Command;
 
-use Wallabag\CoreBundle\ParamConverter\UsernameRssTokenConverter;
 use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
 use Symfony\Component\HttpFoundation\Request;
+use Wallabag\CoreBundle\ParamConverter\UsernameRssTokenConverter;
 use Wallabag\UserBundle\Entity\User;
 
 class UsernameRssTokenConverterTest extends \PHPUnit_Framework_TestCase
index a26ff43682adc4a95ad7d15b6947578c76112c31..49dbb316846e638cbdafb31f8581392478964b3e 100644 (file)
@@ -2,9 +2,9 @@
 
 namespace Wallabag\CoreBundle\Tests\Subscriber;
 
-use Doctrine\ORM\Mapping\ClassMetadata;
-use Doctrine\ORM\Event\LoadClassMetadataEventArgs;
 use Doctrine\Common\EventManager;
+use Doctrine\ORM\Event\LoadClassMetadataEventArgs;
+use Doctrine\ORM\Mapping\ClassMetadata;
 use Wallabag\CoreBundle\Subscriber\TablePrefixSubscriber;
 
 class TablePrefixSubscriberTest extends \PHPUnit_Framework_TestCase
index 8aa1e23036e45417aceace762294b30962b2a340..62e27d0057f2217906442d825462c55059d4b33c 100644 (file)
@@ -2,12 +2,12 @@
 
 namespace Wallabag\UserBundle\Controller;
 
-use FOS\UserBundle\FOSUserEvents;
+use FOS\UserBundle\Event\FilterUserResponseEvent;
 use FOS\UserBundle\Event\FormEvent;
 use FOS\UserBundle\Event\GetResponseUserEvent;
-use FOS\UserBundle\Event\FilterUserResponseEvent;
-use Symfony\Component\HttpFoundation\Request;
+use FOS\UserBundle\FOSUserEvents;
 use Symfony\Component\HttpFoundation\RedirectResponse;
+use Symfony\Component\HttpFoundation\Request;
 use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
 
 class ResettingController extends \FOS\UserBundle\Controller\ResettingController
index e65284203bb349c6bd3ed7bf5557fc089966f4e0..4bbb68dcafbd4efcb652e92213f264d42c0e19dd 100644 (file)
@@ -6,11 +6,11 @@ use Doctrine\Common\Collections\ArrayCollection;
 use Doctrine\ORM\Mapping as ORM;
 use Scheb\TwoFactorBundle\Model\Email\TwoFactorInterface;
 use Scheb\TwoFactorBundle\Model\TrustedComputerInterface;
-use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
-use Symfony\Component\Security\Core\User\UserInterface;
+use FOS\UserBundle\Model\User as BaseUser;
 use JMS\Serializer\Annotation\ExclusionPolicy;
 use JMS\Serializer\Annotation\Expose;
-use FOS\UserBundle\Model\User as BaseUser;
+use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
+use Symfony\Component\Security\Core\User\UserInterface;
 use Wallabag\CoreBundle\Entity\Config;
 use Wallabag\CoreBundle\Entity\Entry;