diff options
author | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2016-02-29 17:19:39 +0100 |
---|---|---|
committer | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2016-02-29 17:19:39 +0100 |
commit | 1e18360cc7d6b7987bffc4ecd067d0b3aee85bb1 (patch) | |
tree | 7dfecfbf46240e0c2db13a1ee8c2f5b927676530 | |
parent | 30e5174ea779059a0021d3c4e56f09ade94cbd83 (diff) | |
parent | 3c39f5ac413cc1bd58a0647fcbb52982af81c078 (diff) | |
download | wallabag-1e18360cc7d6b7987bffc4ecd067d0b3aee85bb1.tar.gz wallabag-1e18360cc7d6b7987bffc4ecd067d0b3aee85bb1.tar.zst wallabag-1e18360cc7d6b7987bffc4ecd067d0b3aee85bb1.zip |
Merge pull request #1734 from wallabag/v2-todo
Remove extra definition
-rw-r--r-- | .travis.yml | 3 | ||||
-rw-r--r-- | src/Wallabag/CoreBundle/Command/InstallCommand.php | 2 | ||||
-rw-r--r-- | src/Wallabag/CoreBundle/Tests/Command/InstallCommandTest.php | 38 | ||||
-rw-r--r-- | src/Wallabag/UserBundle/Resources/config/services.yml | 5 |
4 files changed, 20 insertions, 28 deletions
diff --git a/.travis.yml b/.travis.yml index c6d371a5..5f0abe87 100644 --- a/.travis.yml +++ b/.travis.yml | |||
@@ -44,8 +44,7 @@ before_script: | |||
44 | - if [[ $TRAVIS_PHP_VERSION != hhvm ]]; then echo "memory_limit=-1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; fi; | 44 | - if [[ $TRAVIS_PHP_VERSION != hhvm ]]; then echo "memory_limit=-1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; fi; |
45 | - if [[ $TRAVIS_PHP_VERSION != hhvm ]]; then phpenv config-rm xdebug.ini; fi; | 45 | - if [[ $TRAVIS_PHP_VERSION != hhvm ]]; then phpenv config-rm xdebug.ini; fi; |
46 | - composer self-update --no-progress | 46 | - composer self-update --no-progress |
47 | - if [ -n "$GH_TOKEN" ]; then composer config github-oauth.github.com ${GH_TOKEN}; fi; | 47 | - if [[ "$DB" = "pgsql" ]]; then psql -c 'create database wallabag_test;' -U postgres; fi; |
48 | - if [[ "$DB" = "pgsql" ]]; then psql -c 'create database wallabag;' -U postgres; fi; | ||
49 | 48 | ||
50 | before_install: | 49 | before_install: |
51 | - if [[ $TRAVIS_REPO_SLUG = wallabag/wallabag ]]; then cp .composer-auth.json ~/.composer/auth.json; fi; | 50 | - if [[ $TRAVIS_REPO_SLUG = wallabag/wallabag ]]; then cp .composer-auth.json ~/.composer/auth.json; fi; |
diff --git a/src/Wallabag/CoreBundle/Command/InstallCommand.php b/src/Wallabag/CoreBundle/Command/InstallCommand.php index 771b3c5a..e97ba46a 100644 --- a/src/Wallabag/CoreBundle/Command/InstallCommand.php +++ b/src/Wallabag/CoreBundle/Command/InstallCommand.php | |||
@@ -193,7 +193,7 @@ class InstallCommand extends ContainerAwareCommand | |||
193 | $this->defaultOutput->writeln('<info><comment>Step 3 of 4.</comment> Administration setup.</info>'); | 193 | $this->defaultOutput->writeln('<info><comment>Step 3 of 4.</comment> Administration setup.</info>'); |
194 | 194 | ||
195 | $questionHelper = $this->getHelperSet()->get('question'); | 195 | $questionHelper = $this->getHelperSet()->get('question'); |
196 | $question = new ConfirmationQuestion('Would you like to create a new admin user (recommended) ? (y/N)', true); | 196 | $question = new ConfirmationQuestion('Would you like to create a new admin user (recommended) ? (Y/n)', true); |
197 | 197 | ||
198 | if (!$questionHelper->ask($this->defaultInput, $this->defaultOutput, $question)) { | 198 | if (!$questionHelper->ask($this->defaultInput, $this->defaultOutput, $question)) { |
199 | return $this; | 199 | return $this; |
diff --git a/src/Wallabag/CoreBundle/Tests/Command/InstallCommandTest.php b/src/Wallabag/CoreBundle/Tests/Command/InstallCommandTest.php index a79d7b90..bb8fb888 100644 --- a/src/Wallabag/CoreBundle/Tests/Command/InstallCommandTest.php +++ b/src/Wallabag/CoreBundle/Tests/Command/InstallCommandTest.php | |||
@@ -14,6 +14,24 @@ use Wallabag\CoreBundle\Tests\WallabagCoreTestCase; | |||
14 | 14 | ||
15 | class InstallCommandTest extends WallabagCoreTestCase | 15 | class InstallCommandTest extends WallabagCoreTestCase |
16 | { | 16 | { |
17 | public function setUp() | ||
18 | { | ||
19 | parent::setUp(); | ||
20 | |||
21 | if ($this->getClient()->getContainer()->get('doctrine')->getConnection()->getDriver() instanceof \Doctrine\DBAL\Driver\PDOPgSql\Driver) { | ||
22 | /* | ||
23 | * LOG: statement: CREATE DATABASE "wallabag" | ||
24 | * ERROR: source database "template1" is being accessed by other users | ||
25 | * DETAIL: There is 1 other session using the database. | ||
26 | * STATEMENT: CREATE DATABASE "wallabag" | ||
27 | * FATAL: database "wallabag" does not exist | ||
28 | * | ||
29 | * http://stackoverflow.com/a/14374832/569101 | ||
30 | */ | ||
31 | $this->markTestSkipped('PostgreSQL spotted: can find a good way to drop current database, skipping.'); | ||
32 | } | ||
33 | } | ||
34 | |||
17 | public static function tearDownAfterClass() | 35 | public static function tearDownAfterClass() |
18 | { | 36 | { |
19 | $application = new Application(static::$kernel); | 37 | $application = new Application(static::$kernel); |
@@ -91,19 +109,6 @@ class InstallCommandTest extends WallabagCoreTestCase | |||
91 | 109 | ||
92 | public function testRunInstallCommandWithDatabaseRemoved() | 110 | public function testRunInstallCommandWithDatabaseRemoved() |
93 | { | 111 | { |
94 | if ($this->getClient()->getContainer()->get('doctrine')->getConnection()->getDriver() instanceof \Doctrine\DBAL\Driver\PDOPgSql\Driver) { | ||
95 | /* | ||
96 | * LOG: statement: CREATE DATABASE "wallabag" | ||
97 | * ERROR: source database "template1" is being accessed by other users | ||
98 | * DETAIL: There is 1 other session using the database. | ||
99 | * STATEMENT: CREATE DATABASE "wallabag" | ||
100 | * FATAL: database "wallabag" does not exist | ||
101 | * | ||
102 | * http://stackoverflow.com/a/14374832/569101 | ||
103 | */ | ||
104 | $this->markTestSkipped('PostgreSQL spotted: can find a good way to drop current database, skipping.'); | ||
105 | } | ||
106 | |||
107 | $application = new Application($this->getClient()->getKernel()); | 112 | $application = new Application($this->getClient()->getKernel()); |
108 | $application->add(new DropDatabaseDoctrineCommand()); | 113 | $application->add(new DropDatabaseDoctrineCommand()); |
109 | 114 | ||
@@ -184,13 +189,6 @@ class InstallCommandTest extends WallabagCoreTestCase | |||
184 | 189 | ||
185 | public function testRunInstallCommandChooseNothing() | 190 | public function testRunInstallCommandChooseNothing() |
186 | { | 191 | { |
187 | if ($this->getClient()->getContainer()->get('doctrine')->getConnection()->getDriver() instanceof \Doctrine\DBAL\Driver\PDOPgSql\Driver) { | ||
188 | /* | ||
189 | * @see testRunInstallCommandWithDatabaseRemoved | ||
190 | */ | ||
191 | $this->markTestSkipped('PostgreSQL spotted: can find a good way to drop current database, skipping.'); | ||
192 | } | ||
193 | |||
194 | $application = new Application($this->getClient()->getKernel()); | 192 | $application = new Application($this->getClient()->getKernel()); |
195 | $application->add(new InstallCommand()); | 193 | $application->add(new InstallCommand()); |
196 | $application->add(new DropDatabaseDoctrineCommand()); | 194 | $application->add(new DropDatabaseDoctrineCommand()); |
diff --git a/src/Wallabag/UserBundle/Resources/config/services.yml b/src/Wallabag/UserBundle/Resources/config/services.yml index 9a589332..d79d8fa2 100644 --- a/src/Wallabag/UserBundle/Resources/config/services.yml +++ b/src/Wallabag/UserBundle/Resources/config/services.yml | |||
@@ -1,9 +1,4 @@ | |||
1 | services: | 1 | services: |
2 | # might be fixed in the symfony release | ||
3 | # https://github.com/FriendsOfSymfony/FOSUserBundle/issues/2048 | ||
4 | fos_user.doctrine_registry: | ||
5 | alias: doctrine | ||
6 | |||
7 | wallabag_user.auth_code_mailer: | 2 | wallabag_user.auth_code_mailer: |
8 | class: Wallabag\UserBundle\Mailer\AuthCodeMailer | 3 | class: Wallabag\UserBundle\Mailer\AuthCodeMailer |
9 | arguments: | 4 | arguments: |