]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Update to Symfony 2.7 1206/head
authorJeremy Benoist <jeremy.benoist@gmail.com>
Tue, 2 Jun 2015 14:58:19 +0000 (16:58 +0200)
committerJeremy Benoist <jeremy.benoist@gmail.com>
Tue, 2 Jun 2015 14:58:19 +0000 (16:58 +0200)
And fix some deps instead of using dev tags

composer.json
composer.lock
src/Wallabag/CoreBundle/Form/Type/ConfigType.php
src/Wallabag/CoreBundle/Form/Type/EntryType.php
src/Wallabag/CoreBundle/Form/Type/NewUserType.php
src/Wallabag/CoreBundle/Form/Type/RssType.php
src/Wallabag/CoreBundle/Form/Type/UserInformationType.php
src/Wallabag/CoreBundle/Security/Validator/WallabagUserPasswordValidator.php
src/Wallabag/CoreBundle/Tests/Controller/ConfigControllerTest.php

index 590e262938a28dd865ee9343be0ad30f4df4c5bd..5fe6eb022423b6d1235889e79296ff2eabdd0a81 100644 (file)
@@ -54,7 +54,7 @@
     ],
     "require": {
         "php": ">=5.3.3",
-        "symfony/symfony": "2.6.*",
+        "symfony/symfony": "~2.7.0",
         "doctrine/orm": "~2.2,>=2.2.3",
         "doctrine/doctrine-bundle": "~1.2",
         "twig/extensions": "~1.0",
         "sensio/distribution-bundle": "~3.0.12",
         "sensio/framework-extra-bundle": "~3.0",
         "incenteev/composer-parameter-handler": "~2.0",
-        "nelmio/cors-bundle": "1.3.*@dev",
-        "umpirsky/twig-gettext-extractor": "1.1.*",
+        "nelmio/cors-bundle": "~1.4.0",
+        "umpirsky/twig-gettext-extractor": "~1.1.5",
         "friendsofsymfony/rest-bundle": "~1.4",
         "jms/serializer-bundle": "~0.13",
         "nelmio/api-doc-bundle": "~2.7",
         "ezyang/htmlpurifier": "~4.6",
         "mgargano/simplehtmldom": "~1.5",
-        "robmorgan/phinx": "~0.4",
         "tecnick.com/tcpdf": "~6.2",
         "simplepie/simplepie": "~1.3.1",
-        "willdurand/hateoas-bundle": "1.0.*@dev",
-        "htmlawed/htmlawed": "dev-master",
-        "liip/theme-bundle": "1.1.3",
+        "willdurand/hateoas-bundle": "~0.5.0",
+        "htmlawed/htmlawed": "~1.1.19",
+        "liip/theme-bundle": "~1.1.3",
         "wallabag/PHP-Flash-Messages": "dev-master",
         "wallabag/kriss_php5": "dev-master",
         "wallabag/pagination": "dev-master",
         "wallabag/php-readability": "dev-master",
         "wallabag/phpMobi": "dev-master",
         "wallabag/Fivefilters_Libraries": "dev-master",
-        "pagerfanta/pagerfanta": "~1.0@dev"
+        "pagerfanta/pagerfanta": "~1.0.3"
     },
     "require-dev": {
-        "doctrine/doctrine-fixtures-bundle": "dev-master",
+        "doctrine/doctrine-fixtures-bundle": "~2.2.0",
         "sensio/generator-bundle": "~2.5",
         "phpunit/phpunit": "~4.4"
     },
index d32f0980215f617394380fa64a7cb82e42e5a49a..a5620bb1ea6f994cc1c44fddecdb38064643ffcd 100644 (file)
@@ -4,7 +4,7 @@
         "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
         "This file is @generated automatically"
     ],
