From 80f4d85ac92ab4dc490c51f2d831ac7fa3853826 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Thu, 8 Jun 2017 19:15:33 +0200 Subject: [PATCH] Review --- app/DoctrineMigrations/Version20170606155640.php | 3 ++- app/config/parameters.yml.dist | 2 +- app/config/parameters_test.yml | 1 - app/config/wallabag.yml | 1 - src/Wallabag/CoreBundle/DependencyInjection/Configuration.php | 2 -- .../CoreBundle/DependencyInjection/WallabagCoreExtension.php | 1 - src/Wallabag/CoreBundle/Resources/config/services.yml | 2 +- tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php | 2 +- 8 files changed, 5 insertions(+), 9 deletions(-) diff --git a/app/DoctrineMigrations/Version20170606155640.php b/app/DoctrineMigrations/Version20170606155640.php index 1b234044..e9b50428 100644 --- a/app/DoctrineMigrations/Version20170606155640.php +++ b/app/DoctrineMigrations/Version20170606155640.php @@ -8,7 +8,8 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** - * Add api_user_registration in craue_config_setting. + * Remove wallabag_url from craue_config_setting. + * It has been moved into the parameters.yml */ class Version20170606155640 extends AbstractMigration implements ContainerAwareInterface { diff --git a/app/config/parameters.yml.dist b/app/config/parameters.yml.dist index c00ffb0e..d827219a 100644 --- a/app/config/parameters.yml.dist +++ b/app/config/parameters.yml.dist @@ -23,7 +23,7 @@ parameters: # with PostgreSQL and SQLite, you must set "utf8" database_charset: utf8mb4 - domain_name: wallabag.me + domain_name: http://your-wallabag-url-instance.com mailer_transport: smtp mailer_host: 127.0.0.1 diff --git a/app/config/parameters_test.yml b/app/config/parameters_test.yml index 92f0364f..010785e6 100644 --- a/app/config/parameters_test.yml +++ b/app/config/parameters_test.yml @@ -8,4 +8,3 @@ parameters: test_database_path: "%env(TEST_DATABASE_PATH)%" env(TEST_DATABASE_PATH): "%kernel.root_dir%/../data/db/wallabag_test.sqlite" test_database_charset: utf8 - domain_name: 'http://v2.wallabag.org' diff --git a/app/config/wallabag.yml b/app/config/wallabag.yml index d03450a0..51b7e4e3 100644 --- a/app/config/wallabag.yml +++ b/app/config/wallabag.yml @@ -26,7 +26,6 @@ wallabag_core: fetching_error_message: | wallabag can't retrieve contents for this article. Please troubleshoot this issue. api_limit_mass_actions: 10 - domain_name: '%domain_name%' default_internal_settings: - name: share_public diff --git a/src/Wallabag/CoreBundle/DependencyInjection/Configuration.php b/src/Wallabag/CoreBundle/DependencyInjection/Configuration.php index a6f53714..33df92d3 100644 --- a/src/Wallabag/CoreBundle/DependencyInjection/Configuration.php +++ b/src/Wallabag/CoreBundle/DependencyInjection/Configuration.php @@ -63,8 +63,6 @@ class Configuration implements ConfigurationInterface ->end() ->end() ->end() - ->scalarNode('domain_name') - ->end() ->end() ; diff --git a/src/Wallabag/CoreBundle/DependencyInjection/WallabagCoreExtension.php b/src/Wallabag/CoreBundle/DependencyInjection/WallabagCoreExtension.php index d0b4351e..b4d8a386 100644 --- a/src/Wallabag/CoreBundle/DependencyInjection/WallabagCoreExtension.php +++ b/src/Wallabag/CoreBundle/DependencyInjection/WallabagCoreExtension.php @@ -29,7 +29,6 @@ class WallabagCoreExtension extends Extension $container->setParameter('wallabag_core.fetching_error_message_title', $config['fetching_error_message_title']); $container->setParameter('wallabag_core.api_limit_mass_actions', $config['api_limit_mass_actions']); $container->setParameter('wallabag_core.default_internal_settings', $config['default_internal_settings']); - $container->setParameter('wallabag_core.domain_name', $config['domain_name']); $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); $loader->load('services.yml'); diff --git a/src/Wallabag/CoreBundle/Resources/config/services.yml b/src/Wallabag/CoreBundle/Resources/config/services.yml index 6e2c9761..8b00700f 100644 --- a/src/Wallabag/CoreBundle/Resources/config/services.yml +++ b/src/Wallabag/CoreBundle/Resources/config/services.yml @@ -195,7 +195,7 @@ services: arguments: - "@wallabag_core.entry.download_images.client" - "%kernel.root_dir%/../web/assets/images" - - '%wallabag_core.domain_name%' + - '%domain_name%' - "@logger" wallabag_core.entry.download_images.client: diff --git a/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php b/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php index cc7b3672..581ee952 100644 --- a/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php +++ b/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php @@ -1000,7 +1000,7 @@ class EntryControllerTest extends WallabagCoreTestCase $this->assertEquals($url, $entry->getUrl()); $this->assertContains('Perpignan', $entry->getTitle()); // instead of checking for the filename (which might change) check that the image is now local - $this->assertContains('http://v2.wallabag.org/assets/images/', $entry->getContent()); + $this->assertContains('http://your-wallabag-url-instance.com/assets/images/', $entry->getContent()); $client->getContainer()->get('craue_config')->set('download_images_enabled', 0); } -- 2.41.0