Jump to Symfony 3.1

This commit is contained in:
Jeremy Benoist 2016-06-01 21:27:35 +02:00
parent 891a026e31
commit 23634d5d84
53 changed files with 76 additions and 91 deletions

View file

@ -55,6 +55,6 @@ before_install:
script:
- travis_wait composer install --no-interaction --no-progress --prefer-dist -o
- ant prepare-$DB
- bin/phpunit -v
- phpunit -v
- if [ "$CS_FIXER" = "run" ]; then php bin/php-cs-fixer fix src/ --verbose --dry-run ; fi;
- if [ "$VALIDATE_TRANSLATION_FILE" = "run" ]; then php bin/console lint:yaml src/Wallabag/CoreBundle/Resources/translations -v ; fi;

View file

@ -169,7 +169,7 @@ liip_theme:
path_patterns:
bundle_resource:
- %%bundle_path%%/Resources/views/themes/%%current_theme%%/%%template%%
- "%%bundle_path%%/Resources/views/themes/%%current_theme%%/%%template%%"
fos_user:
db_driver: orm
@ -177,9 +177,9 @@ fos_user:
user_class: Wallabag\UserBundle\Entity\User
registration:
confirmation:
enabled: %fosuser_confirmation%
enabled: "%fosuser_confirmation%"
from_email:
address: %from_email%
address: "%from_email%"
sender_name: wallabag
fos_oauth_server:
db_driver: orm
@ -197,8 +197,8 @@ scheb_two_factor:
cookie_lifetime: 2592000
email:
enabled: %twofactor_auth%
sender_email: %twofactor_sender%
enabled: "%twofactor_auth%"
sender_email: "%twofactor_sender%"
digits: 6
template: WallabagUserBundle:Authentication:form.html.twig
mailer: wallabag_user.auth_code_mailer

View file

@ -17,14 +17,14 @@ monolog:
type: stream
path: "%kernel.logs_dir%/%kernel.environment%.log"
level: debug
channels: [!event]
channels: ['!event']
console:
type: console
bubble: false
verbosity_levels:
VERBOSITY_VERBOSE: INFO
VERBOSITY_VERY_VERBOSE: DEBUG
channels: [!event, !doctrine]
channels: ['!event', '!doctrine']
console_very_verbose:
type: console
bubble: false

View file

@ -2,8 +2,8 @@ imports:
- { resource: config.yml }
#framework:
# validation:
# cache: apc
# cache:
# system: cache.adapter.apcu
#doctrine:
# orm:

View file

@ -1 +0,0 @@
../vendor/phpunit/phpunit/phpunit

View file

@ -43,7 +43,7 @@
"ext-iconv": "*",
"ext-tokenizer": "*",
"ext-pdo": "*",
"symfony/symfony": "3.0.*",
"symfony/symfony": "3.1.*",
"doctrine/orm": "^2.5",
"doctrine/doctrine-bundle": "^1.6",
"doctrine/doctrine-cache-bundle": "^1.2",
@ -87,7 +87,7 @@
"doctrine/doctrine-fixtures-bundle": "~2.2",
"sensio/generator-bundle": "^3.0",
"phpunit/phpunit": "~4.4",
"symfony/phpunit-bridge": "^2.7",
"symfony/phpunit-bridge": "^3.0",
"friendsofphp/php-cs-fixer": "~1.9"
},
"scripts": {
@ -121,6 +121,9 @@
"psr-4": { "Wallabag\\": "src/Wallabag/" },
"classmap": [ "app/AppKernel.php", "app/AppCache.php" ]
},
"autoload-dev": {
"psr-4": { "Tests\\": "tests/" }
},
"config": {
"bin-dir": "bin"
},

View file