-    "hash": "43d869c37ae73d7b74d3f77c4028bf9c",
+    "hash": "d7869b0dce6699d8f4916e675a4209a8",
     "packages": [
         {
             "name": "doctrine/annotations",
         },
         {
             "name": "htmlawed/htmlawed",
-            "version": "dev-master",
+            "version": "1.1.19",
             "source": {
                 "type": "git",
                 "url": "https://github.com/kesar/HTMLawed.git",
-                "reference": "f842e793614bdf3af70a62b1e70570e824dc9ab6"
+                "reference": "620c38edd57e680260ebd8dd0e98167d97e9a7bf"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/kesar/HTMLawed/zipball/f842e793614bdf3af70a62b1e70570e824dc9ab6",
-                "reference": "f842e793614bdf3af70a62b1e70570e824dc9ab6",
+                "url": "https://api.github.com/repos/kesar/HTMLawed/zipball/620c38edd57e680260ebd8dd0e98167d97e9a7bf",
+                "reference": "620c38edd57e680260ebd8dd0e98167d97e9a7bf",
                 "shasum": ""
             },
             "require": {
                     "role": "Developer"
                 }
             ],
-            "description": "htmLawed - Process text with HTML markup to make it more compliant with HTML standards and administrative policies",
+            "description": "htmLawed - Process text with HTML markup to make it more compliant with HTML  standards and administrative policies",
             "homepage": "http://www.bioinformatics.org/phplabware/internal_utilities/htmLawed/",
             "keywords": [
                 "HTMLtidy",
                 "strip",
                 "tags"
             ],
-            "time": "2015-04-12 19:37:20"
+            "time": "2015-04-05 17:23:05"
         },
         {
             "name": "incenteev/composer-parameter-handler",
         },
         {
             "name": "nelmio/cors-bundle",
-            "version": "1.3.3",
+            "version": "1.4.0",
             "target-dir": "Nelmio/CorsBundle",
             "source": {
                 "type": "git",
                 "url": "https://github.com/nelmio/NelmioCorsBundle.git",
-                "reference": "d482c01f6ca0840025b81b65534d0ffb7c18f425"
+                "reference": "553b4c5cdb3ff155f910e8f6e3e0806d42c763a6"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/nelmio/NelmioCorsBundle/zipball/d482c01f6ca0840025b81b65534d0ffb7c18f425",
-                "reference": "d482c01f6ca0840025b81b65534d0ffb7c18f425",
+                "url": "https://api.github.com/repos/nelmio/NelmioCorsBundle/zipball/553b4c5cdb3ff155f910e8f6e3e0806d42c763a6",
+                "reference": "553b4c5cdb3ff155f910e8f6e3e0806d42c763a6",
                 "shasum": ""
             },
             "require": {
                 "cors",
                 "crossdomain"
             ],
-            "time": "2014-12-10 17:26:49"
+            "time": "2015-01-13 17:53:27"
         },
         {
             "name": "pagerfanta/pagerfanta",
             ],
             "time": "2012-12-21 11:40:51"
         },
