diff options
author | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2016-01-15 15:38:31 +0100 |
---|---|---|
committer | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2016-01-15 15:38:31 +0100 |
commit | 1930c19d8214c05ceefac5ac011a6b6e7e4a983d (patch) | |
tree | 8f07ffa139c7c2e883a560ef7dbb35a76adfb8dd /src/Wallabag | |
parent | 790573d45899504bdecd2573c8f64018e23b139e (diff) | |
parent | 131eaa3e94ace8d75d6218e5c7c3aa58d5bb5009 (diff) | |
download | wallabag-1930c19d8214c05ceefac5ac011a6b6e7e4a983d.tar.gz wallabag-1930c19d8214c05ceefac5ac011a6b6e7e4a983d.tar.zst wallabag-1930c19d8214c05ceefac5ac011a6b6e7e4a983d.zip |
Merge pull request #1524 from wallabag/sf2.8
Upgrade to Symfony 3.0
Diffstat (limited to 'src/Wallabag')
50 files changed, 202 insertions, 170 deletions
diff --git a/src/Wallabag/ApiBundle/Controller/WallabagRestController.php b/src/Wallabag/ApiBundle/Controller/WallabagRestController.php index 354a6f8e..d9035cac 100644 --- a/src/Wallabag/ApiBundle/Controller/WallabagRestController.php +++ b/src/Wallabag/ApiBundle/Controller/WallabagRestController.php | |||
@@ -3,13 +3,14 @@ | |||
3 | namespace Wallabag\ApiBundle\Controller; | 3 | namespace Wallabag\ApiBundle\Controller; |
4 | 4 | ||
5 | use FOS\RestBundle\Controller\FOSRestController; | 5 | use FOS\RestBundle\Controller\FOSRestController; |
6 | use Hateoas\Configuration\Route; | ||
7 | use Hateoas\Representation\Factory\PagerfantaFactory; | ||
6 | use Nelmio\ApiDocBundle\Annotation\ApiDoc; | 8 | use Nelmio\ApiDocBundle\Annotation\ApiDoc; |
7 | use Symfony\Component\HttpFoundation\Request; | 9 | use Symfony\Component\HttpFoundation\Request; |
8 | use Symfony\Component\HttpFoundation\Response; | 10 | use Symfony\Component\HttpFoundation\Response; |
11 | use Symfony\Component\Routing\Generator\UrlGeneratorInterface; | ||
9 | use Wallabag\CoreBundle\Entity\Entry; | 12 | use Wallabag\CoreBundle\Entity\Entry; |
10 | use Wallabag\CoreBundle\Entity\Tag; | 13 | use Wallabag\CoreBundle\Entity\Tag; |
11 | use Hateoas\Configuration\Route; | ||
12 | use Hateoas\Representation\Factory\PagerfantaFactory; | ||
13 | 14 | ||
14 | class WallabagRestController extends FOSRestController | 15 | class WallabagRestController extends FOSRestController |
15 | { | 16 | { |
@@ -84,7 +85,7 @@ class WallabagRestController extends FOSRestController | |||
84 | $pagerfantaFactory = new PagerfantaFactory('page', 'perPage'); | 85 | $pagerfantaFactory = new PagerfantaFactory('page', 'perPage'); |
85 | $paginatedCollection = $pagerfantaFactory->createRepresentation( | 86 | $paginatedCollection = $pagerfantaFactory->createRepresentation( |
86 | $pager, | 87 | $pager, |
87 | new Route('api_get_entries', [], $absolute = true) | 88 | new Route('api_get_entries', [], UrlGeneratorInterface::ABSOLUTE_URL) |
88 | ); | 89 | ); |
89 | 90 | ||
90 | $json = $this->get('serializer')->serialize($paginatedCollection, 'json'); | 91 | $json = $this->get('serializer')->serialize($paginatedCollection, 'json'); |
diff --git a/src/Wallabag/ApiBundle/Entity/AccessToken.php b/src/Wallabag/ApiBundle/Entity/AccessToken.php index b1f4e7de..2ff63a83 100644 --- a/src/Wallabag/ApiBundle/Entity/AccessToken.php +++ b/src/Wallabag/ApiBundle/Entity/AccessToken.php | |||
@@ -2,8 +2,8 @@ | |||
2 | 2 | ||
3 | namespace Wallabag\ApiBundle\Entity; | 3 | namespace Wallabag\ApiBundle\Entity; |
4 | 4 | ||
5 | use FOS\OAuthServerBundle\Entity\AccessToken as BaseAccessToken; | ||
6 | use Doctrine\ORM\Mapping as ORM; | 5 | use Doctrine\ORM\Mapping as ORM; |
6 | use FOS\OAuthServerBundle\Entity\AccessToken as BaseAccessToken; | ||
7 | 7 | ||
8 | /** | 8 | /** |
9 | * @ORM\Table("oauth2_access_tokens") | 9 | * @ORM\Table("oauth2_access_tokens") |
diff --git a/src/Wallabag/ApiBundle/Entity/AuthCode.php b/src/Wallabag/ApiBundle/Entity/AuthCode.php index 81398158..4d4b09fe 100644 --- a/src/Wallabag/ApiBundle/Entity/AuthCode.php +++ b/src/Wallabag/ApiBundle/Entity/AuthCode.php | |||
@@ -2,8 +2,8 @@ | |||
2 | 2 | ||
3 | namespace Wallabag\ApiBundle\Entity; | 3 | namespace Wallabag\ApiBundle\Entity; |
4 | 4 | ||
5 | use FOS\OAuthServerBundle\Entity\AuthCode as BaseAuthCode; | ||
6 | use Doctrine\ORM\Mapping as ORM; | 5 | use Doctrine\ORM\Mapping as ORM; |
6 | use FOS\OAuthServerBundle\Entity\AuthCode as BaseAuthCode; | ||
7 | 7 | ||
8 | /** | 8 | /** |
9 | * @ORM\Table("oauth2_auth_codes") | 9 | * @ORM\Table("oauth2_auth_codes") |
diff --git a/src/Wallabag/ApiBundle/Entity/Client.php b/src/Wallabag/ApiBundle/Entity/Client.php index d449870a..c04ed0f6 100644 --- a/src/Wallabag/ApiBundle/Entity/Client.php +++ b/src/Wallabag/ApiBundle/Entity/Client.php | |||
@@ -2,8 +2,8 @@ | |||
2 | 2 | ||
3 | namespace Wallabag\ApiBundle\Entity; | 3 | namespace Wallabag\ApiBundle\Entity; |
4 | 4 | ||
5 | use FOS\OAuthServerBundle\Entity\Client as BaseClient; | ||
6 | use Doctrine\ORM\Mapping as ORM; | 5 | use Doctrine\ORM\Mapping as ORM; |
6 | use FOS\OAuthServerBundle\Entity\Client as BaseClient; | ||
7 | 7 | ||
8 | /** | 8 | /** |
9 | * @ORM\Table("oauth2_clients") | 9 | * @ORM\Table("oauth2_clients") |
diff --git a/src/Wallabag/ApiBundle/Entity/RefreshToken.php b/src/Wallabag/ApiBundle/Entity/RefreshToken.php index be2c1d2e..6d0cab68 100644 --- a/src/Wallabag/ApiBundle/Entity/RefreshToken.php +++ b/src/Wallabag/ApiBundle/Entity/RefreshToken.php | |||
@@ -2,8 +2,8 @@ | |||
2 | 2 | ||
3 | namespace Wallabag\ApiBundle\Entity; | 3 | namespace Wallabag\ApiBundle\Entity; |
4 | 4 | ||
5 | use FOS\OAuthServerBundle\Entity\RefreshToken as BaseRefreshToken; | ||
6 | use Doctrine\ORM\Mapping as ORM; | 5 | use Doctrine\ORM\Mapping as ORM; |
6 | use FOS\OAuthServerBundle\Entity\RefreshToken as BaseRefreshToken; | ||
7 | 7 | ||
8 | /** | 8 | /** |
9 | * @ORM\Table("oauth2_refresh_tokens") | 9 | * @ORM\Table("oauth2_refresh_tokens") |
diff --git a/src/Wallabag/CoreBundle/Command/InstallCommand.php b/src/Wallabag/CoreBundle/Command/InstallCommand.php index e791d4dd..da099a19 100644 --- a/src/Wallabag/CoreBundle/Command/InstallCommand.php +++ b/src/Wallabag/CoreBundle/Command/InstallCommand.php | |||
@@ -3,14 +3,14 @@ | |||
3 | namespace Wallabag\CoreBundle\Command; | 3 | namespace Wallabag\CoreBundle\Command; |
4 | 4 | ||
5 | use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; | 5 | use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; |
6 | use Symfony\Component\Console\Helper\Table; | ||
7 | use Symfony\Component\Console\Input\ArrayInput; | ||
6 | use Symfony\Component\Console\Input\InputInterface; | 8 | use Symfony\Component\Console\Input\InputInterface; |
7 | use Symfony\Component\Console\Input\InputOption; | 9 | use Symfony\Component\Console\Input\InputOption; |
8 | use Symfony\Component\Console\Input\ArrayInput; | ||
9 | use Symfony\Component\Console\Output\OutputInterface; | ||
10 | use Symfony\Component\Console\Output\NullOutput; | 10 | use Symfony\Component\Console\Output\NullOutput; |
11 | use Symfony\Component\Console\Question\Question; | 11 | use Symfony\Component\Console\Output\OutputInterface; |
12 | use Symfony\Component\Console\Question\ConfirmationQuestion; | 12 | use Symfony\Component\Console\Question\ConfirmationQuestion; |
13 | use Symfony\Component\Console\Helper\Table; | 13 | use Symfony\Component\Console\Question\Question; |
14 | use Wallabag\CoreBundle\Entity\Config; | 14 | use Wallabag\CoreBundle\Entity\Config; |
15 | 15 | ||
16 | class InstallCommand extends ContainerAwareCommand | 16 | class InstallCommand extends ContainerAwareCommand |
@@ -55,7 +55,7 @@ class InstallCommand extends ContainerAwareCommand | |||
55 | ; | 55 | ; |
56 | 56 | ||
57 | $output->writeln('<info>Wallabag has been successfully installed.</info>'); | 57 | $output->writeln('<info>Wallabag has been successfully installed.</info>'); |
58 | $output->writeln('<comment>Just execute `php app/console server:run` for using wallabag: http://localhost:8000</comment>'); | 58 | $output->writeln('<comment>Just execute `php bin/console server:run` for using wallabag: http://localhost:8000</comment>'); |
59 | } | 59 | } |
60 | 60 | ||
61 | protected function checkRequirements() | 61 | protected function checkRequirements() |
diff --git a/src/Wallabag/CoreBundle/Controller/ConfigController.php b/src/Wallabag/CoreBundle/Controller/ConfigController.php index 7a187710..d0cf91de 100644 --- a/src/Wallabag/CoreBundle/Controller/ConfigController.php +++ b/src/Wallabag/CoreBundle/Controller/ConfigController.php | |||
@@ -4,17 +4,18 @@ namespace Wallabag\CoreBundle\Controller; | |||
4 | 4 | ||
5 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; | 5 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; |
6 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; | 6 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; |
7 | use Symfony\Component\HttpFoundation\Request; | ||
8 | use Symfony\Component\HttpFoundation\JsonResponse; | 7 | use Symfony\Component\HttpFoundation\JsonResponse; |
8 | use Symfony\Component\HttpFoundation\Request; | ||
9 | use Wallabag\CoreBundle\Entity\Config; | 9 | use Wallabag\CoreBundle\Entity\Config; |
10 | use Wallabag\CoreBundle\Entity\TaggingRule; | 10 | use Wallabag\CoreBundle\Entity\TaggingRule; |
11 | use Wallabag\UserBundle\Entity\User; | 11 | use Wallabag\CoreBundle\Form\Type\ConfigType; |
12 | use Wallabag\CoreBundle\Form\Type\ChangePasswordType; | 12 | use Wallabag\CoreBundle\Form\Type\ChangePasswordType; |
13 | use Wallabag\CoreBundle\Form\Type\UserInformationType; | ||
14 | use Wallabag\CoreBundle\Form\Type\TaggingRuleType; | ||
15 | use Wallabag\CoreBundle\Form\Type\NewUserType; | 13 | use Wallabag\CoreBundle\Form\Type\NewUserType; |
16 | use Wallabag\CoreBundle\Form\Type\RssType; | 14 | use Wallabag\CoreBundle\Form\Type\RssType; |
15 | use Wallabag\CoreBundle\Form\Type\TaggingRuleType; | ||
16 | use Wallabag\CoreBundle\Form\Type\UserInformationType; | ||
17 | use Wallabag\CoreBundle\Tools\Utils; | 17 | use Wallabag\CoreBundle\Tools\Utils; |
18 | use Wallabag\UserBundle\Entity\User; | ||
18 | 19 | ||
19 | class ConfigController extends Controller | 20 | class ConfigController extends Controller |
20 | { | 21 | { |
@@ -31,7 +32,7 @@ class ConfigController extends Controller | |||
31 | $user = $this->getUser(); | 32 | $user = $this->getUser(); |
32 | 33 | ||
33 | // handle basic config detail (this form is defined as a service) | 34 | // handle basic config detail (this form is defined as a service) |
34 | $configForm = $this->createForm('config', $config, array('action' => $this->generateUrl('config'))); | 35 | $configForm = $this->createForm(ConfigType::class, $config, array('action' => $this->generateUrl('config'))); |
35 | $configForm->handleRequest($request); | 36 | $configForm->handleRequest($request); |
36 | 37 | ||
37 | if ($configForm->isValid()) { | 38 | if ($configForm->isValid()) { |
@@ -51,7 +52,7 @@ class ConfigController extends Controller | |||
51 | } | 52 | } |
52 | 53 | ||
53 | // handle changing password | 54 | // handle changing password |
54 | $pwdForm = $this->createForm(new ChangePasswordType(), null, array('action' => $this->generateUrl('config').'#set4')); | 55 | $pwdForm = $this->createForm(ChangePasswordType::class, null, array('action' => $this->generateUrl('config').'#set4')); |
55 | $pwdForm->handleRequest($request); | 56 | $pwdForm->handleRequest($request); |
56 | 57 | ||
57 | if ($pwdForm->isValid()) { | 58 | if ($pwdForm->isValid()) { |
@@ -67,7 +68,7 @@ class ConfigController extends Controller | |||
67 | } | 68 | } |
68 | 69 | ||
69 | // handle changing user information | 70 | // handle changing user information |
70 | $userForm = $this->createForm(new UserInformationType(), $user, array( | 71 | $userForm = $this->createForm(UserInformationType::class, $user, array( |
71 | 'validation_groups' => array('Profile'), | 72 | 'validation_groups' => array('Profile'), |
72 | 'action' => $this->generateUrl('config').'#set3', | 73 | 'action' => $this->generateUrl('config').'#set3', |
73 | )); | 74 | )); |
@@ -85,7 +86,7 @@ class ConfigController extends Controller | |||
85 | } | 86 | } |
86 | 87 | ||
87 | // handle rss information | 88 | // handle rss information |
88 | $rssForm = $this->createForm(new RssType(), $config, array('action' => $this->generateUrl('config').'#set2')); | 89 | $rssForm = $this->createForm(RssType::class, $config, array('action' => $this->generateUrl('config').'#set2')); |
89 | $rssForm->handleRequest($request); | 90 | $rssForm->handleRequest($request); |
90 | 91 | ||
91 | if ($rssForm->isValid()) { | 92 | if ($rssForm->isValid()) { |
@@ -102,7 +103,7 @@ class ConfigController extends Controller | |||
102 | 103 | ||
103 | // handle tagging rule | 104 | // handle tagging rule |
104 | $taggingRule = new TaggingRule(); | 105 | $taggingRule = new TaggingRule(); |
105 | $newTaggingRule = $this->createForm(new TaggingRuleType(), $taggingRule, array('action' => $this->generateUrl('config').'#set5')); | 106 | $newTaggingRule = $this->createForm(TaggingRuleType::class, $taggingRule, array('action' => $this->generateUrl('config').'#set5')); |
106 | $newTaggingRule->handleRequest($request); | 107 | $newTaggingRule->handleRequest($request); |
107 | 108 | ||
108 | if ($newTaggingRule->isValid()) { | 109 | if ($newTaggingRule->isValid()) { |
@@ -122,7 +123,7 @@ class ConfigController extends Controller | |||
122 | $newUser = $userManager->createUser(); | 123 | $newUser = $userManager->createUser(); |
123 | // enable created user by default | 124 | // enable created user by default |
124 | $newUser->setEnabled(true); | 125 | $newUser->setEnabled(true); |
125 | $newUserForm = $this->createForm(new NewUserType(), $newUser, array( | 126 | $newUserForm = $this->createForm(NewUserType::class, $newUser, array( |
126 | 'validation_groups' => array('Profile'), | 127 | 'validation_groups' => array('Profile'), |
127 | 'action' => $this->generateUrl('config').'#set5', | 128 | 'action' => $this->generateUrl('config').'#set5', |
128 | )); | 129 | )); |
diff --git a/src/Wallabag/CoreBundle/Controller/EntryController.php b/src/Wallabag/CoreBundle/Controller/EntryController.php index 3d22c7bc..aa70307b 100644 --- a/src/Wallabag/CoreBundle/Controller/EntryController.php +++ b/src/Wallabag/CoreBundle/Controller/EntryController.php | |||
@@ -2,16 +2,16 @@ | |||
2 | 2 | ||
3 | namespace Wallabag\CoreBundle\Controller; | 3 | namespace Wallabag\CoreBundle\Controller; |
4 | 4 | ||
5 | use Pagerfanta\Adapter\DoctrineORMAdapter; | ||
6 | use Pagerfanta\Pagerfanta; | ||
5 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; | 7 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; |
6 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; | 8 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; |
7 | use Symfony\Component\HttpFoundation\Request; | 9 | use Symfony\Component\HttpFoundation\Request; |
8 | use Symfony\Component\Routing\Generator\UrlGeneratorInterface; | 10 | use Symfony\Component\Routing\Generator\UrlGeneratorInterface; |
9 | use Wallabag\CoreBundle\Entity\Entry; | 11 | use Wallabag\CoreBundle\Entity\Entry; |
10 | use Wallabag\CoreBundle\Form\Type\NewEntryType; | ||
11 | use Wallabag\CoreBundle\Form\Type\EditEntryType; | ||
12 | use Wallabag\CoreBundle\Filter\EntryFilterType; | 12 | use Wallabag\CoreBundle\Filter\EntryFilterType; |
13 | use Pagerfanta\Adapter\DoctrineORMAdapter; | 13 | use Wallabag\CoreBundle\Form\Type\EditEntryType; |
14 | use Pagerfanta\Pagerfanta; | 14 | use Wallabag\CoreBundle\Form\Type\NewEntryType; |
15 | 15 | ||
16 | class EntryController extends Controller | 16 | class EntryController extends Controller |
17 | { | 17 | { |
@@ -43,7 +43,7 @@ class EntryController extends Controller | |||
43 | { | 43 | { |
44 | $entry = new Entry($this->getUser()); | 44 | $entry = new Entry($this->getUser()); |
45 | 45 | ||
46 | $form = $this->createForm(new NewEntryType(), $entry); | 46 | $form = $this->createForm(NewEntryType::class, $entry); |
47 | 47 | ||
48 | $form->handleRequest($request); | 48 | $form->handleRequest($request); |
49 | 49 | ||
@@ -117,7 +117,7 @@ class EntryController extends Controller | |||
117 | { | 117 | { |
118 | $this->checkUserAction($entry); | 118 | $this->checkUserAction($entry); |
119 | 119 | ||
120 | $form = $this->createForm(new EditEntryType(), $entry); | 120 | $form = $this->createForm(EditEntryType::class, $entry); |
121 | 121 | ||
122 | $form->handleRequest($request); | 122 | $form->handleRequest($request); |
123 | 123 | ||
@@ -239,7 +239,7 @@ class EntryController extends Controller | |||
239 | throw new \InvalidArgumentException(sprintf('Type "%s" is not implemented.', $type)); | 239 | throw new \InvalidArgumentException(sprintf('Type "%s" is not implemented.', $type)); |
240 | } | 240 | } |
241 | 241 | ||
242 | $form = $this->get('form.factory')->create(new EntryFilterType($repository, $this->getUser())); | 242 | $form = $this->createForm(EntryFilterType::class); |
243 | 243 | ||
244 | if ($request->query->has($form->getName())) { | 244 | if ($request->query->has($form->getName())) { |
245 | // manually bind values from the request | 245 | // manually bind values from the request |
diff --git a/src/Wallabag/CoreBundle/Controller/RssController.php b/src/Wallabag/CoreBundle/Controller/RssController.php index 023a6228..2b7ef598 100644 --- a/src/Wallabag/CoreBundle/Controller/RssController.php +++ b/src/Wallabag/CoreBundle/Controller/RssController.php | |||
@@ -2,13 +2,13 @@ | |||
2 | 2 | ||
3 | namespace Wallabag\CoreBundle\Controller; | 3 | namespace Wallabag\CoreBundle\Controller; |
4 | 4 | ||
5 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; | 5 | use Pagerfanta\Adapter\DoctrineORMAdapter; |
6 | use Pagerfanta\Pagerfanta; | ||
6 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; | 7 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; |
8 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; | ||
7 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; | 9 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; |
8 | use Wallabag\UserBundle\Entity\User; | ||
9 | use Wallabag\CoreBundle\Entity\Entry; | 10 | use Wallabag\CoreBundle\Entity\Entry; |
10 | use Pagerfanta\Adapter\DoctrineORMAdapter; | 11 | use Wallabag\UserBundle\Entity\User; |
11 | use Pagerfanta\Pagerfanta; | ||
12 | 12 | ||
13 | class RssController extends Controller | 13 | class RssController extends Controller |
14 | { | 14 | { |
diff --git a/src/Wallabag/CoreBundle/Controller/TagController.php b/src/Wallabag/CoreBundle/Controller/TagController.php index 64d53f0c..ff4d64a8 100644 --- a/src/Wallabag/CoreBundle/Controller/TagController.php +++ b/src/Wallabag/CoreBundle/Controller/TagController.php | |||
@@ -5,9 +5,9 @@ namespace Wallabag\CoreBundle\Controller; | |||
5 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; | 5 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; |
6 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; | 6 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; |
7 | use Symfony\Component\HttpFoundation\Request; | 7 | use Symfony\Component\HttpFoundation\Request; |
8 | use Wallabag\CoreBundle\Form\Type\NewTagType; | ||
9 | use Wallabag\CoreBundle\Entity\Tag; | ||
10 | use Wallabag\CoreBundle\Entity\Entry; | 8 | use Wallabag\CoreBundle\Entity\Entry; |
9 | use Wallabag\CoreBundle\Entity\Tag; | ||
10 | use Wallabag\CoreBundle\Form\Type\NewTagType; | ||
11 | 11 | ||
12 | class TagController extends Controller | 12 | class TagController extends Controller |
13 | { | 13 | { |
@@ -21,7 +21,7 @@ class TagController extends Controller | |||
21 | public function addTagFormAction(Request $request, Entry $entry) | 21 | public function addTagFormAction(Request $request, Entry $entry) |
22 | { | 22 | { |
23 | $tag = new Tag(); | 23 | $tag = new Tag(); |
24 | $form = $this->createForm(new NewTagType(), $tag); | 24 | $form = $this->createForm(NewTagType::class, $tag); |
25 | $form->handleRequest($request); | 25 | $form->handleRequest($request); |
26 | 26 | ||
27 | if ($form->isValid()) { | 27 | if ($form->isValid()) { |
diff --git a/src/Wallabag/CoreBundle/DependencyInjection/WallabagCoreExtension.php b/src/Wallabag/CoreBundle/DependencyInjection/WallabagCoreExtension.php index 330cc957..9ff9b732 100644 --- a/src/Wallabag/CoreBundle/DependencyInjection/WallabagCoreExtension.php +++ b/src/Wallabag/CoreBundle/DependencyInjection/WallabagCoreExtension.php | |||
@@ -2,10 +2,10 @@ | |||
2 | 2 | ||
3 | namespace Wallabag\CoreBundle\DependencyInjection; | 3 | namespace Wallabag\CoreBundle\DependencyInjection; |
4 | 4 | ||
5 | use Symfony\Component\DependencyInjection\ContainerBuilder; | ||
6 | use Symfony\Component\Config\FileLocator; | 5 | use Symfony\Component\Config\FileLocator; |
7 | use Symfony\Component\HttpKernel\DependencyInjection\Extension; | 6 | use Symfony\Component\DependencyInjection\ContainerBuilder; |
8 | use Symfony\Component\DependencyInjection\Loader; | 7 | use Symfony\Component\DependencyInjection\Loader; |
8 | use Symfony\Component\HttpKernel\DependencyInjection\Extension; | ||
9 | 9 | ||
10 | class WallabagCoreExtension extends Extension | 10 | class WallabagCoreExtension extends Extension |
11 | { | 11 | { |
diff --git a/src/Wallabag/CoreBundle/Entity/Entry.php b/src/Wallabag/CoreBundle/Entity/Entry.php index f11a7786..24b24dbb 100644 --- a/src/Wallabag/CoreBundle/Entity/Entry.php +++ b/src/Wallabag/CoreBundle/Entity/Entry.php | |||
@@ -4,10 +4,10 @@ namespace Wallabag\CoreBundle\Entity; | |||
4 | 4 | ||
5 | use Doctrine\Common\Collections\ArrayCollection; | 5 | use Doctrine\Common\Collections\ArrayCollection; |
6 | use Doctrine\ORM\Mapping as ORM; | 6 | use Doctrine\ORM\Mapping as ORM; |
7 | use Symfony\Component\Validator\Constraints as Assert; | ||
8 | use Hateoas\Configuration\Annotation as Hateoas; | 7 | use Hateoas\Configuration\Annotation as Hateoas; |
9 | use JMS\Serializer\Annotation\Groups; | 8 | use JMS\Serializer\Annotation\Groups; |
10 | use JMS\Serializer\Annotation\XmlRoot; | 9 | use JMS\Serializer\Annotation\XmlRoot; |
10 | use Symfony\Component\Validator\Constraints as Assert; | ||
11 | use Wallabag\UserBundle\Entity\User; | 11 | use Wallabag\UserBundle\Entity\User; |
12 | 12 | ||
13 | /** | 13 | /** |
diff --git a/src/Wallabag/CoreBundle/Entity/Tag.php b/src/Wallabag/CoreBundle/Entity/Tag.php index 0689c7b3..c1940e99 100644 --- a/src/Wallabag/CoreBundle/Entity/Tag.php +++ b/src/Wallabag/CoreBundle/Entity/Tag.php | |||
@@ -2,12 +2,12 @@ | |||
2 | 2 | ||
3 | namespace Wallabag\CoreBundle\Entity; | 3 | namespace Wallabag\CoreBundle\Entity; |
4 | 4 | ||
5 | use Doctrine\Common\Collections\ArrayCollection; | ||
5 | use Doctrine\ORM\Mapping as ORM; | 6 | use Doctrine\ORM\Mapping as ORM; |
6 | use JMS\Serializer\Annotation\XmlRoot; | ||
7 | use JMS\Serializer\Annotation\ExclusionPolicy; | 7 | use JMS\Serializer\Annotation\ExclusionPolicy; |
8 | use JMS\Serializer\Annotation\Expose; | 8 | use JMS\Serializer\Annotation\Expose; |
9 | use Doctrine\Common\Collections\ArrayCollection; | ||
10 | use Gedmo\Mapping\Annotation as Gedmo; | 9 | use Gedmo\Mapping\Annotation as Gedmo; |
10 | use JMS\Serializer\Annotation\XmlRoot; | ||
11 | 11 | ||
12 | /** | 12 | /** |
13 | * Tag. | 13 | * Tag. |
diff --git a/src/Wallabag/CoreBundle/Entity/TaggingRule.php b/src/Wallabag/CoreBundle/Entity/TaggingRule.php index 329d7ff8..28914cc1 100644 --- a/src/Wallabag/CoreBundle/Entity/TaggingRule.php +++ b/src/Wallabag/CoreBundle/Entity/TaggingRule.php | |||
@@ -3,8 +3,8 @@ | |||
3 | namespace Wallabag\CoreBundle\Entity; | 3 | namespace Wallabag\CoreBundle\Entity; |
4 | 4 | ||
5 | use Doctrine\ORM\Mapping as ORM; | 5 | use Doctrine\ORM\Mapping as ORM; |
6 | use Symfony\Component\Validator\Constraints as Assert; | ||
7 | use KPhoen\RulerZBundle\Validator\Constraints as RulerZAssert; | 6 | use KPhoen\RulerZBundle\Validator\Constraints as RulerZAssert; |
7 | use Symfony\Component\Validator\Constraints as Assert; | ||
8 | 8 | ||
9 | /** | 9 | /** |
10 | * Tagging rule. | 10 | * Tagging rule. |
diff --git a/src/Wallabag/CoreBundle/Event/Subscriber/CustomDoctrineORMSubscriber.php b/src/Wallabag/CoreBundle/Event/Subscriber/CustomDoctrineORMSubscriber.php index cfdbfe97..cabb3eca 100644 --- a/src/Wallabag/CoreBundle/Event/Subscriber/CustomDoctrineORMSubscriber.php +++ b/src/Wallabag/CoreBundle/Event/Subscriber/CustomDoctrineORMSubscriber.php | |||
@@ -2,8 +2,8 @@ | |||
2 | 2 | ||
3 | namespace Wallabag\CoreBundle\Event\Subscriber; | 3 | namespace Wallabag\CoreBundle\Event\Subscriber; |
4 | 4 | ||
5 | use Lexik\Bundle\FormFilterBundle\Event\Subscriber\DoctrineORMSubscriber; | ||
6 | use Lexik\Bundle\FormFilterBundle\Event\GetFilterConditionEvent; | 5 | use Lexik\Bundle\FormFilterBundle\Event\GetFilterConditionEvent; |
6 | use Lexik\Bundle\FormFilterBundle\Event\Subscriber\DoctrineORMSubscriber; | ||
7 | use Symfony\Component\EventDispatcher\EventSubscriberInterface; | 7 | use Symfony\Component\EventDispatcher\EventSubscriberInterface; |
8 | 8 | ||
9 | /** | 9 | /** |
diff --git a/src/Wallabag/CoreBundle/EventListener/LocaleListener.php b/src/Wallabag/CoreBundle/EventListener/LocaleListener.php index 80f59504..05deac0a 100644 --- a/src/Wallabag/CoreBundle/EventListener/LocaleListener.php +++ b/src/Wallabag/CoreBundle/EventListener/LocaleListener.php | |||
@@ -2,9 +2,9 @@ | |||
2 | 2 | ||
3 | namespace Wallabag\CoreBundle\EventListener; | 3 | namespace Wallabag\CoreBundle\EventListener; |
4 | 4 | ||
5 | use Symfony\Component\EventDispatcher\EventSubscriberInterface; | ||
5 | use Symfony\Component\HttpKernel\Event\GetResponseEvent; | 6 | use Symfony\Component\HttpKernel\Event\GetResponseEvent; |
6 | use Symfony\Component\HttpKernel\KernelEvents; | 7 | use Symfony\Component\HttpKernel\KernelEvents; |
7 | use Symfony\Component\EventDispatcher\EventSubscriberInterface; | ||
8 | 8 | ||
9 | /** | 9 | /** |
10 | * @see http://symfony.com/doc/current/cookbook/session/locale_sticky_session.html | 10 | * @see http://symfony.com/doc/current/cookbook/session/locale_sticky_session.html |
diff --git a/src/Wallabag/CoreBundle/EventListener/RegistrationConfirmedListener.php b/src/Wallabag/CoreBundle/EventListener/RegistrationConfirmedListener.php index 68c25f1f..1c9160d5 100644 --- a/src/Wallabag/CoreBundle/EventListener/RegistrationConfirmedListener.php +++ b/src/Wallabag/CoreBundle/EventListener/RegistrationConfirmedListener.php | |||
@@ -2,11 +2,11 @@ | |||
2 | 2 | ||
3 | namespace Wallabag\CoreBundle\EventListener; | 3 | namespace Wallabag\CoreBundle\EventListener; |
4 | 4 | ||
5 | use Symfony\Component\EventDispatcher\EventDispatcherInterface; | ||
6 | use Symfony\Component\EventDispatcher\EventSubscriberInterface; | ||
7 | use Doctrine\ORM\EntityManager; | 5 | use Doctrine\ORM\EntityManager; |
8 | use FOS\UserBundle\Event\FilterUserResponseEvent; | 6 | use FOS\UserBundle\Event\FilterUserResponseEvent; |
9 | use FOS\UserBundle\FOSUserEvents; | 7 | use FOS\UserBundle\FOSUserEvents; |
8 | use Symfony\Component\EventDispatcher\EventDispatcherInterface; | ||
9 | use Symfony\Component\EventDispatcher\EventSubscriberInterface; | ||
10 | use Wallabag\CoreBundle\Entity\Config; | 10 | use Wallabag\CoreBundle\Entity\Config; |
11 | 11 | ||
12 | class RegistrationConfirmedListener implements EventSubscriberInterface | 12 | class RegistrationConfirmedListener implements EventSubscriberInterface |
diff --git a/src/Wallabag/CoreBundle/Filter/EntryFilterType.php b/src/Wallabag/CoreBundle/Filter/EntryFilterType.php index 32de21ca..c38be832 100644 --- a/src/Wallabag/CoreBundle/Filter/EntryFilterType.php +++ b/src/Wallabag/CoreBundle/Filter/EntryFilterType.php | |||
@@ -2,12 +2,17 @@ | |||
2 | 2 | ||
3 | namespace Wallabag\CoreBundle\Filter; | 3 | namespace Wallabag\CoreBundle\Filter; |
4 | 4 | ||
5 | use Doctrine\ORM\EntityRepository; | ||
6 | use Lexik\Bundle\FormFilterBundle\Filter\Query\QueryInterface; | ||
7 | use Lexik\Bundle\FormFilterBundle\Filter\Form\Type\NumberRangeFilterType; | ||
8 | use Lexik\Bundle\FormFilterBundle\Filter\Form\Type\DateRangeFilterType; | ||
9 | use Lexik\Bundle\FormFilterBundle\Filter\Form\Type\TextFilterType; | ||
10 | use Lexik\Bundle\FormFilterBundle\Filter\Form\Type\CheckboxFilterType; | ||
11 | use Lexik\Bundle\FormFilterBundle\Filter\Form\Type\ChoiceFilterType; | ||
5 | use Symfony\Component\Form\AbstractType; | 12 | use Symfony\Component\Form\AbstractType; |
6 | use Symfony\Component\Form\FormBuilderInterface; | 13 | use Symfony\Component\Form\FormBuilderInterface; |
7 | use Symfony\Component\OptionsResolver\OptionsResolver; | 14 | use Symfony\Component\OptionsResolver\OptionsResolver; |
8 | use Lexik\Bundle\FormFilterBundle\Filter\Query\QueryInterface; | 15 | use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage; |
9 | use Doctrine\ORM\EntityRepository; | ||
10 | use Wallabag\UserBundle\Entity\User; | ||
11 | 16 | ||
12 | class EntryFilterType extends AbstractType | 17 | class EntryFilterType extends AbstractType |
13 | { | 18 | { |
@@ -18,19 +23,19 @@ class EntryFilterType extends AbstractType | |||
18 | * Repository & user are used to get a list of language entries for this user. | 23 | * Repository & user are used to get a list of language entries for this user. |
19 | * | 24 | * |
20 | * @param EntityRepository $entryRepository | 25 | * @param EntityRepository $entryRepository |
21 | * @param User $user | 26 | * @param TokenStorage $token |
22 | */ | 27 | */ |
23 | public function __construct(EntityRepository $entryRepository, User $user) | 28 | public function __construct(EntityRepository $entryRepository, TokenStorage $token) |
24 | { | 29 | { |
25 | $this->repository = $entryRepository; | 30 | $this->repository = $entryRepository; |
26 | $this->user = $user; | 31 | $this->user = $token->getToken()->getUser(); |
27 | } | 32 | } |
28 | 33 | ||
29 | public function buildForm(FormBuilderInterface $builder, array $options) | 34 | public function buildForm(FormBuilderInterface $builder, array $options) |
30 | { | 35 | { |
31 | $builder | 36 | $builder |
32 | ->add('readingTime', 'filter_number_range') | 37 | ->add('readingTime', NumberRangeFilterType::class) |
33 | ->add('createdAt', 'filter_date_range', array( | 38 | ->add('createdAt', DateRangeFilterType::class, array( |
34 | 'left_date_options' => array( | 39 | 'left_date_options' => array( |
35 | 'attr' => array( | 40 | 'attr' => array( |
36 | 'placeholder' => 'dd/mm/yyyy', | 41 | 'placeholder' => 'dd/mm/yyyy', |
@@ -47,20 +52,20 @@ class EntryFilterType extends AbstractType | |||
47 | ), | 52 | ), |
48 | ) | 53 | ) |
49 | ) | 54 | ) |
50 | ->add('domainName', 'filter_text', array( | 55 | ->add('domainName', TextFilterType::class, array( |
51 | 'apply_filter' => function (QueryInterface $filterQuery, $field, $values) { | 56 | 'apply_filter' => function (QueryInterface $filterQuery, $field, $values) { |
52 | $value = $values['value']; | 57 | $value = $values['value']; |
53 | if (strlen($value) <= 2 || empty($value)) { | 58 | if (strlen($value) <= 2 || empty($value)) { |
54 | return; | 59 | return; |
55 | } | 60 | } |
56 | $expression = $filterQuery->getExpr()->like($field, $filterQuery->getExpr()->literal('%'.$value.'%')); | 61 | $expression = $filterQuery->getExpr()->like($field, $filterQuery->getExpr()->literal('%'.$value.'%')); |
57 | 62 | ||
58 | return $filterQuery->createCondition($expression); | 63 | return $filterQuery->createCondition($expression); |
59 | }, | 64 | }, |
60 | )) | 65 | )) |
61 | ->add('isArchived', 'filter_checkbox') | 66 | ->add('isArchived', CheckboxFilterType::class) |
62 | ->add('isStarred', 'filter_checkbox') | 67 | ->add('isStarred', CheckboxFilterType::class) |
63 | ->add('previewPicture', 'filter_checkbox', array( | 68 | ->add('previewPicture', CheckboxFilterType::class, array( |
64 | 'apply_filter' => function (QueryInterface $filterQuery, $field, $values) { | 69 | 'apply_filter' => function (QueryInterface $filterQuery, $field, $values) { |
65 | if (false === $values['value']) { | 70 | if (false === $values['value']) { |
66 | return; | 71 | return; |
@@ -71,13 +76,14 @@ class EntryFilterType extends AbstractType | |||
71 | return $filterQuery->createCondition($expression); | 76 | return $filterQuery->createCondition($expression); |
72 | }, | 77 | }, |
73 | )) | 78 | )) |
74 | ->add('language', 'filter_choice', array( | 79 | ->add('language', ChoiceFilterType::class, array( |
75 | 'choices' => $this->repository->findDistinctLanguageByUser($this->user->getId()), | 80 | 'choices' => array_flip($this->repository->findDistinctLanguageByUser($this->user->getId())), |
81 | 'choices_as_values' => true, | ||
76 | )) | 82 | )) |
77 | ; | 83 | ; |
78 | } | 84 | } |
79 | 85 | ||
80 | public function getName() | 86 | public function getBlockPrefix() |
81 | { | 87 | { |
82 | return 'entry_filter'; | 88 | return 'entry_filter'; |
83 | } | 89 | } |
diff --git a/src/Wallabag/CoreBundle/Form/Type/ChangePasswordType.php b/src/Wallabag/CoreBundle/Form/Type/ChangePasswordType.php index 82e1954d..7d05a5d8 100644 --- a/src/Wallabag/CoreBundle/Form/Type/ChangePasswordType.php +++ b/src/Wallabag/CoreBundle/Form/Type/ChangePasswordType.php | |||
@@ -3,6 +3,9 @@ | |||
3 | namespace Wallabag\CoreBundle\Form\Type; | 3 | namespace Wallabag\CoreBundle\Form\Type; |
4 | 4 | ||
5 | use Symfony\Component\Form\AbstractType; | 5 | use Symfony\Component\Form\AbstractType; |
6 | use Symfony\Component\Form\Extension\Core\Type\PasswordType; | ||
7 | use Symfony\Component\Form\Extension\Core\Type\RepeatedType; | ||
8 | use Symfony\Component\Form\Extension\Core\Type\SubmitType; | ||
6 | use Symfony\Component\Form\FormBuilderInterface; | 9 | use Symfony\Component\Form\FormBuilderInterface; |
7 | use Symfony\Component\Security\Core\Validator\Constraints\UserPassword; | 10 | use Symfony\Component\Security\Core\Validator\Constraints\UserPassword; |
8 | use Symfony\Component\Validator\Constraints; | 11 | use Symfony\Component\Validator\Constraints; |
@@ -12,11 +15,11 @@ class ChangePasswordType extends AbstractType | |||
12 | public function buildForm(FormBuilderInterface $builder, array $options) | 15 | public function buildForm(FormBuilderInterface $builder, array $options) |
13 | { | 16 | { |
14 | $builder | 17 | $builder |
15 | ->add('old_password', 'password', array( | 18 | ->add('old_password', PasswordType::class, array( |
16 | 'constraints' => new UserPassword(array('message' => 'Wrong value for your current password')), | 19 | 'constraints' => new UserPassword(array('message' => 'Wrong value for your current password')), |
17 | )) | 20 | )) |
18 | ->add('new_password', 'repeated', array( | 21 | ->add('new_password', RepeatedType::class, array( |
19 | 'type' => 'password', | 22 | 'type' => PasswordType::class, |
20 | 'invalid_message' => 'The password fields must match.', | 23 | 'invalid_message' => 'The password fields must match.', |
21 | 'required' => true, | 24 | 'required' => true, |
22 | 'first_options' => array('label' => 'New password'), | 25 | 'first_options' => array('label' => 'New password'), |
@@ -29,11 +32,11 @@ class ChangePasswordType extends AbstractType | |||
29 | new Constraints\NotBlank(), | 32 | new Constraints\NotBlank(), |
30 | ), | 33 | ), |
31 | )) | 34 | )) |
32 | ->add('save', 'submit') | 35 | ->add('save', SubmitType::class) |
33 | ; | 36 | ; |
34 | } | 37 | } |
35 | 38 | ||
36 | public function getName() | 39 | public function getBlockPrefix() |
37 | { | 40 | { |
38 | return 'change_passwd'; | 41 | return 'change_passwd'; |
39 | } | 42 | } |
diff --git a/src/Wallabag/CoreBundle/Form/Type/ConfigType.php b/src/Wallabag/CoreBundle/Form/Type/ConfigType.php index 1f0ad89d..a139f2df 100644 --- a/src/Wallabag/CoreBundle/Form/Type/ConfigType.php +++ b/src/Wallabag/CoreBundle/Form/Type/ConfigType.php | |||
@@ -3,6 +3,8 @@ | |||
3 | namespace Wallabag\CoreBundle\Form\Type; | 3 | namespace Wallabag\CoreBundle\Form\Type; |
4 | 4 | ||
5 | use Symfony\Component\Form\AbstractType; | 5 | use Symfony\Component\Form\AbstractType; |
6 | use Symfony\Component\Form\Extension\Core\Type\ChoiceType; | ||
7 | use Symfony\Component\Form\Extension\Core\Type\SubmitType; | ||
6 | use Symfony\Component\Form\FormBuilderInterface; | 8 | use Symfony\Component\Form\FormBuilderInterface; |
7 | use Symfony\Component\OptionsResolver\OptionsResolver; | 9 | use Symfony\Component\OptionsResolver\OptionsResolver; |
8 | 10 | ||
@@ -28,15 +30,16 @@ class ConfigType extends AbstractType | |||
28 | public function buildForm(FormBuilderInterface $builder, array $options) | 30 | public function buildForm(FormBuilderInterface $builder, array $options) |
29 | { | 31 | { |
30 | $builder | 32 | $builder |
31 | ->add('theme', 'choice', array( | 33 | ->add('theme', ChoiceType::class, array( |
32 | 'choices' => array_flip($this->themes), | 34 | 'choices' => array_flip($this->themes), |
33 | 'choices_as_values' => true, | 35 | 'choices_as_values' => true, |
34 | )) | 36 | )) |
35 | ->add('items_per_page') | 37 | ->add('items_per_page') |
36 | ->add('language', 'choice', array( | 38 | ->add('language', ChoiceType::class, array( |
37 | 'choices' => $this->languages, | 39 | 'choices' => array_flip($this->languages), |
40 | 'choices_as_values' => true, | ||
38 | )) | 41 | )) |
39 | ->add('save', 'submit') | 42 | ->add('save', SubmitType::class) |
40 | ; | 43 | ; |
41 | } | 44 | } |
42 | 45 | ||
@@ -47,7 +50,7 @@ class ConfigType extends AbstractType | |||
47 | )); | 50 | )); |
48 | } | 51 | } |
49 | 52 | ||
50 | public function getName() | 53 | public function getBlockPrefix() |
51 | { | 54 | { |
52 | return 'config'; | 55 | return 'config'; |
53 | } | 56 | } |
diff --git a/src/Wallabag/CoreBundle/Form/Type/EditEntryType.php b/src/Wallabag/CoreBundle/Form/Type/EditEntryType.php index 0fa4b71f..0cb29881 100644 --- a/src/Wallabag/CoreBundle/Form/Type/EditEntryType.php +++ b/src/Wallabag/CoreBundle/Form/Type/EditEntryType.php | |||
@@ -3,6 +3,9 @@ | |||
3 | namespace Wallabag\CoreBundle\Form\Type; | 3 | namespace Wallabag\CoreBundle\Form\Type; |
4 | 4 | ||
5 | use Symfony\Component\Form\AbstractType; | 5 | use Symfony\Component\Form\AbstractType; |
6 | use Symfony\Component\Form\Extension\Core\Type\CheckboxType; | ||
7 | use Symfony\Component\Form\Extension\Core\Type\SubmitType; | ||
8 | use Symfony\Component\Form\Extension\Core\Type\TextType; | ||
6 | use Symfony\Component\Form\FormBuilderInterface; | 9 | use Symfony\Component\Form\FormBuilderInterface; |
7 | use Symfony\Component\OptionsResolver\OptionsResolver; | 10 | use Symfony\Component\OptionsResolver\OptionsResolver; |
8 | 11 | ||
@@ -11,14 +14,14 @@ class EditEntryType extends AbstractType | |||
11 | public function buildForm(FormBuilderInterface $builder, array $options) | 14 | public function buildForm(FormBuilderInterface $builder, array $options) |
12 | { | 15 | { |
13 | $builder | 16 | $builder |
14 | ->add('title', 'text', array('required' => true)) | 17 | ->add('title', TextType::class, array('required' => true)) |
15 | ->add('is_public', 'checkbox', array('required' => false)) | 18 | ->add('is_public', CheckboxType::class, array('required' => false)) |
16 | // @todo: add autocomplete | 19 | // @todo: add autocomplete |
17 | // ->add('tags', 'entity', array( | 20 | // ->add('tags', 'entity', array( |
18 | // 'class' => 'Wallabag\CoreBundle\Entity\Tag', | 21 | // 'class' => 'Wallabag\CoreBundle\Entity\Tag', |
19 | // 'choice_translation_domain' => true, | 22 | // 'choice_translation_domain' => true, |
20 | // )) | 23 | // )) |
21 | ->add('save', 'submit') | 24 | ->add('save', SubmitType::class) |
22 | ; | 25 | ; |
23 | } | 26 | } |
24 | 27 | ||
@@ -29,7 +32,7 @@ class EditEntryType extends AbstractType | |||
29 | )); | 32 | )); |
30 | } | 33 | } |
31 | 34 | ||
32 | public function getName() | 35 | public function getBlockPrefix() |
33 | { | 36 | { |
34 | return 'entry'; | 37 | return 'entry'; |
35 | } | 38 | } |
diff --git a/src/Wallabag/CoreBundle/Form/Type/NewEntryType.php b/src/Wallabag/CoreBundle/Form/Type/NewEntryType.php index cb96d11a..fbce13f1 100644 --- a/src/Wallabag/CoreBundle/Form/Type/NewEntryType.php +++ b/src/Wallabag/CoreBundle/Form/Type/NewEntryType.php | |||
@@ -3,6 +3,8 @@ | |||
3 | namespace Wallabag\CoreBundle\Form\Type; | 3 | namespace Wallabag\CoreBundle\Form\Type; |
4 | 4 | ||
5 | use Symfony\Component\Form\AbstractType; | 5 | use Symfony\Component\Form\AbstractType; |
6 | use Symfony\Component\Form\Extension\Core\Type\SubmitType; | ||
7 | use Symfony\Component\Form\Extension\Core\Type\UrlType; | ||
6 | use Symfony\Component\Form\FormBuilderInterface; | 8 | use Symfony\Component\Form\FormBuilderInterface; |
7 | use Symfony\Component\OptionsResolver\OptionsResolver; | 9 | use Symfony\Component\OptionsResolver\OptionsResolver; |
8 | 10 | ||
@@ -11,8 +13,8 @@ class NewEntryType extends AbstractType | |||
11 | public function buildForm(FormBuilderInterface $builder, array $options) | 13 | public function buildForm(FormBuilderInterface $builder, array $options) |
12 | { | 14 | { |
13 | $builder | 15 | $builder |
14 | ->add('url', 'url', array('required' => true)) | 16 | ->add('url', UrlType::class, array('required' => true)) |
15 | ->add('save', 'submit') | 17 | ->add('save', SubmitType::class) |
16 | ; | 18 | ; |
17 | } | 19 | } |
18 | 20 | ||
@@ -23,7 +25,7 @@ class NewEntryType extends AbstractType | |||
23 | )); | 25 | )); |
24 | } | 26 | } |
25 | 27 | ||
26 | public function getName() | 28 | public function getBlockPrefix() |
27 | { | 29 | { |
28 | return 'entry'; | 30 | return 'entry'; |
29 | } | 31 | } |
diff --git a/src/Wallabag/CoreBundle/Form/Type/NewTagType.php b/src/Wallabag/CoreBundle/Form/Type/NewTagType.php index 8e4ab649..0f559031 100644 --- a/src/Wallabag/CoreBundle/Form/Type/NewTagType.php +++ b/src/Wallabag/CoreBundle/Form/Type/NewTagType.php | |||
@@ -3,6 +3,8 @@ | |||
3 | namespace Wallabag\CoreBundle\Form\Type; | 3 | namespace Wallabag\CoreBundle\Form\Type; |
4 | 4 | ||
5 | use Symfony\Component\Form\AbstractType; | 5 | use Symfony\Component\Form\AbstractType; |
6 | use Symfony\Component\Form\Extension\Core\Type\SubmitType; | ||
7 | use Symfony\Component\Form\Extension\Core\Type\TextType; | ||
6 | use Symfony\Component\Form\FormBuilderInterface; | 8 | use Symfony\Component\Form\FormBuilderInterface; |
7 | use Symfony\Component\OptionsResolver\OptionsResolver; | 9 | use Symfony\Component\OptionsResolver\OptionsResolver; |
8 | 10 | ||
@@ -11,8 +13,8 @@ class NewTagType extends AbstractType | |||
11 | public function buildForm(FormBuilderInterface $builder, array $options) | 13 | public function buildForm(FormBuilderInterface $builder, array $options) |
12 | { | 14 | { |
13 | $builder | 15 | $builder |
14 | ->add('label', 'text', array('required' => true)) | 16 | ->add('label', TextType::class, array('required' => true)) |
15 | ->add('save', 'submit') | 17 | ->add('save', SubmitType::class) |
16 | ; | 18 | ; |
17 | } | 19 | } |
18 | 20 | ||
@@ -23,7 +25,7 @@ class NewTagType extends AbstractType | |||
23 | )); | 25 | )); |
24 | } | 26 | } |
25 | 27 | ||
26 | public function getName() | 28 | public function getBlockPrefix() |
27 | { | 29 | { |
28 | return 'tag'; | 30 | return 'tag'; |
29 | } | 31 | } |
diff --git a/src/Wallabag/CoreBundle/Form/Type/NewUserType.php b/src/Wallabag/CoreBundle/Form/Type/NewUserType.php index 8aabc8bb..ffbe9ba2 100644 --- a/src/Wallabag/CoreBundle/Form/Type/NewUserType.php +++ b/src/Wallabag/CoreBundle/Form/Type/NewUserType.php | |||
@@ -3,6 +3,11 @@ | |||
3 | namespace Wallabag\CoreBundle\Form\Type; | 3 | namespace Wallabag\CoreBundle\Form\Type; |
4 | 4 | ||
5 | use Symfony\Component\Form\AbstractType; | 5 | use Symfony\Component\Form\AbstractType; |
6 | use Symfony\Component\Form\Extension\Core\Type\EmailType; | ||
7 | use Symfony\Component\Form\Extension\Core\Type\PasswordType; | ||
8 | use Symfony\Component\Form\Extension\Core\Type\RepeatedType; | ||
9 | use Symfony\Component\Form\Extension\Core\Type\SubmitType; | ||
10 | use Symfony\Component\Form\Extension\Core\Type\TextType; | ||
6 | use Symfony\Component\Form\FormBuilderInterface; | 11 | use Symfony\Component\Form\FormBuilderInterface; |
7 | use Symfony\Component\OptionsResolver\OptionsResolver; | 12 | use Symfony\Component\OptionsResolver\OptionsResolver; |
8 | use Symfony\Component\Validator\Constraints; | 13 | use Symfony\Component\Validator\Constraints; |
@@ -12,9 +17,9 @@ class NewUserType extends AbstractType | |||
12 | public function buildForm(FormBuilderInterface $builder, array $options) | 17 | public function buildForm(FormBuilderInterface $builder, array $options) |
13 | { | 18 | { |
14 | $builder | 19 | $builder |
15 | ->add('username', 'text', array('required' => true)) | 20 | ->add('username', TextType::class, array('required' => true)) |
16 | ->add('plainPassword', 'repeated', array( | 21 | ->add('plainPassword', RepeatedType::class, array( |
17 | 'type' => 'password', | 22 | 'type' => PasswordType::class, |
18 | 'constraints' => array( | 23 | 'constraints' => array( |
19 | new Constraints\Length(array( | 24 | new Constraints\Length(array( |
20 | 'min' => 8, | 25 | 'min' => 8, |
@@ -23,8 +28,8 @@ class NewUserType extends AbstractType | |||
23 | new Constraints\NotBlank(), | 28 | new Constraints\NotBlank(), |
24 | ), | 29 | ), |
25 | )) | 30 | )) |
26 | ->add('email', 'email') | 31 | ->add('email', EmailType::class) |
27 | ->add('save', 'submit') | 32 | ->add('save', SubmitType::class) |
28 | ; | 33 | ; |
29 | } | 34 | } |
30 | 35 | ||
@@ -35,7 +40,7 @@ class NewUserType extends AbstractType | |||
35 | )); | 40 | )); |
36 | } | 41 | } |
37 | 42 | ||
38 | public function getName() | 43 | public function getBlockPrefix() |
39 | { | 44 | { |
40 | return 'new_user'; | 45 | return 'new_user'; |
41 | } | 46 | } |
diff --git a/src/Wallabag/CoreBundle/Form/Type/RssType.php b/src/Wallabag/CoreBundle/Form/Type/RssType.php index 1f7f4c68..def8782c 100644 --- a/src/Wallabag/CoreBundle/Form/Type/RssType.php +++ b/src/Wallabag/CoreBundle/Form/Type/RssType.php | |||
@@ -3,6 +3,7 @@ | |||
3 | namespace Wallabag\CoreBundle\Form\Type; | 3 | namespace Wallabag\CoreBundle\Form\Type; |
4 | 4 | ||
5 | use Symfony\Component\Form\AbstractType; | 5 | use Symfony\Component\Form\AbstractType; |
6 | use Symfony\Component\Form\Extension\Core\Type\SubmitType; | ||
6 | use Symfony\Component\Form\FormBuilderInterface; | 7 | use Symfony\Component\Form\FormBuilderInterface; |
7 | use Symfony\Component\OptionsResolver\OptionsResolver; | 8 | use Symfony\Component\OptionsResolver\OptionsResolver; |
8 | 9 | ||
@@ -12,7 +13,7 @@ class RssType extends AbstractType | |||
12 | { | 13 | { |
13 | $builder | 14 | $builder |
14 | ->add('rss_limit') | 15 | ->add('rss_limit') |
15 | ->add('save', 'submit') | 16 | ->add('save', SubmitType::class) |
16 | ; | 17 | ; |
17 | } | 18 | } |
18 | 19 | ||
@@ -23,7 +24,7 @@ class RssType extends AbstractType | |||
23 | )); | 24 | )); |
24 | } | 25 | } |
25 | 26 | ||
26 | public function getName() | 27 | public function getBlockPrefix() |
27 | { | 28 | { |
28 | return 'rss_config'; | 29 | return 'rss_config'; |
29 | } | 30 | } |
diff --git a/src/Wallabag/CoreBundle/Form/Type/TaggingRuleType.php b/src/Wallabag/CoreBundle/Form/Type/TaggingRuleType.php index 428d94b3..5815b8c6 100644 --- a/src/Wallabag/CoreBundle/Form/Type/TaggingRuleType.php +++ b/src/Wallabag/CoreBundle/Form/Type/TaggingRuleType.php | |||
@@ -3,6 +3,8 @@ | |||
3 | namespace Wallabag\CoreBundle\Form\Type; | 3 | namespace Wallabag\CoreBundle\Form\Type; |
4 | 4 | ||
5 | use Symfony\Component\Form\AbstractType; | 5 | use Symfony\Component\Form\AbstractType; |
6 | use Symfony\Component\Form\Extension\Core\Type\SubmitType; | ||
7 | use Symfony\Component\Form\Extension\Core\Type\TextType; | ||
6 | use Symfony\Component\Form\FormBuilderInterface; | 8 | use Symfony\Component\Form\FormBuilderInterface; |
7 | use Symfony\Component\OptionsResolver\OptionsResolver; | 9 | use Symfony\Component\OptionsResolver\OptionsResolver; |
8 | use Wallabag\CoreBundle\Form\DataTransformer\StringToListTransformer; | 10 | use Wallabag\CoreBundle\Form\DataTransformer\StringToListTransformer; |
@@ -12,12 +14,12 @@ class TaggingRuleType extends AbstractType | |||
12 | public function buildForm(FormBuilderInterface $builder, array $options) | 14 | public function buildForm(FormBuilderInterface $builder, array $options) |
13 | { | 15 | { |
14 | $builder | 16 | $builder |
15 | ->add('rule', 'text', array('required' => true)) | 17 | ->add('rule', TextType::class, array('required' => true)) |
16 | ->add('save', 'submit') | 18 | ->add('save', SubmitType::class) |
17 | ; | 19 | ; |
18 | 20 | ||
19 | $tagsField = $builder | 21 | $tagsField = $builder |
20 | ->create('tags', 'text') | 22 | ->create('tags', TextType::class) |
21 | ->addModelTransformer(new StringToListTransformer(',')); | 23 | ->addModelTransformer(new StringToListTransformer(',')); |
22 | 24 | ||
23 | $builder->add($tagsField); | 25 | $builder->add($tagsField); |
@@ -30,7 +32,7 @@ class TaggingRuleType extends AbstractType | |||
30 | )); | 32 | )); |
31 | } | 33 | } |
32 | 34 | ||
33 | public function getName() | 35 | public function getBlockPrefix() |
34 | { | 36 | { |
35 | return 'tagging_rule'; | 37 | return 'tagging_rule'; |
36 | } | 38 | } |
diff --git a/src/Wallabag/CoreBundle/Form/Type/UserInformationType.php b/src/Wallabag/CoreBundle/Form/Type/UserInformationType.php index e06c937d..f491b0ae 100644 --- a/src/Wallabag/CoreBundle/Form/Type/UserInformationType.php +++ b/src/Wallabag/CoreBundle/Form/Type/UserInformationType.php | |||
@@ -3,6 +3,10 @@ | |||
3 | namespace Wallabag\CoreBundle\Form\Type; | 3 | namespace Wallabag\CoreBundle\Form\Type; |
4 | 4 | ||
5 | use Symfony\Component\Form\AbstractType; | 5 | use Symfony\Component\Form\AbstractType; |
6 | use Symfony\Component\Form\Extension\Core\Type\CheckboxType; | ||
7 | use Symfony\Component\Form\Extension\Core\Type\EmailType; | ||
8 | use Symfony\Component\Form\Extension\Core\Type\SubmitType; | ||
9 | use Symfony\Component\Form\Extension\Core\Type\TextType; | ||
6 | use Symfony\Component\Form\FormBuilderInterface; | 10 | use Symfony\Component\Form\FormBuilderInterface; |
7 | use Symfony\Component\OptionsResolver\OptionsResolver; | 11 | use Symfony\Component\OptionsResolver\OptionsResolver; |
8 | 12 | ||
@@ -11,10 +15,10 @@ class UserInformationType extends AbstractType | |||
11 | public function buildForm(FormBuilderInterface $builder, array $options) | 15 | public function buildForm(FormBuilderInterface $builder, array $options) |
12 | { | 16 | { |
13 | $builder | 17 | $builder |
14 | ->add('name', 'text') | 18 | ->add('name', TextType::class) |
15 | ->add('email', 'email') | 19 | ->add('email', EmailType::class) |
16 | ->add('twoFactorAuthentication', 'checkbox', array('required' => false)) | 20 | ->add('twoFactorAuthentication', CheckboxType::class, array('required' => false)) |
17 | ->add('save', 'submit') | 21 | ->add('save', SubmitType::class) |
18 | ->remove('username') | 22 | ->remove('username') |
19 | ->remove('plainPassword') | 23 | ->remove('plainPassword') |
20 | ; | 24 | ; |
@@ -22,7 +26,7 @@ class UserInformationType extends AbstractType | |||
22 | 26 | ||
23 | public function getParent() | 27 | public function getParent() |
24 | { | 28 | { |
25 | return 'fos_user_registration'; | 29 | return 'FOS\UserBundle\Form\Type\RegistrationFormType'; |
26 | } | 30 | } |
27 | 31 | ||
28 | public function configureOptions(OptionsResolver $resolver) | 32 | public function configureOptions(OptionsResolver $resolver) |
@@ -32,7 +36,7 @@ class UserInformationType extends AbstractType | |||
32 | )); | 36 | )); |
33 | } | 37 | } |
34 | 38 | ||
35 | public function getName() | 39 | public function getBlockPrefix() |
36 | { | 40 | { |
37 | return 'update_user'; | 41 | return 'update_user'; |
38 | } | 42 | } |
diff --git a/src/Wallabag/CoreBundle/Helper/EntriesExport.php b/src/Wallabag/CoreBundle/Helper/EntriesExport.php index d6a4d094..31a80d6e 100644 --- a/src/Wallabag/CoreBundle/Helper/EntriesExport.php +++ b/src/Wallabag/CoreBundle/Helper/EntriesExport.php | |||
@@ -2,12 +2,12 @@ | |||
2 | 2 | ||
3 | namespace Wallabag\CoreBundle\Helper; | 3 | namespace Wallabag\CoreBundle\Helper; |
4 | 4 | ||
5 | use JMS\Serializer; | ||
6 | use JMS\Serializer\SerializationContext; | ||
7 | use JMS\Serializer\SerializerBuilder; | ||
5 | use PHPePub\Core\EPub; | 8 | use PHPePub\Core\EPub; |
6 | use PHPePub\Core\Structure\OPF\DublinCore; | 9 | use PHPePub\Core\Structure\OPF\DublinCore; |
7 | use Symfony\Component\HttpFoundation\Response; | 10 | use Symfony\Component\HttpFoundation\Response; |
8 | use JMS\Serializer; | ||
9 | use JMS\Serializer\SerializerBuilder; | ||
10 | use JMS\Serializer\SerializationContext; | ||
11 | 11 | ||
12 | /** | 12 | /** |
13 | * This class doesn't have unit test BUT it's fully covered by a functional test with ExportControllerTest. | 13 | * This class doesn't have unit test BUT it's fully covered by a functional test with ExportControllerTest. |
diff --git a/src/Wallabag/CoreBundle/ParamConverter/UsernameRssTokenConverter.php b/src/Wallabag/CoreBundle/ParamConverter/UsernameRssTokenConverter.php index f7faa2c1..6ea2a4f3 100644 --- a/src/Wallabag/CoreBundle/ParamConverter/UsernameRssTokenConverter.php +++ b/src/Wallabag/CoreBundle/ParamConverter/UsernameRssTokenConverter.php | |||
@@ -2,9 +2,9 @@ | |||
2 | 2 | ||
3 | namespace Wallabag\CoreBundle\ParamConverter; | 3 | namespace Wallabag\CoreBundle\ParamConverter; |
4 | 4 | ||
5 | use Sensio\Bundle\FrameworkExtraBundle\Request\ParamConverter\ParamConverterInterface; | ||
6 | use Doctrine\Common\Persistence\ManagerRegistry; | 5 | use Doctrine\Common\Persistence\ManagerRegistry; |
7 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; | 6 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; |
7 | use Sensio\Bundle\FrameworkExtraBundle\Request\ParamConverter\ParamConverterInterface; | ||
8 | use Symfony\Component\HttpFoundation\Request; | 8 | use Symfony\Component\HttpFoundation\Request; |
9 | use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; | 9 | use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; |
10 | use Wallabag\UserBundle\Entity\User; | 10 | use Wallabag\UserBundle\Entity\User; |
diff --git a/src/Wallabag/CoreBundle/Resources/config/services.yml b/src/Wallabag/CoreBundle/Resources/config/services.yml index 96b1c931..43600735 100644 --- a/src/Wallabag/CoreBundle/Resources/config/services.yml +++ b/src/Wallabag/CoreBundle/Resources/config/services.yml | |||
@@ -2,7 +2,7 @@ services: | |||
2 | wallabag_core.helper.detect_active_theme: | 2 | wallabag_core.helper.detect_active_theme: |
3 | class: Wallabag\CoreBundle\Helper\DetectActiveTheme | 3 | class: Wallabag\CoreBundle\Helper\DetectActiveTheme |
4 | arguments: | 4 | arguments: |
5 | - @security.token_storage | 5 | - "@security.token_storage" |
6 | - %theme% # default theme from parameters.yml | 6 | - %theme% # default theme from parameters.yml |
7 | 7 | ||
8 | # custom form type | 8 | # custom form type |
@@ -12,26 +12,22 @@ services: | |||
12 | - %liip_theme.themes% | 12 | - %liip_theme.themes% |
13 | - %wallabag_core.languages% | 13 | - %wallabag_core.languages% |
14 | tags: | 14 | tags: |
15 | - { name: form.type, alias: config } | 15 | - { name: form.type } |
16 | 16 | ||
17 | wallabag_core.form.registration: | 17 | wallabag_core.filter.type.entry: |
18 | class: Wallabag\CoreBundle\Form\Type\RegistrationType | 18 | class: Wallabag\CoreBundle\Filter\EntryFilterType |
19 | tags: | ||
20 | - { name: form.type, alias: wallabag_user_registration } | ||
21 | |||
22 | wallabag_core.form.type.forgot_password: | ||
23 | class: Wallabag\CoreBundle\Form\Type\ForgotPasswordType | ||
24 | arguments: | 19 | arguments: |
25 | - @doctrine | 20 | - "@wallabag_core.entry_repository" |
21 | - "@security.token_storage" | ||
26 | tags: | 22 | tags: |
27 | - { name: form.type, alias: forgot_password } | 23 | - { name: form.type } |
28 | 24 | ||
29 | wallabag_core.param_converter.username_rsstoken_converter: | 25 | wallabag_core.param_converter.username_rsstoken_converter: |
30 | class: Wallabag\CoreBundle\ParamConverter\UsernameRssTokenConverter | 26 | class: Wallabag\CoreBundle\ParamConverter\UsernameRssTokenConverter |
31 | tags: | 27 | tags: |
32 | - { name: request.param_converter, converter: username_rsstoken_converter } | 28 | - { name: request.param_converter, converter: username_rsstoken_converter } |
33 | arguments: | 29 | arguments: |
34 | - @doctrine | 30 | - "@doctrine" |
35 | 31 | ||
36 | wallabag_core.table_prefix_subscriber: | 32 | wallabag_core.table_prefix_subscriber: |
37 | class: Wallabag\CoreBundle\Subscriber\TablePrefixSubscriber | 33 | class: Wallabag\CoreBundle\Subscriber\TablePrefixSubscriber |
@@ -45,41 +41,41 @@ services: | |||
45 | arguments: | 41 | arguments: |
46 | - { error_message: false } | 42 | - { error_message: false } |
47 | calls: | 43 | calls: |
48 | - [ setLogger, [ @logger ] ] | 44 | - [ setLogger, [ "@logger" ] ] |
49 | tags: | 45 | tags: |
50 | - { name: monolog.logger, channel: graby } | 46 | - { name: monolog.logger, channel: graby } |
51 | 47 | ||
52 | wallabag_core.content_proxy: | 48 | wallabag_core.content_proxy: |
53 | class: Wallabag\CoreBundle\Helper\ContentProxy | 49 | class: Wallabag\CoreBundle\Helper\ContentProxy |
54 | arguments: | 50 | arguments: |
55 | - @wallabag_core.graby | 51 | - "@wallabag_core.graby" |
56 | - @wallabag_core.rule_based_tagger | 52 | - "@wallabag_core.rule_based_tagger" |
57 | - @logger | 53 | - "@logger" |
58 | 54 | ||
59 | wallabag_core.rule_based_tagger: | 55 | wallabag_core.rule_based_tagger: |
60 | class: Wallabag\CoreBundle\Helper\RuleBasedTagger | 56 | class: Wallabag\CoreBundle\Helper\RuleBasedTagger |
61 | arguments: | 57 | arguments: |
62 | - @rulerz | 58 | - "@rulerz" |
63 | - @wallabag_core.tag_repository | 59 | - "@wallabag_core.tag_repository" |
64 | - @wallabag_core.entry_repository | 60 | - "@wallabag_core.entry_repository" |
65 | 61 | ||
66 | # repository as a service | 62 | # repository as a service |
67 | wallabag_core.entry_repository: | 63 | wallabag_core.entry_repository: |
68 | class: Wallabag\CoreBundle\Repository\EntryRepository | 64 | class: Wallabag\CoreBundle\Repository\EntryRepository |
69 | factory: [ @doctrine.orm.default_entity_manager, getRepository ] | 65 | factory: [ "@doctrine.orm.default_entity_manager", getRepository ] |
70 | arguments: | 66 | arguments: |
71 | - WallabagCoreBundle:Entry | 67 | - WallabagCoreBundle:Entry |
72 | 68 | ||
73 | wallabag_core.tag_repository: | 69 | wallabag_core.tag_repository: |
74 | class: Wallabag\CoreBundle\Repository\TagRepository | 70 | class: Wallabag\CoreBundle\Repository\TagRepository |
75 | factory: [ @doctrine.orm.default_entity_manager, getRepository ] | 71 | factory: [ "@doctrine.orm.default_entity_manager", getRepository ] |
76 | arguments: | 72 | arguments: |
77 | - WallabagCoreBundle:Tag | 73 | - WallabagCoreBundle:Tag |
78 | 74 | ||
79 | wallabag_core.registration_confirmed: | 75 | wallabag_core.registration_confirmed: |
80 | class: Wallabag\CoreBundle\EventListener\RegistrationConfirmedListener | 76 | class: Wallabag\CoreBundle\EventListener\RegistrationConfirmedListener |
81 | arguments: | 77 | arguments: |
82 | - @doctrine.orm.entity_manager | 78 | - "@doctrine.orm.entity_manager" |
83 | - %theme% | 79 | - %theme% |
84 | - %items_on_page% | 80 | - %items_on_page% |
85 | - %rss_limit% | 81 | - %rss_limit% |
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig index d9850f7a..6ac6decb 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig | |||
@@ -164,7 +164,7 @@ | |||
164 | {% endfor %} | 164 | {% endfor %} |
165 | </ul> | 165 | </ul> |
166 | 166 | ||
167 | <form action="{{ path('config') }}" method="post" {{ form_enctype(form.new_tagging_rule) }}> | 167 | {{ form_start(form.new_tagging_rule) }} |
168 | {{ form_errors(form.new_tagging_rule) }} | 168 | {{ form_errors(form.new_tagging_rule) }} |
169 | 169 | ||
170 | <fieldset class="w500p inline"> | 170 | <fieldset class="w500p inline"> |
diff --git a/src/Wallabag/CoreBundle/Subscriber/TablePrefixSubscriber.php b/src/Wallabag/CoreBundle/Subscriber/TablePrefixSubscriber.php index 0019eead..9a4b16ee 100644 --- a/src/Wallabag/CoreBundle/Subscriber/TablePrefixSubscriber.php +++ b/src/Wallabag/CoreBundle/Subscriber/TablePrefixSubscriber.php | |||
@@ -2,8 +2,8 @@ | |||
2 | 2 | ||
3 | namespace Wallabag\CoreBundle\Subscriber; | 3 | namespace Wallabag\CoreBundle\Subscriber; |
4 | 4 | ||
5 | use Doctrine\ORM\Event\LoadClassMetadataEventArgs; | ||
6 | use Doctrine\Common\EventSubscriber; | 5 | use Doctrine\Common\EventSubscriber; |
6 | use Doctrine\ORM\Event\LoadClassMetadataEventArgs; | ||
7 | use Doctrine\ORM\Mapping\ClassMetadataInfo; | 7 | use Doctrine\ORM\Mapping\ClassMetadataInfo; |
8 | 8 | ||
9 | /** | 9 | /** |
diff --git a/src/Wallabag/CoreBundle/Tests/Command/InstallCommandTest.php b/src/Wallabag/CoreBundle/Tests/Command/InstallCommandTest.php index c9346040..7d75e2b7 100644 --- a/src/Wallabag/CoreBundle/Tests/Command/InstallCommandTest.php +++ b/src/Wallabag/CoreBundle/Tests/Command/InstallCommandTest.php | |||
@@ -2,15 +2,15 @@ | |||
2 | 2 | ||
3 | namespace Wallabag\CoreBundle\Tests\Command; | 3 | namespace Wallabag\CoreBundle\Tests\Command; |
4 | 4 | ||
5 | use Wallabag\CoreBundle\Tests\WallabagCoreTestCase; | 5 | use Doctrine\Bundle\DoctrineBundle\Command\CreateDatabaseDoctrineCommand; |
6 | use Wallabag\CoreBundle\Command\InstallCommand; | 6 | use Doctrine\Bundle\DoctrineBundle\Command\DropDatabaseDoctrineCommand; |
7 | use Wallabag\CoreBundle\Tests\Mock\InstallCommandMock; | ||
8 | use Symfony\Bundle\FrameworkBundle\Console\Application; | 7 | use Symfony\Bundle\FrameworkBundle\Console\Application; |
9 | use Symfony\Component\Console\Tester\CommandTester; | ||
10 | use Symfony\Component\Console\Input\ArrayInput; | 8 | use Symfony\Component\Console\Input\ArrayInput; |
11 | use Symfony\Component\Console\Output\NullOutput; | 9 | use Symfony\Component\Console\Output\NullOutput; |
12 | use Doctrine\Bundle\DoctrineBundle\Command\DropDatabaseDoctrineCommand; | 10 | use Symfony\Component\Console\Tester\CommandTester; |
13 | use Doctrine\Bundle\DoctrineBundle\Command\CreateDatabaseDoctrineCommand; | 11 | use Wallabag\CoreBundle\Command\InstallCommand; |
12 | use Wallabag\CoreBundle\Tests\Mock\InstallCommandMock; | ||
13 | use Wallabag\CoreBundle\Tests\WallabagCoreTestCase; | ||
14 | 14 | ||
15 | class InstallCommandTest extends WallabagCoreTestCase | 15 | class InstallCommandTest extends WallabagCoreTestCase |
16 | { | 16 | { |
diff --git a/src/Wallabag/CoreBundle/Tests/EventListener/LocaleListenerTest.php b/src/Wallabag/CoreBundle/Tests/EventListener/LocaleListenerTest.php index d89bee04..b4c022d5 100644 --- a/src/Wallabag/CoreBundle/Tests/EventListener/LocaleListenerTest.php +++ b/src/Wallabag/CoreBundle/Tests/EventListener/LocaleListenerTest.php | |||
@@ -4,11 +4,11 @@ namespace Wallabag\CoreBundle\Tests\EventListener; | |||
4 | 4 | ||
5 | use Symfony\Component\EventDispatcher\EventDispatcher; | 5 | use Symfony\Component\EventDispatcher\EventDispatcher; |
6 | use Symfony\Component\HttpFoundation\Request; | 6 | use Symfony\Component\HttpFoundation\Request; |
7 | use Symfony\Component\HttpKernel\KernelEvents; | 7 | use Symfony\Component\HttpFoundation\Session\Session; |
8 | use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage; | ||
8 | use Symfony\Component\HttpKernel\Event\GetResponseEvent; | 9 | use Symfony\Component\HttpKernel\Event\GetResponseEvent; |
9 | use Symfony\Component\HttpKernel\HttpKernelInterface; | 10 | use Symfony\Component\HttpKernel\HttpKernelInterface; |
10 | use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage; | 11 | use Symfony\Component\HttpKernel\KernelEvents; |
11 | use Symfony\Component\HttpFoundation\Session\Session; | ||
12 | use Wallabag\CoreBundle\EventListener\LocaleListener; | 12 | use Wallabag\CoreBundle\EventListener\LocaleListener; |
13 | 13 | ||
14 | class LocaleListenerTest extends \PHPUnit_Framework_TestCase | 14 | class LocaleListenerTest extends \PHPUnit_Framework_TestCase |
diff --git a/src/Wallabag/CoreBundle/Tests/EventListener/RegistrationConfirmedListenerTest.php b/src/Wallabag/CoreBundle/Tests/EventListener/RegistrationConfirmedListenerTest.php index 31283399..7039dc61 100644 --- a/src/Wallabag/CoreBundle/Tests/EventListener/RegistrationConfirmedListenerTest.php +++ b/src/Wallabag/CoreBundle/Tests/EventListener/RegistrationConfirmedListenerTest.php | |||
@@ -2,13 +2,13 @@ | |||
2 | 2 | ||
3 | namespace Wallabag\CoreBundle\Tests\EventListener; | 3 | namespace Wallabag\CoreBundle\Tests\EventListener; |
4 | 4 | ||
5 | use FOS\UserBundle\Event\FilterUserResponseEvent; | ||
6 | use FOS\UserBundle\FOSUserEvents; | ||
5 | use Symfony\Component\EventDispatcher\EventDispatcher; | 7 | use Symfony\Component\EventDispatcher\EventDispatcher; |
6 | use Symfony\Component\HttpFoundation\Request; | 8 | use Symfony\Component\HttpFoundation\Request; |
7 | use Symfony\Component\HttpFoundation\Response; | 9 | use Symfony\Component\HttpFoundation\Response; |
8 | use FOS\UserBundle\FOSUserEvents; | ||
9 | use FOS\UserBundle\Event\FilterUserResponseEvent; | ||
10 | use Wallabag\CoreBundle\EventListener\RegistrationConfirmedListener; | ||
11 | use Wallabag\CoreBundle\Entity\Config; | 10 | use Wallabag\CoreBundle\Entity\Config; |
11 | use Wallabag\CoreBundle\EventListener\RegistrationConfirmedListener; | ||
12 | use Wallabag\UserBundle\Entity\User; | 12 | use Wallabag\UserBundle\Entity\User; |
13 | 13 | ||
14 | class RegistrationConfirmedListenerTest extends \PHPUnit_Framework_TestCase | 14 | class RegistrationConfirmedListenerTest extends \PHPUnit_Framework_TestCase |
diff --git a/src/Wallabag/CoreBundle/Tests/EventListener/UserLocaleListenerTest.php b/src/Wallabag/CoreBundle/Tests/EventListener/UserLocaleListenerTest.php index 80ddb457..d9ffe30e 100644 --- a/src/Wallabag/CoreBundle/Tests/EventListener/UserLocaleListenerTest.php +++ b/src/Wallabag/CoreBundle/Tests/EventListener/UserLocaleListenerTest.php | |||
@@ -3,12 +3,12 @@ | |||
3 | namespace Wallabag\CoreBundle\Tests\EventListener; | 3 | namespace Wallabag\CoreBundle\Tests\EventListener; |
4 | 4 | ||
5 | use Symfony\Component\HttpFoundation\Request; | 5 | use Symfony\Component\HttpFoundation\Request; |
6 | use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage; | ||
7 | use Symfony\Component\HttpFoundation\Session\Session; | 6 | use Symfony\Component\HttpFoundation\Session\Session; |
8 | use Symfony\Component\Security\Http\Event\InteractiveLoginEvent; | 7 | use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage; |
9 | use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken; | 8 | use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken; |
10 | use Wallabag\CoreBundle\EventListener\UserLocaleListener; | 9 | use Symfony\Component\Security\Http\Event\InteractiveLoginEvent; |
11 | use Wallabag\CoreBundle\Entity\Config; | 10 | use Wallabag\CoreBundle\Entity\Config; |
11 | use Wallabag\CoreBundle\EventListener\UserLocaleListener; | ||
12 | use Wallabag\UserBundle\Entity\User; | 12 | use Wallabag\UserBundle\Entity\User; |
13 | 13 | ||
14 | class UserLocaleListenerTest extends \PHPUnit_Framework_TestCase | 14 | class UserLocaleListenerTest extends \PHPUnit_Framework_TestCase |
diff --git a/src/Wallabag/CoreBundle/Tests/Helper/ContentProxyTest.php b/src/Wallabag/CoreBundle/Tests/Helper/ContentProxyTest.php index ac518dbb..d29984e9 100644 --- a/src/Wallabag/CoreBundle/Tests/Helper/ContentProxyTest.php +++ b/src/Wallabag/CoreBundle/Tests/Helper/ContentProxyTest.php | |||
@@ -4,8 +4,8 @@ namespace Wallabag\CoreBundle\Tests\Helper; | |||
4 | 4 | ||
5 | use Psr\Log\NullLogger; | 5 | use Psr\Log\NullLogger; |
6 | use Wallabag\CoreBundle\Entity\Entry; | 6 | use Wallabag\CoreBundle\Entity\Entry; |
7 | use Wallabag\UserBundle\Entity\User; | ||
8 | use Wallabag\CoreBundle\Helper\ContentProxy; | 7 | use Wallabag\CoreBundle\Helper\ContentProxy; |
8 | use Wallabag\UserBundle\Entity\User; | ||
9 | 9 | ||
10 | class ContentProxyTest extends \PHPUnit_Framework_TestCase | 10 | class ContentProxyTest extends \PHPUnit_Framework_TestCase |
11 | { | 11 | { |
diff --git a/src/Wallabag/CoreBundle/Tests/Helper/RuleBasedTaggerTest.php b/src/Wallabag/CoreBundle/Tests/Helper/RuleBasedTaggerTest.php index dee17d65..c43c62c3 100644 --- a/src/Wallabag/CoreBundle/Tests/Helper/RuleBasedTaggerTest.php +++ b/src/Wallabag/CoreBundle/Tests/Helper/RuleBasedTaggerTest.php | |||
@@ -6,8 +6,8 @@ use Wallabag\CoreBundle\Entity\Config; | |||
6 | use Wallabag\CoreBundle\Entity\Entry; | 6 | use Wallabag\CoreBundle\Entity\Entry; |
7 | use Wallabag\CoreBundle\Entity\Tag; | 7 | use Wallabag\CoreBundle\Entity\Tag; |
8 | use Wallabag\CoreBundle\Entity\TaggingRule; | 8 | use Wallabag\CoreBundle\Entity\TaggingRule; |
9 | use Wallabag\UserBundle\Entity\User; | ||
10 | use Wallabag\CoreBundle\Helper\RuleBasedTagger; | 9 | use Wallabag\CoreBundle\Helper\RuleBasedTagger; |
10 | use Wallabag\UserBundle\Entity\User; | ||
11 | 11 | ||
12 | class RuleBasedTaggerTest extends \PHPUnit_Framework_TestCase | 12 | class RuleBasedTaggerTest extends \PHPUnit_Framework_TestCase |
13 | { | 13 | { |
diff --git a/src/Wallabag/CoreBundle/Tests/ParamConverter/UsernameRssTokenConverterTest.php b/src/Wallabag/CoreBundle/Tests/ParamConverter/UsernameRssTokenConverterTest.php index 1c9a4ad7..b95be133 100644 --- a/src/Wallabag/CoreBundle/Tests/ParamConverter/UsernameRssTokenConverterTest.php +++ b/src/Wallabag/CoreBundle/Tests/ParamConverter/UsernameRssTokenConverterTest.php | |||
@@ -2,9 +2,9 @@ | |||
2 | 2 | ||
3 | namespace Wallabag\CoreBundle\Tests\Command; | 3 | namespace Wallabag\CoreBundle\Tests\Command; |
4 | 4 | ||
5 | use Wallabag\CoreBundle\ParamConverter\UsernameRssTokenConverter; | ||
6 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; | 5 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; |
7 | use Symfony\Component\HttpFoundation\Request; | 6 | use Symfony\Component\HttpFoundation\Request; |
7 | use Wallabag\CoreBundle\ParamConverter\UsernameRssTokenConverter; | ||
8 | use Wallabag\UserBundle\Entity\User; | 8 | use Wallabag\UserBundle\Entity\User; |
9 | 9 | ||
10 | class UsernameRssTokenConverterTest extends \PHPUnit_Framework_TestCase | 10 | class UsernameRssTokenConverterTest extends \PHPUnit_Framework_TestCase |
diff --git a/src/Wallabag/CoreBundle/Tests/Subscriber/TablePrefixSubscriberTest.php b/src/Wallabag/CoreBundle/Tests/Subscriber/TablePrefixSubscriberTest.php index a26ff436..49dbb316 100644 --- a/src/Wallabag/CoreBundle/Tests/Subscriber/TablePrefixSubscriberTest.php +++ b/src/Wallabag/CoreBundle/Tests/Subscriber/TablePrefixSubscriberTest.php | |||
@@ -2,9 +2,9 @@ | |||
2 | 2 | ||
3 | namespace Wallabag\CoreBundle\Tests\Subscriber; | 3 | namespace Wallabag\CoreBundle\Tests\Subscriber; |
4 | 4 | ||
5 | use Doctrine\ORM\Mapping\ClassMetadata; | ||
6 | use Doctrine\ORM\Event\LoadClassMetadataEventArgs; | ||
7 | use Doctrine\Common\EventManager; | 5 | use Doctrine\Common\EventManager; |
6 | use Doctrine\ORM\Event\LoadClassMetadataEventArgs; | ||
7 | use Doctrine\ORM\Mapping\ClassMetadata; | ||
8 | use Wallabag\CoreBundle\Subscriber\TablePrefixSubscriber; | 8 | use Wallabag\CoreBundle\Subscriber\TablePrefixSubscriber; |
9 | 9 | ||
10 | class TablePrefixSubscriberTest extends \PHPUnit_Framework_TestCase | 10 | class TablePrefixSubscriberTest extends \PHPUnit_Framework_TestCase |
diff --git a/src/Wallabag/ImportBundle/Controller/PocketController.php b/src/Wallabag/ImportBundle/Controller/PocketController.php index a0853383..7aee302f 100644 --- a/src/Wallabag/ImportBundle/Controller/PocketController.php +++ b/src/Wallabag/ImportBundle/Controller/PocketController.php | |||
@@ -3,6 +3,7 @@ | |||
3 | namespace Wallabag\ImportBundle\Controller; | 3 | namespace Wallabag\ImportBundle\Controller; |
4 | 4 | ||
5 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; | 5 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; |
6 | use Symfony\Component\Routing\Generator\UrlGeneratorInterface; | ||
6 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; | 7 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; |
7 | 8 | ||
8 | class PocketController extends Controller | 9 | class PocketController extends Controller |
@@ -23,12 +24,12 @@ class PocketController extends Controller | |||
23 | public function authAction() | 24 | public function authAction() |
24 | { | 25 | { |
25 | $requestToken = $this->get('wallabag_import.pocket.import') | 26 | $requestToken = $this->get('wallabag_import.pocket.import') |
26 | ->getRequestToken($this->generateUrl('import', [], true)); | 27 | ->getRequestToken($this->generateUrl('import', array(), UrlGeneratorInterface::ABSOLUTE_URL)); |
27 | 28 | ||
28 | $this->get('session')->set('import.pocket.code', $requestToken); | 29 | $this->get('session')->set('import.pocket.code', $requestToken); |
29 | 30 | ||
30 | return $this->redirect( | 31 | return $this->redirect( |
31 | 'https://getpocket.com/auth/authorize?request_token='.$requestToken.'&redirect_uri='.$this->generateUrl('import_pocket_callback', [], true), | 32 | 'https://getpocket.com/auth/authorize?request_token='.$requestToken.'&redirect_uri='.$this->generateUrl('import_pocket_callback', array(), UrlGeneratorInterface::ABSOLUTE_URL), |
32 | 301 | 33 | 301 |
33 | ); | 34 | ); |
34 | } | 35 | } |
diff --git a/src/Wallabag/ImportBundle/Controller/WallabagV1Controller.php b/src/Wallabag/ImportBundle/Controller/WallabagV1Controller.php index e50a6c35..35fe620f 100644 --- a/src/Wallabag/ImportBundle/Controller/WallabagV1Controller.php +++ b/src/Wallabag/ImportBundle/Controller/WallabagV1Controller.php | |||
@@ -14,7 +14,7 @@ class WallabagV1Controller extends Controller | |||
14 | */ | 14 | */ |
15 | public function indexAction(Request $request) | 15 | public function indexAction(Request $request) |
16 | { | 16 | { |
17 | $form = $this->createForm(new UploadImportType()); | 17 | $form = $this->createForm(UploadImportType::class); |
18 | $form->handleRequest($request); | 18 | $form->handleRequest($request); |
19 | 19 | ||
20 | $wallabag = $this->get('wallabag_import.wallabag_v1.import'); | 20 | $wallabag = $this->get('wallabag_import.wallabag_v1.import'); |
diff --git a/src/Wallabag/ImportBundle/Form/Type/UploadImportType.php b/src/Wallabag/ImportBundle/Form/Type/UploadImportType.php index 415890f3..2e6b59cb 100644 --- a/src/Wallabag/ImportBundle/Form/Type/UploadImportType.php +++ b/src/Wallabag/ImportBundle/Form/Type/UploadImportType.php | |||
@@ -4,18 +4,20 @@ namespace Wallabag\ImportBundle\Form\Type; | |||
4 | 4 | ||
5 | use Symfony\Component\Form\AbstractType; | 5 | use Symfony\Component\Form\AbstractType; |
6 | use Symfony\Component\Form\FormBuilderInterface; | 6 | use Symfony\Component\Form\FormBuilderInterface; |
7 | use Symfony\Component\Form\Extension\Core\Type\SubmitType; | ||
8 | use Symfony\Component\Form\Extension\Core\Type\FileType; | ||
7 | 9 | ||
8 | class UploadImportType extends AbstractType | 10 | class UploadImportType extends AbstractType |
9 | { | 11 | { |
10 | public function buildForm(FormBuilderInterface $builder, array $options) | 12 | public function buildForm(FormBuilderInterface $builder, array $options) |
11 | { | 13 | { |
12 | $builder | 14 | $builder |
13 | ->add('file', 'file') | 15 | ->add('file', FileType::class) |
14 | ->add('save', 'submit') | 16 | ->add('save', SubmitType::class) |
15 | ; | 17 | ; |
16 | } | 18 | } |
17 | 19 | ||
18 | public function getName() | 20 | public function getBlockPrefix() |
19 | { | 21 | { |
20 | return 'upload_import_file'; | 22 | return 'upload_import_file'; |
21 | } | 23 | } |
diff --git a/src/Wallabag/UserBundle/Controller/ResettingController.php b/src/Wallabag/UserBundle/Controller/ResettingController.php index 8aa1e230..62e27d00 100644 --- a/src/Wallabag/UserBundle/Controller/ResettingController.php +++ b/src/Wallabag/UserBundle/Controller/ResettingController.php | |||
@@ -2,12 +2,12 @@ | |||
2 | 2 | ||
3 | namespace Wallabag\UserBundle\Controller; | 3 | namespace Wallabag\UserBundle\Controller; |
4 | 4 | ||
5 | use FOS\UserBundle\FOSUserEvents; | 5 | use FOS\UserBundle\Event\FilterUserResponseEvent; |
6 | use FOS\UserBundle\Event\FormEvent; | 6 | use FOS\UserBundle\Event\FormEvent; |
7 | use FOS\UserBundle\Event\GetResponseUserEvent; | 7 | use FOS\UserBundle\Event\GetResponseUserEvent; |
8 | use FOS\UserBundle\Event\FilterUserResponseEvent; | 8 | use FOS\UserBundle\FOSUserEvents; |
9 | use Symfony\Component\HttpFoundation\Request; | ||
10 | use Symfony\Component\HttpFoundation\RedirectResponse; | 9 | use Symfony\Component\HttpFoundation\RedirectResponse; |
10 | use Symfony\Component\HttpFoundation\Request; | ||
11 | use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; | 11 | use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; |
12 | 12 | ||
13 | class ResettingController extends \FOS\UserBundle\Controller\ResettingController | 13 | class ResettingController extends \FOS\UserBundle\Controller\ResettingController |
diff --git a/src/Wallabag/UserBundle/Entity/User.php b/src/Wallabag/UserBundle/Entity/User.php index e6528420..4bbb68dc 100644 --- a/src/Wallabag/UserBundle/Entity/User.php +++ b/src/Wallabag/UserBundle/Entity/User.php | |||
@@ -6,11 +6,11 @@ use Doctrine\Common\Collections\ArrayCollection; | |||
6 | use Doctrine\ORM\Mapping as ORM; | 6 | use Doctrine\ORM\Mapping as ORM; |
7 | use Scheb\TwoFactorBundle\Model\Email\TwoFactorInterface; | 7 | use Scheb\TwoFactorBundle\Model\Email\TwoFactorInterface; |
8 | use Scheb\TwoFactorBundle\Model\TrustedComputerInterface; | 8 | use Scheb\TwoFactorBundle\Model\TrustedComputerInterface; |
9 | use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity; | 9 | use FOS\UserBundle\Model\User as BaseUser; |
10 | use Symfony\Component\Security\Core\User\UserInterface; | ||
11 | use JMS\Serializer\Annotation\ExclusionPolicy; | 10 | use JMS\Serializer\Annotation\ExclusionPolicy; |
12 | use JMS\Serializer\Annotation\Expose; | 11 | use JMS\Serializer\Annotation\Expose; |
13 | use FOS\UserBundle\Model\User as BaseUser; | 12 | use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity; |
13 | use Symfony\Component\Security\Core\User\UserInterface; | ||
14 | use Wallabag\CoreBundle\Entity\Config; | 14 | use Wallabag\CoreBundle\Entity\Config; |
15 | use Wallabag\CoreBundle\Entity\Entry; | 15 | use Wallabag\CoreBundle\Entity\Entry; |
16 | 16 | ||
diff --git a/src/Wallabag/UserBundle/Resources/views/themes/baggy/Registration/register.html.twig b/src/Wallabag/UserBundle/Resources/views/themes/baggy/Registration/register.html.twig index e5c1876b..2713bf45 100644 --- a/src/Wallabag/UserBundle/Resources/views/themes/baggy/Registration/register.html.twig +++ b/src/Wallabag/UserBundle/Resources/views/themes/baggy/Registration/register.html.twig | |||
@@ -8,7 +8,7 @@ | |||
8 | {% block messages %}{% endblock %} | 8 | {% block messages %}{% endblock %} |
9 | 9 | ||
10 | {% block content %} | 10 | {% block content %} |
11 | <form action="{{ path('fos_user_registration_register') }}" {{ form_enctype(form) }} method="POST" class="fos_user_registration_register"> | 11 | {{ form_start(form) }} |
12 | <fieldset class="w500p center"> | 12 | <fieldset class="w500p center"> |
13 | <h2 class="mbs txtcenter">{% trans %}create an account{% endtrans %}</h2> | 13 | <h2 class="mbs txtcenter">{% trans %}create an account{% endtrans %}</h2> |
14 | {% include "FOSUserBundle:Registration:register_content.html.twig" %} | 14 | {% include "FOSUserBundle:Registration:register_content.html.twig" %} |
diff --git a/src/Wallabag/UserBundle/Resources/views/themes/material/ChangePassword/changePassword_content.html.twig b/src/Wallabag/UserBundle/Resources/views/themes/material/ChangePassword/changePassword_content.html.twig index e7b7318b..abb68421 100644 --- a/src/Wallabag/UserBundle/Resources/views/themes/material/ChangePassword/changePassword_content.html.twig +++ b/src/Wallabag/UserBundle/Resources/views/themes/material/ChangePassword/changePassword_content.html.twig | |||
@@ -1,6 +1,6 @@ | |||
1 | {% trans_default_domain 'FOSUserBundle' %} | 1 | {% trans_default_domain 'FOSUserBundle' %} |
2 | 2 | ||
3 | <form action="{{ path('fos_user_change_password') }}" {{ form_enctype(form) }} method="POST" class="fos_user_change_password"> | 3 | {{ form_start(form, { 'action': path('fos_user_change_password'), 'attr': { 'class': 'fos_user_change_password' } }) }} |
4 | <div class="card-content"> | 4 | <div class="card-content"> |
5 | <div class="row"> | 5 | <div class="row"> |
6 | {{ form_widget(form) }} | 6 | {{ form_widget(form) }} |
diff --git a/src/Wallabag/UserBundle/Resources/views/themes/material/Registration/register_content.html.twig b/src/Wallabag/UserBundle/Resources/views/themes/material/Registration/register_content.html.twig index 865a24ae..e92b515e 100644 --- a/src/Wallabag/UserBundle/Resources/views/themes/material/Registration/register_content.html.twig +++ b/src/Wallabag/UserBundle/Resources/views/themes/material/Registration/register_content.html.twig | |||
@@ -1,6 +1,6 @@ | |||
1 | {% trans_default_domain 'FOSUserBundle' %} | 1 | {% trans_default_domain 'FOSUserBundle' %} |
2 | 2 | ||
3 | <form action="{{ path('fos_user_registration_register') }}" {{ form_enctype(form) }} method="POST" class="fos_user_registration_register"> | 3 | {{ form_start(form, {'method': 'post', 'action': path('fos_user_registration_register'), 'attr': {'class': 'fos_user_registration_register'}}) }} |
4 | <div class="card-content"> | 4 | <div class="card-content"> |
5 | <div class="row"> | 5 | <div class="row"> |
6 | 6 | ||
diff --git a/src/Wallabag/UserBundle/Resources/views/themes/material/Resetting/passwordAlreadyRequested.html.twig b/src/Wallabag/UserBundle/Resources/views/themes/material/Resetting/passwordAlreadyRequested.html.twig index 0eec4301..1e245372 100644 --- a/src/Wallabag/UserBundle/Resources/views/themes/material/Resetting/passwordAlreadyRequested.html.twig +++ b/src/Wallabag/UserBundle/Resources/views/themes/material/Resetting/passwordAlreadyRequested.html.twig | |||
@@ -5,7 +5,7 @@ | |||
5 | {% block fos_user_content %} | 5 | {% block fos_user_content %} |
6 | <div class="card-content"> | 6 | <div class="card-content"> |
7 | <div class="row"> | 7 | <div class="row"> |
8 | {{ 'resetting.password_already_requested'|trans }} | 8 | {{ 'resetting.password_already_requested'|trans }} |
9 | </div> | 9 | </div> |
10 | </div> | 10 | </div> |
11 | {% endblock fos_user_content %} | 11 | {% endblock fos_user_content %} |
diff --git a/src/Wallabag/UserBundle/Resources/views/themes/material/Resetting/reset_content.html.twig b/src/Wallabag/UserBundle/Resources/views/themes/material/Resetting/reset_content.html.twig index f7e061dd..9d0a061c 100644 --- a/src/Wallabag/UserBundle/Resources/views/themes/material/Resetting/reset_content.html.twig +++ b/src/Wallabag/UserBundle/Resources/views/themes/material/Resetting/reset_content.html.twig | |||
@@ -1,6 +1,6 @@ | |||
1 | {% trans_default_domain 'FOSUserBundle' %} | 1 | {% trans_default_domain 'FOSUserBundle' %} |
2 | 2 | ||
3 | <form action="{{ path('fos_user_resetting_reset', {'token': token}) }}" {{ form_enctype(form) }} method="POST" class="fos_user_resetting_reset"> | 3 | {{ form_start(form, { 'action': path('fos_user_resetting_reset', {'token': token}), 'attr': { 'class': 'fos_user_resetting_reset' } }) }} |
4 | <div class="card-content"> | 4 | <div class="card-content"> |
5 | <div class="row"> | 5 | <div class="row"> |
6 | {{ form_widget(form) }} | 6 | {{ form_widget(form) }} |