@ -1,24 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.8/phpunit.xsd"
backupGlobals="false"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="false"
bootstrap="app/autoload.php"
>
>
<testsuites>
<testsuite name="wallabag Test Suite">
<directory>src/Wallabag/*Bundle/Tests</directory>
<directory>tests</directory>
</testsuite>
</testsuites>
<php>
<ini name="error_reporting" value="-1" />
<server name="KERNEL_DIR" value="app/" />
</php>

View file

@ -32,7 +32,6 @@ class ConfigType extends AbstractType
$builder
->add('theme', ChoiceType::class, [
'choices' => array_flip($this->themes),
'choices_as_values' => true,
'label' => 'config.form_settings.theme_label',
])
->add('items_per_page', null, [
@ -49,7 +48,6 @@ class ConfigType extends AbstractType
])
->add('language', ChoiceType::class, [
'choices' => array_flip($this->languages),
'choices_as_values' => true,
'label' => 'config.form_settings.language_label',
])
->add('save', SubmitType::class, [

View file

@ -113,7 +113,6 @@ class EntryFilterType extends AbstractType
])
->add('language', ChoiceFilterType::class, [
'choices' => array_flip($this->repository->findDistinctLanguageByUser($this->user->getId())),
'choices_as_values' => true,
'label' => 'entry.filters.language_label',
])
;

View file

@ -1,8 +1,8 @@
<?php
namespace Wallabag\AnnotationBundle\Tests\Controller;
namespace Tests\AnnotationBundle\Controller;
use Wallabag\AnnotationBundle\Tests\WallabagAnnotationTestCase;
use Tests\Wallabag\AnnotationBundle\WallabagAnnotationTestCase;
class AnnotationControllerTest extends WallabagAnnotationTestCase
{

View file

@ -1,6 +1,6 @@
<?php
namespace Wallabag\AnnotationBundle\Tests;
namespace Tests\Wallabag\AnnotationBundle;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
use Symfony\Component\BrowserKit\Cookie;

View file

@ -1,8 +1,8 @@
<?php
namespace Wallabag\ApiBundle\Tests\Controller;
namespace Tests\Wallabag\ApiBundle\Controller;
use Wallabag\ApiBundle\Tests\WallabagApiTestCase;
use Tests\Wallabag\ApiBundle\WallabagApiTestCase;
class WallabagRestControllerTest extends WallabagApiTestCase
{

View file

@ -1,6 +1,6 @@
<?php
namespace Wallabag\ApiBundle\Tests;
namespace Tests\Wallabag\ApiBundle;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
use Symfony\Component\BrowserKit\Cookie;

View file

@ -1,6 +1,6 @@
<?php
namespace Wallabag\CoreBundle\Tests\Command;
namespace Tests\Wallabag\CoreBundle\Command;
use Doctrine\Bundle\DoctrineBundle\Command\CreateDatabaseDoctrineCommand;
use Doctrine\Bundle\DoctrineBundle\Command\DropDatabaseDoctrineCommand;
@ -9,8 +9,8 @@ use Symfony\Component\Console\Input\ArrayInput;
use Symfony\Component\Console\Output\NullOutput;
use Symfony\Component\Console\Tester\CommandTester;
use Wallabag\CoreBundle\Command\InstallCommand;
use Wallabag\CoreBundle\Tests\Mock\InstallCommandMock;
use Wallabag\CoreBundle\Tests\WallabagCoreTestCase;
use Tests\Wallabag\CoreBundle\Mock\InstallCommandMock;
use Tests\Wallabag\CoreBundle\WallabagCoreTestCase;
class InstallCommandTest extends WallabagCoreTestCase
{

View file

@ -1,11 +1,11 @@
<?php
namespace Wallabag\CoreBundle\Tests\Command;
namespace Tests\Wallabag\CoreBundle\Command;
use Symfony\Bundle\FrameworkBundle\Console\Application;
use Symfony\Component\Console\Tester\CommandTester;
use Wallabag\CoreBundle\Command\TagAllCommand;
use Wallabag\CoreBundle\Tests\WallabagCoreTestCase;
use Tests\Wallabag\CoreBundle\WallabagCoreTestCase;
class TagAllCommandTest extends WallabagCoreTestCase
{

View file

@ -1,8 +1,8 @@
<?php
namespace Wallabag\CoreBundle\Tests\Controller;
namespace Tests\Wallabag\CoreBundle\Controller;
use Wallabag\CoreBundle\Tests\WallabagCoreTestCase;
use Tests\Wallabag\CoreBundle\WallabagCoreTestCase;
class ConfigControllerTest extends WallabagCoreTestCase
{

View file

@ -1,8 +1,8 @@
<?php
namespace Wallabag\CoreBundle\Tests\Controller;
namespace Tests\Wallabag\CoreBundle\Controller;
use Wallabag\CoreBundle\Tests\WallabagCoreTestCase;
use Tests\Wallabag\CoreBundle\WallabagCoreTestCase;
class DeveloperControllerTest extends WallabagCoreTestCase
{

View file

@ -1,8 +1,8 @@
<?php
namespace Wallabag\CoreBundle\Tests\Controller;
namespace Tests\Wallabag\CoreBundle\Controller;
use Wallabag\CoreBundle\Tests\WallabagCoreTestCase;
use Tests\Wallabag\CoreBundle\WallabagCoreTestCase;
use Wallabag\CoreBundle\Entity\Entry;
class EntryControllerTest extends WallabagCoreTestCase

View file

@ -1,8 +1,8 @@
<?php
namespace Wallabag\CoreBundle\Tests\Controller;
namespace Tests\Wallabag\CoreBundle\Controller;
use Wallabag\CoreBundle\Tests\WallabagCoreTestCase;
use Tests\Wallabag\CoreBundle\WallabagCoreTestCase;
class ExportControllerTest extends WallabagCoreTestCase
{

View file

@ -1,8 +1,8 @@
<?php
namespace Wallabag\CoreBundle\Tests\Controller;
namespace Tests\Wallabag\CoreBundle\Controller;
use Wallabag\CoreBundle\Tests\WallabagCoreTestCase;
use Tests\Wallabag\CoreBundle\WallabagCoreTestCase;
class RssControllerTest extends WallabagCoreTestCase
{

View file

@ -1,8 +1,8 @@
<?php
namespace Wallabag\CoreBundle\Tests\Controller;
namespace Tests\Wallabag\CoreBundle\Controller;
use Wallabag\CoreBundle\Tests\WallabagCoreTestCase;
use Tests\Wallabag\CoreBundle\WallabagCoreTestCase;
class SecurityControllerTest extends WallabagCoreTestCase
{

View file

@ -1,8 +1,8 @@
<?php
namespace Wallabag\CoreBundle\Tests\Controller;
namespace Tests\Wallabag\CoreBundle\Controller;
use Wallabag\CoreBundle\Tests\WallabagCoreTestCase;
use Tests\Wallabag\CoreBundle\WallabagCoreTestCase;
/**
* The controller `SettingsController` does not exist.

View file

@ -1,8 +1,8 @@
<?php
namespace Wallabag\CoreBundle\Tests\Controller;
namespace Tests\Wallabag\CoreBundle\Controller;
use Wallabag\CoreBundle\Tests\WallabagCoreTestCase;
use Tests\Wallabag\CoreBundle\WallabagCoreTestCase;
class StaticControllerTest extends WallabagCoreTestCase
{

View file

@ -1,8 +1,8 @@
<?php
namespace Wallabag\CoreBundle\Tests\Controller;
namespace Tests\Wallabag\CoreBundle\Controller;
use Wallabag\CoreBundle\Tests\WallabagCoreTestCase;
use Tests\Wallabag\CoreBundle\WallabagCoreTestCase;
class TagControllerTest extends WallabagCoreTestCase
{

View file

@ -1,6 +1,6 @@
<?php
namespace Wallabag\CoreBundle\Tests\EventListener;
namespace Tests\Wallabag\CoreBundle\EventListener;
use Symfony\Component\EventDispatcher\EventDispatcher;
use Symfony\Component\HttpFoundation\Request;

View file

@ -1,6 +1,6 @@
<?php
namespace Wallabag\CoreBundle\Tests\EventListener;
namespace Tests\Wallabag\CoreBundle\EventListener;
use FOS\UserBundle\Event\FilterUserResponseEvent;
use FOS\UserBundle\FOSUserEvents;

View file

@ -1,6 +1,6 @@
<?php
namespace Wallabag\CoreBundle\Tests\EventListener;
namespace Tests\Wallabag\CoreBundle\EventListener;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Session\Session;

View file

@ -1,6 +1,6 @@
<?php
namespace Wallabag\CoreBundle\Tests\Form\DataTransformer;
namespace Tests\Wallabag\CoreBundle\Form\DataTransformer;
use Wallabag\CoreBundle\Form\DataTransformer\StringToListTransformer;

View file

@ -1,6 +1,6 @@
<?php
namespace Wallabag\CoreBundle\Tests\Helper;
namespace Tests\Wallabag\CoreBundle\Helper;
use Psr\Log\NullLogger;
use Wallabag\CoreBundle\Helper\ContentProxy;

View file

@ -1,6 +1,6 @@
<?php
namespace Wallabag\CoreBundle\Tests\Helper;
namespace Tests\Wallabag\CoreBundle\Helper;
use Wallabag\CoreBundle\Helper\Redirect;

View file

@ -1,6 +1,6 @@
<?php
namespace Wallabag\CoreBundle\Tests\Helper;
namespace Tests\Wallabag\CoreBundle\Helper;
use Wallabag\CoreBundle\Entity\Config;
use Wallabag\CoreBundle\Entity\Entry;

View file

@ -1,6 +1,6 @@
<?php
namespace Wallabag\CoreBundle\Tests\Mock;
namespace Tests\Wallabag\CoreBundle\Mock;
use Wallabag\CoreBundle\Command\InstallCommand;

View file

@ -1,6 +1,6 @@
<?php
namespace Wallabag\CoreBundle\Tests\Command;
namespace Tests\Wallabag\CoreBundle\Command;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
use Symfony\Component\HttpFoundation\Request;

View file

@ -1,6 +1,6 @@
<?php
namespace Wallabag\CoreBundle\Tests\Subscriber;
namespace Tests\Wallabag\CoreBundle\Subscriber;
use Doctrine\Common\EventManager;
use Doctrine\ORM\Event\LoadClassMetadataEventArgs;

View file

@ -1,6 +1,6 @@
<?php
namespace Wallabag\CoreBundle\Tests\Twig;
namespace Tests\Wallabag\CoreBundle\Twig;
use Wallabag\CoreBundle\Twig\WallabagExtension;

View file

@ -1,6 +1,6 @@
<?php
namespace Wallabag\CoreBundle\Tests;
namespace Tests\Wallabag\CoreBundle;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;

View file

@ -1,8 +1,8 @@
<?php
namespace Wallabag\ImportBundle\Tests\Controller;
namespace Tests\Wallabag\ImportBundle\Controller;
use Wallabag\CoreBundle\Tests\WallabagCoreTestCase;
use Tests\Wallabag\CoreBundle\WallabagCoreTestCase;
class ImportControllerTest extends WallabagCoreTestCase
{

View file

@ -1,8 +1,8 @@
<?php
namespace Wallabag\ImportBundle\Tests\Controller;
namespace Tests\Wallabag\ImportBundle\Controller;
use Wallabag\CoreBundle\Tests\WallabagCoreTestCase;
use Tests\Wallabag\CoreBundle\WallabagCoreTestCase;
class PocketControllerTest extends WallabagCoreTestCase
{

View file

@ -1,8 +1,8 @@
<?php
namespace Wallabag\ImportBundle\Tests\Controller;
namespace Tests\Wallabag\ImportBundle\Controller;
use Wallabag\CoreBundle\Tests\WallabagCoreTestCase;
use Tests\Wallabag\CoreBundle\WallabagCoreTestCase;
use Symfony\Component\HttpFoundation\File\UploadedFile;
class WallabagV1ControllerTest extends WallabagCoreTestCase

View file

@ -1,8 +1,8 @@
<?php
namespace Wallabag\ImportBundle\Tests\Controller;
namespace Tests\Wallabag\ImportBundle\Controller;
use Wallabag\CoreBundle\Tests\WallabagCoreTestCase;
use Tests\Wallabag\CoreBundle\WallabagCoreTestCase;
use Symfony\Component\HttpFoundation\File\UploadedFile;
class WallabagV2ControllerTest extends WallabagCoreTestCase

View file

@ -1,6 +1,6 @@
<?php
namespace Wallabag\ImportBundle\Tests\Import;
namespace Tests\Wallabag\ImportBundle\Import;
use Wallabag\ImportBundle\Import\ImportChain;

View file

@ -1,6 +1,6 @@
<?php
namespace Wallabag\ImportBundle\Tests\Import;
namespace Tests\Wallabag\ImportBundle\Import;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Wallabag\ImportBundle\Import\ImportCompilerPass;

View file

@ -1,6 +1,6 @@
<?php
namespace Wallabag\ImportBundle\Tests\Import;
namespace Tests\Wallabag\ImportBundle\Import;
use Wallabag\UserBundle\Entity\User;
use Wallabag\CoreBundle\Entity\Entry;

View file

@ -1,6 +1,6 @@
<?php
namespace Wallabag\ImportBundle\Tests\Import;
namespace Tests\Wallabag\ImportBundle\Import;
use Wallabag\ImportBundle\Import\WallabagV1Import;
use Wallabag\UserBundle\Entity\User;

View file

@ -1,6 +1,6 @@
<?php
namespace Wallabag\ImportBundle\Tests\Import;
namespace Tests\Wallabag\ImportBundle\Import;
use Wallabag\ImportBundle\Import\WallabagV2Import;
use Wallabag\UserBundle\Entity\User;

View file

@ -1,6 +1,6 @@
<?php
namespace Wallabag\UserBundle\Tests\Mailer;
namespace Tests\Wallabag\UserBundle\Mailer;
use Wallabag\UserBundle\Entity\User;
use Wallabag\UserBundle\Mailer\AuthCodeMailer;

View file

@ -8,16 +8,6 @@ use Symfony\Component\HttpFoundation\Request;
$loader = require __DIR__.'/../app/autoload.php';
include_once __DIR__.'/../var/bootstrap.php.cache';
// Enable APC for autoloading to improve performance.
// You should change the ApcClassLoader first argument to a unique prefix
// in order to prevent cache key conflicts with other applications
// also using APC.
/*
$apcLoader = new Symfony\Component\ClassLoader\ApcClassLoader(sha1(__FILE__), $loader);
$loader->unregister();
$apcLoader->register(true);
*/
$kernel = new AppKernel('prod', false);
$kernel->loadClassCache();
//$kernel = new AppCache($kernel);