-        {
-            "name": "robmorgan/phinx",
-            "version": "v0.4.3",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/robmorgan/phinx.git",
-                "reference": "0d1f9cb9939f65f506a8a3f5fee356764c310fd4"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/robmorgan/phinx/zipball/0d1f9cb9939f65f506a8a3f5fee356764c310fd4",
-                "reference": "0d1f9cb9939f65f506a8a3f5fee356764c310fd4",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=5.3.2",
-                "symfony/config": "~2.6.0",
-                "symfony/console": "~2.6.0",
-                "symfony/yaml": "~2.6.0"
-            },
-            "require-dev": {
-                "phpunit/phpunit": "3.7.*",
-                "squizlabs/php_codesniffer": "dev-phpcs-fixer"
-            },
-            "bin": [
-                "bin/phinx"
-            ],
-            "type": "library",
-            "autoload": {
-                "psr-4": {
-                    "Phinx\\": "src/Phinx"
-                }
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "MIT"
-            ],
-            "authors": [
-                {
-                    "name": "Rob Morgan",
-                    "email": "robbym@gmail.com",
-                    "homepage": "http://robmorgan.id.au",
-                    "role": "Lead Developer"
-                },
-                {
-                    "name": "Woody Gilk",
-                    "email": "woody.gilk@gmail.com",
-                    "homepage": "http://shadowhand.me",
-                    "role": "Developer"
-                }
-            ],
-            "description": "Phinx makes it ridiculously easy to manage the database migrations for your PHP app.",
-            "homepage": "https://phinx.org",
-            "keywords": [
-                "database",
-                "database migrations",
-                "db",
-                "migrations",
-                "phinx"
-            ],
-            "time": "2015-02-23 16:38:12"
-        },
         {
             "name": "sensio/distribution-bundle",
             "version": "v3.0.28",
         },
         {
             "name": "symfony/symfony",
-            "version": "v2.6.9",
+            "version": "v2.7.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/symfony.git",
-                "reference": "b06539573ccf64dd3a62852685f052553d02c5ba"
+                "reference": "9975b1eca3de4db792a2c3e4e16f676a4aadcd46"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/symfony/zipball/b06539573ccf64dd3a62852685f052553d02c5ba",
-                "reference": "b06539573ccf64dd3a62852685f052553d02c5ba",
+                "url": "https://api.github.com/repos/symfony/symfony/zipball/9975b1eca3de4db792a2c3e4e16f676a4aadcd46",
+                "reference": "9975b1eca3de4db792a2c3e4e16f676a4aadcd46",
                 "shasum": ""
             },
             "require": {
                 "doctrine/common": "~2.3",
-                "php": ">=5.3.3",
+                "php": ">=5.3.9",
                 "psr/log": "~1.0",
-                "twig/twig": "~1.12,>=1.12.3"
+                "twig/twig": "~1.18"
             },
             "replace": {
+                "symfony/asset": "self.version",
                 "symfony/browser-kit": "self.version",
                 "symfony/class-loader": "self.version",
                 "symfony/config": "self.version",
                 "symfony/monolog-bridge": "self.version",
                 "symfony/options-resolver": "self.version",
                 "symfony/process": "self.version",
-                "symfony/propel1-bridge": "self.version",
                 "symfony/property-access": "self.version",
                 "symfony/proxy-manager-bridge": "self.version",
                 "symfony/routing": "self.version",
                 "ircmaxell/password-compat": "~1.0",
                 "monolog/monolog": "~1.11",
                 "ocramius/proxy-manager": "~0.4|~1.0",
-                "propel/propel1": "~1.6",
-                "symfony/phpunit-bridge": "~2.7"
+                "symfony/phpunit-bridge": "self.version"
             },
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "2.6-dev"
+                    "dev-master": "2.7-dev"
                 }
             },
             "autoload": {
-                "psr-0": {
-                    "Symfony\\": "src/"
+                "psr-4": {
+                    "Symfony\\Bridge\\Doctrine\\": "src/Symfony/Bridge/Doctrine/",
+                    "Symfony\\Bridge\\Monolog\\": "src/Symfony/Bridge/Monolog/",
+                    "Symfony\\Bridge\\ProxyManager\\": "src/Symfony/Bridge/ProxyManager/",
+                    "Symfony\\Bridge\\Swiftmailer\\": "src/Symfony/Bridge/Swiftmailer/",
+                    "Symfony\\Bridge\\Twig\\": "src/Symfony/Bridge/Twig/",
+                    "Symfony\\Bundle\\": "src/Symfony/Bundle/",
+                    "Symfony\\Component\\": "src/Symfony/Component/"
                 },
                 "classmap": [
                     "src/Symfony/Component/HttpFoundation/Resources/stubs",
             "keywords": [
                 "framework"
             ],
-            "time": "2015-05-29 22:55:07"
+            "time": "2015-05-30 16:52:28"
         },
         {
             "name": "tecnick.com/tcpdf",
         },
         {
             "name": "willdurand/hateoas-bundle",
-            "version": "dev-master",
+            "version": "0.5.0",
             "target-dir": "Bazinga/Bundle/HateoasBundle",
             "source": {
                 "type": "git",
                 "url": "https://github.com/willdurand/BazingaHateoasBundle.git",
-                "reference": "a99f48ea5004a89ecf0927229d9c912fed9fa4ab"
+                "reference": "3c86e8080e8a229365a0ce91818da6fe6562376b"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/willdurand/BazingaHateoasBundle/zipball/a99f48ea5004a89ecf0927229d9c912fed9fa4ab",
-                "reference": "a99f48ea5004a89ecf0927229d9c912fed9fa4ab",
+                "url": "https://api.github.com/repos/willdurand/BazingaHateoasBundle/zipball/3c86e8080e8a229365a0ce91818da6fe6562376b",
+                "reference": "3c86e8080e8a229365a0ce91818da6fe6562376b",
                 "shasum": ""
             },
             "require": {
                 "HATEOAS",
                 "rest"
             ],
-            "time": "2015-03-12 15:49:24"
+            "time": "2015-02-19 16:27:51"
         },
         {
             "name": "willdurand/jsonp-callback-validator",
         },
         {
             "name": "doctrine/doctrine-fixtures-bundle",
-            "version": "dev-master",
+            "version": "v2.2.0",
             "target-dir": "Doctrine/Bundle/FixturesBundle",
             "source": {
                 "type": "git",
                 "url": "https://github.com/doctrine/DoctrineFixturesBundle.git",
-                "reference": "c5ff0542772102ddd4e2fbe173e9ad40ad67c22f"
+                "reference": "c811f96f0cf83b997e3a3ed037cac729bbe3e803"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/doctrine/DoctrineFixturesBundle/zipball/c5ff0542772102ddd4e2fbe173e9ad40ad67c22f",
-                "reference": "c5ff0542772102ddd4e2fbe173e9ad40ad67c22f",
+                "url": "https://api.github.com/repos/doctrine/DoctrineFixturesBundle/zipball/c811f96f0cf83b997e3a3ed037cac729bbe3e803",
+                "reference": "c811f96f0cf83b997e3a3ed037cac729bbe3e803",
                 "shasum": ""
             },
             "require": {
             "type": "symfony-bundle",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "2.2.x-dev"
+                    "dev-master": "2.1.x-dev"
                 }
             },
             "autoload": {
                 "MIT"
             ],
             "authors": [
+                {
+                    "name": "Fabien Potencier",
+                    "email": "fabien@symfony.com",
+                    "homepage": "http://fabien.potencier.org",
+                    "role": "Lead Developer"
+                },
                 {
                     "name": "Symfony Community",
                     "homepage": "http://symfony.com/contributors"
                 {
                     "name": "Doctrine Project",
                     "homepage": "http://www.doctrine-project.org"
-                },
-                {
-                    "name": "Fabien Potencier",
-                    "email": "fabien@symfony.com"
                 }
             ],
             "description": "Symfony DoctrineFixturesBundle",
                 "Fixture",
                 "persistence"
             ],
-            "time": "2015-01-19 02:21:37"
+            "time": "2013-09-05 11:23:37"
         },
         {
             "name": "phpdocumentor/reflection-docblock",
     "aliases": [],
     "minimum-stability": "dev",
     "stability-flags": {
-        "nelmio/cors-bundle": 20,
-        "willdurand/hateoas-bundle": 20,
-        "htmlawed/htmlawed": 20,
         "wallabag/php-flash-messages": 20,
         "wallabag/kriss_php5": 20,
         "wallabag/pagination": 20,
         "wallabag/phpepub": 20,
         "wallabag/php-readability": 20,
         "wallabag/phpmobi": 20,
-        "wallabag/fivefilters_libraries": 20,
-        "pagerfanta/pagerfanta": 20,
-        "doctrine/doctrine-fixtures-bundle": 20
+        "wallabag/fivefilters_libraries": 20
     },
     "prefer-stable": true,
     "prefer-lowest": false,
index d5890971a976484793c13b033f24307fc1697b6a..49b05b807185f5af25525bddd81476b13bf42e38 100644 (file)
@@ -4,7 +4,7 @@ namespace Wallabag\CoreBundle\Form\Type;
 
 use Symfony\Component\Form\AbstractType;
 use Symfony\Component\Form\FormBuilderInterface;
-use Symfony\Component\OptionsResolver\OptionsResolverInterface;
+use Symfony\Component\OptionsResolver\OptionsResolver;
 
 class ConfigType extends AbstractType
 {
@@ -24,14 +24,17 @@ class ConfigType extends AbstractType
     public function buildForm(FormBuilderInterface $builder, array $options)
     {
         $builder
-            ->add('theme', 'choice', array('choices' => $this->themes))
+            ->add('theme', 'choice', array(
+                'choices' => array_flip($this->themes),
+                'choices_as_values' => true,
+            ))
             ->add('items_per_page')
             ->add('language')
             ->add('save', 'submit')
         ;
     }
 
-    public function setDefaultOptions(OptionsResolverInterface $resolver)
+    public function configureOptions(OptionsResolver $resolver)
     {
         $resolver->setDefaults(array(
             'data_class' => 'Wallabag\CoreBundle\Entity\Config',
index 0532bf104e8523d295a098034a9c18325d53ae20..4abdc10b37e4c00627f12df349a867f974aea569 100644 (file)
@@ -4,7 +4,7 @@ namespace Wallabag\CoreBundle\Form\Type;
 
 use Symfony\Component\Form\AbstractType;
 use Symfony\Component\Form\FormBuilderInterface;
-use Symfony\Component\OptionsResolver\OptionsResolverInterface;
+use Symfony\Component\OptionsResolver\OptionsResolver;
 
 class EntryType extends AbstractType
 {
@@ -16,7 +16,7 @@ class EntryType extends AbstractType
         ;
     }
 
-    public function setDefaultOptions(OptionsResolverInterface $resolver)
+    public function configureOptions(OptionsResolver $resolver)
     {
         $resolver->setDefaults(array(
             'data_class' => 'Wallabag\CoreBundle\Entity\Entry',
index a12fff2b9b850514a6d0296bed79877550a640f1..985cb55b229a4a35dd6b3cfa8739ae8731048487 100644 (file)
@@ -4,7 +4,7 @@ namespace Wallabag\CoreBundle\Form\Type;
 
 use Symfony\Component\Form\AbstractType;
 use Symfony\Component\Form\FormBuilderInterface;
-use Symfony\Component\OptionsResolver\OptionsResolverInterface;
+use Symfony\Component\OptionsResolver\OptionsResolver;
 use Symfony\Component\Validator\Constraints;
 
 class NewUserType extends AbstractType
@@ -27,7 +27,7 @@ class NewUserType extends AbstractType
         ;
     }
 
-    public function setDefaultOptions(OptionsResolverInterface $resolver)
+    public function configureOptions(OptionsResolver $resolver)
     {
         $resolver->setDefaults(array(
             'data_class' => 'Wallabag\CoreBundle\Entity\User',
index e14e84e101d94a423ee424c57772f09d5c1471b3..1f7f4c682b4ec7a447d7dc2093e8f740eceb3cc6 100644 (file)
@@ -4,7 +4,7 @@ namespace Wallabag\CoreBundle\Form\Type;
 
 use Symfony\Component\Form\AbstractType;
 use Symfony\Component\Form\FormBuilderInterface;
-use Symfony\Component\OptionsResolver\OptionsResolverInterface;
+use Symfony\Component\OptionsResolver\OptionsResolver;
 
 class RssType extends AbstractType
 {
@@ -16,7 +16,7 @@ class RssType extends AbstractType
         ;
     }
 
-    public function setDefaultOptions(OptionsResolverInterface $resolver)
+    public function configureOptions(OptionsResolver $resolver)
     {
         $resolver->setDefaults(array(
             'data_class' => 'Wallabag\CoreBundle\Entity\Config',
index f0367d14f339809f781bff5b4255ad123e34187e..1b62805113deaa3fe8a4fc6d0579bf297c9d5303 100644 (file)
@@ -4,7 +4,7 @@ namespace Wallabag\CoreBundle\Form\Type;
 
 use Symfony\Component\Form\AbstractType;
 use Symfony\Component\Form\FormBuilderInterface;
-use Symfony\Component\OptionsResolver\OptionsResolverInterface;
+use Symfony\Component\OptionsResolver\OptionsResolver;
 
 class UserInformationType extends AbstractType
 {
@@ -17,7 +17,7 @@ class UserInformationType extends AbstractType
         ;
     }
 
-    public function setDefaultOptions(OptionsResolverInterface $resolver)
+    public function configureOptions(OptionsResolver $resolver)
     {
         $resolver->setDefaults(array(
             'data_class' => 'Wallabag\CoreBundle\Entity\User',
index 5586f9762da5325235fbe98be1041be7da35c54e..5206277373e6a6659c11d1990e5fcdf739f6a9ff 100644 (file)
@@ -3,7 +3,7 @@
 namespace Wallabag\CoreBundle\Security\Validator;
 
 use Symfony\Component\Security\Core\User\UserInterface;
-use Symfony\Component\Security\Core\SecurityContextInterface;
+use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
 use Symfony\Component\Security\Core\Encoder\EncoderFactoryInterface;
 use Symfony\Component\Validator\Constraint;
 use Symfony\Component\Validator\ConstraintValidator;
@@ -11,14 +11,17 @@ use Symfony\Component\Validator\Exception\ConstraintDefinitionException;
 use Symfony\Component\Validator\Exception\UnexpectedTypeException;
 use Symfony\Component\Security\Core\Validator\Constraints\UserPassword;
 
+/**
+ * @see Symfony\Component\Security\Core\Validator\Constraints\UserPasswordValidator
+ */
 class WallabagUserPasswordValidator extends ConstraintValidator
 {
     private $securityContext;
     private $encoderFactory;
 
-    public function __construct(SecurityContextInterface $securityContext, EncoderFactoryInterface $encoderFactory)
+    public function __construct(TokenStorageInterface $tokenStorage, EncoderFactoryInterface $encoderFactory)
     {
-        $this->securityContext = $securityContext;
+        $this->tokenStorage = $tokenStorage;
         $this->encoderFactory = $encoderFactory;
     }
 
@@ -31,7 +34,7 @@ class WallabagUserPasswordValidator extends ConstraintValidator
             throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\UserPassword');
         }
 
-        $user = $this->securityContext->getToken()->getUser();
+        $user = $this->tokenStorage->getToken()->getUser();
 
         if (!$user instanceof UserInterface) {
             throw new ConstraintDefinitionException('The User object must implement the UserInterface interface.');
index a01457808deb18a918143af4e4ad0737d01bb797..f72cba6595ed690d064c93e66a3a0429aa5cbb0c 100644 (file)
@@ -44,7 +44,7 @@ class ConfigControllerTest extends WallabagCoreTestCase
         $form = $crawler->filter('button[id=config_save]')->form();
 
         $data = array(
-            'config[theme]' => 'baggy',
+            'config[theme]' => 0,
             'config[items_per_page]' => '30',
             'config[language]' => 'fr_FR',
         );
@@ -63,12 +63,12 @@ class ConfigControllerTest extends WallabagCoreTestCase
     {
         return array(
             array(array(
-                'config[theme]' => 'baggy',
+                'config[theme]' => 0,
                 'config[items_per_page]' => '',
                 'config[language]' => 'fr_FR',
             )),
             array(array(
-                'config[theme]' => 'baggy',
+                'config[theme]' => 0,
                 'config[items_per_page]' => '12',
                 'config[language]' => '',
             )),