Merge pull request #1206 from wallabag/sf-2.7

Upgrade to Symfony 2.7
This commit is contained in:
Nicolas Lœuillet 2015-06-03 21:24:11 +02:00
commit 3cf22a0541
13 changed files with 80 additions and 175 deletions

Binary file not shown.

View File

@ -1 +0,0 @@
../vendor/robmorgan/phinx/bin/phinx

View 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",
@ -64,19 +64,18 @@
"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",
@ -84,10 +83,10 @@
"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"
},

156
composer.lock generated
View 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",
@ -898,16 +898,16 @@
},
{
"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": {
@ -931,7 +931,7 @@
"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",
@ -940,7 +940,7 @@
"strip",
"tags"
],
"time": "2015-04-12 19:37:20"
"time": "2015-04-05 17:23:05"
},
{
"name": "incenteev/composer-parameter-handler",
@ -1651,17 +1651,17 @@
},
{
"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": {
@ -1702,7 +1702,7 @@
"cors",
"crossdomain"
],
"time": "2014-12-10 17:26:49"
"time": "2015-01-13 17:53:27"
},
{
"name": "pagerfanta/pagerfanta",
@ -1908,68 +1908,6 @@
],
"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",
@ -2419,25 +2357,26 @@
},
{
"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",
@ -2461,7 +2400,6 @@
"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",
@ -2492,18 +2430,23 @@
"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",
@ -2532,7 +2475,7 @@
"keywords": [
"framework"
],
"time": "2015-05-29 22:55:07"
"time": "2015-05-30 16:52:28"
},
{
"name": "tecnick.com/tcpdf",
@ -3108,17 +3051,17 @@
},
{
"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": {
@ -3156,7 +3099,7 @@
"HATEOAS",
"rest"
],
"time": "2015-03-12 15:49:24"
"time": "2015-02-19 16:27:51"
},
{
"name": "willdurand/jsonp-callback-validator",
@ -3308,17 +3251,17 @@
},
{
"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": {
@ -3330,7 +3273,7 @@
"type": "symfony-bundle",
"extra": {
"branch-alias": {
"dev-master": "2.2.x-dev"
"dev-master": "2.1.x-dev"
}
},
"autoload": {
@ -3343,6 +3286,12 @@
"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"
@ -3350,10 +3299,6 @@
{
"name": "Doctrine Project",
"homepage": "http://www.doctrine-project.org"
},
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
}
],
"description": "Symfony DoctrineFixturesBundle",
@ -3362,7 +3307,7 @@
"Fixture",
"persistence"
],
"time": "2015-01-19 02:21:37"
"time": "2013-09-05 11:23:37"
},
{
"name": "phpdocumentor/reflection-docblock",
@ -4269,18 +4214,13 @@
"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,

View File

@ -1,22 +0,0 @@
<?php
use Phinx\Migration\AbstractMigration;
class InitDatabase extends AbstractMigration
{
/**
* Migrate Up.
*/
public function up()
{
$this->execute("INSERT INTO config (name, value) VALUES ('foo', 'bar');");
}
/**
* Migrate Down.
*/
public function down()
{
$this->execute("DELETE FROM config WHERE name = 'foo' AND value = 'bar';");
}
}

View File

@ -1,17 +0,0 @@
paths:
migrations: %%PHINX_CONFIG_DIR%%/migrations
environments:
default_migration_table: phinxlog
default_database: development
production:
adapter: sqlite
name: app/db/poche
development:
adapter: sqlite
name: app/db/poche
testing:
adapter: sqlite
name: app/db/poche

View 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',

View 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',

View 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',

View 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',

View 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',

View 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.');

View 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]' => '',
)),