diff options
author | Nicolas Hart <contact@nclshart.net> | 2017-10-13 23:52:15 +0200 |
---|---|---|
committer | Nicolas Hart <contact@nclshart.net> | 2017-10-14 00:32:56 +0200 |
commit | 9ca069a6fea67ddf2ef44601901ea3c02e3cffbe (patch) | |
tree | 55bc8ee87f1f758bea7617bc24bc02c4a0c19408 /app | |
parent | f44a927530476eaf903525481e5e8114c3b017b8 (diff) | |
download | wallabag-9ca069a6fea67ddf2ef44601901ea3c02e3cffbe.tar.gz wallabag-9ca069a6fea67ddf2ef44601901ea3c02e3cffbe.tar.zst wallabag-9ca069a6fea67ddf2ef44601901ea3c02e3cffbe.zip |
Replace kernel.root_dir by kernel.project_dir
kernel.root_dir and Kernel::getRootDir() are deprecated since Symfony 3.3.
See https://symfony.com/blog/new-in-symfony-3-3-a-simpler-way-to-get-the-project-root-directory and https://github.com/symfony/symfony/blob/3.3/UPGRADE-3.3.md#httpkernel for more information.
Diffstat (limited to 'app')
-rw-r--r-- | app/AppKernel.php | 7 | ||||
-rw-r--r-- | app/config/config.yml | 6 | ||||
-rw-r--r-- | app/config/config_dev.yml | 2 | ||||
-rw-r--r-- | app/config/config_prod.yml | 2 | ||||
-rw-r--r-- | app/config/parameters.yml.dist | 2 | ||||
-rw-r--r-- | app/config/parameters_test.yml | 2 | ||||
-rw-r--r-- | app/config/tests/parameters_test.sqlite.yml | 2 | ||||
-rw-r--r-- | app/config/wallabag.yml | 4 |
8 files changed, 11 insertions, 16 deletions
diff --git a/app/AppKernel.php b/app/AppKernel.php index f1140943..d582c93e 100644 --- a/app/AppKernel.php +++ b/app/AppKernel.php | |||
@@ -57,11 +57,6 @@ class AppKernel extends Kernel | |||
57 | return $bundles; | 57 | return $bundles; |
58 | } | 58 | } |
59 | 59 | ||
60 | public function getRootDir() | ||
61 | { | ||
62 | return __DIR__; | ||
63 | } | ||
64 | |||
65 | public function getCacheDir() | 60 | public function getCacheDir() |
66 | { | 61 | { |
67 | return dirname(__DIR__) . '/var/cache/' . $this->getEnvironment(); | 62 | return dirname(__DIR__) . '/var/cache/' . $this->getEnvironment(); |
@@ -74,7 +69,7 @@ class AppKernel extends Kernel | |||
74 | 69 | ||
75 | public function registerContainerConfiguration(LoaderInterface $loader) | 70 | public function registerContainerConfiguration(LoaderInterface $loader) |
76 | { | 71 | { |
77 | $loader->load($this->getRootDir() . '/config/config_' . $this->getEnvironment() . '.yml'); | 72 | $loader->load($this->getProjectDir() . '/app/config/config_' . $this->getEnvironment() . '.yml'); |
78 | $loader->load(function ($container) { | 73 | $loader->load(function ($container) { |
79 | if ($container->getParameter('use_webpack_dev_server')) { | 74 | if ($container->getParameter('use_webpack_dev_server')) { |
80 | $container->loadFromExtension('framework', [ | 75 | $container->loadFromExtension('framework', [ |
diff --git a/app/config/config.yml b/app/config/config.yml index b76fb696..08da4f8f 100644 --- a/app/config/config.yml +++ b/app/config/config.yml | |||
@@ -16,7 +16,7 @@ framework: | |||
16 | fallback: "%locale%" | 16 | fallback: "%locale%" |
17 | secret: "%secret%" | 17 | secret: "%secret%" |
18 | router: | 18 | router: |
19 | resource: "%kernel.root_dir%/config/routing.yml" | 19 | resource: "%kernel.project_dir%/app/config/routing.yml" |
20 | strict_requirements: ~ | 20 | strict_requirements: ~ |
21 | form: ~ | 21 | form: ~ |
22 | csrf_protection: ~ | 22 | csrf_protection: ~ |
@@ -30,7 +30,7 @@ framework: | |||
30 | session: | 30 | session: |
31 | # handler_id set to null will use default session handler from php.ini | 31 | # handler_id set to null will use default session handler from php.ini |
32 | handler_id: session.handler.native_file | 32 | handler_id: session.handler.native_file |
33 | save_path: "%kernel.root_dir%/../var/sessions/%kernel.environment%" | 33 | save_path: "%kernel.project_dir%/var/sessions/%kernel.environment%" |
34 | fragments: ~ | 34 | fragments: ~ |
35 | http_method_override: true | 35 | http_method_override: true |
36 | assets: ~ | 36 | assets: ~ |
@@ -72,7 +72,7 @@ stof_doctrine_extensions: | |||
72 | sluggable: true | 72 | sluggable: true |
73 | 73 | ||
74 | doctrine_migrations: | 74 | doctrine_migrations: |
75 | dir_name: "%kernel.root_dir%/DoctrineMigrations" | 75 | dir_name: "%kernel.project_dir%/app/DoctrineMigrations" |
76 | namespace: Application\Migrations | 76 | namespace: Application\Migrations |
77 | table_name: migration_versions | 77 | table_name: migration_versions |
78 | name: Application Migrations | 78 | name: Application Migrations |
diff --git a/app/config/config_dev.yml b/app/config/config_dev.yml index 3b67d8f6..0c490575 100644 --- a/app/config/config_dev.yml +++ b/app/config/config_dev.yml | |||
@@ -3,7 +3,7 @@ imports: | |||
3 | 3 | ||
4 | framework: | 4 | framework: |
5 | router: | 5 | router: |
6 | resource: "%kernel.root_dir%/config/routing_dev.yml" | 6 | resource: "%kernel.project_dir%/app/config/routing_dev.yml" |
7 | strict_requirements: true | 7 | strict_requirements: true |
8 | profiler: | 8 | profiler: |
9 | only_exceptions: false | 9 | only_exceptions: false |
diff --git a/app/config/config_prod.yml b/app/config/config_prod.yml index 65b02d66..44e29aac 100644 --- a/app/config/config_prod.yml +++ b/app/config/config_prod.yml | |||
@@ -3,7 +3,7 @@ imports: | |||
3 | 3 | ||
4 | framework: | 4 | framework: |
5 | assets: | 5 | assets: |
6 | # json_manifest_path: '%kernel.root_dir%/../web/bundles/wallabagcore/manifest.json' | 6 | # json_manifest_path: '%kernel.project_dir%/web/bundles/wallabagcore/manifest.json' |
7 | 7 | ||
8 | #doctrine: | 8 | #doctrine: |
9 | # orm: | 9 | # orm: |
diff --git a/app/config/parameters.yml.dist b/app/config/parameters.yml.dist index b3fe11c8..b5b97950 100644 --- a/app/config/parameters.yml.dist +++ b/app/config/parameters.yml.dist | |||
@@ -16,7 +16,7 @@ parameters: | |||
16 | database_name: wallabag | 16 | database_name: wallabag |
17 | database_user: root | 17 | database_user: root |
18 | database_password: ~ | 18 | database_password: ~ |
19 | # For SQLite, database_path should be "%kernel.root_dir%/../data/db/wallabag.sqlite" | 19 | # For SQLite, database_path should be "%kernel.project_dir%/data/db/wallabag.sqlite" |
20 | database_path: null | 20 | database_path: null |
21 | database_table_prefix: wallabag_ | 21 | database_table_prefix: wallabag_ |
22 | database_socket: null | 22 | database_socket: null |
diff --git a/app/config/parameters_test.yml b/app/config/parameters_test.yml index 010785e6..257d2ace 100644 --- a/app/config/parameters_test.yml +++ b/app/config/parameters_test.yml | |||
@@ -6,5 +6,5 @@ parameters: | |||
6 | test_database_user: null | 6 | test_database_user: null |
7 | test_database_password: null | 7 | test_database_password: null |
8 | test_database_path: "%env(TEST_DATABASE_PATH)%" | 8 | test_database_path: "%env(TEST_DATABASE_PATH)%" |
9 | env(TEST_DATABASE_PATH): "%kernel.root_dir%/../data/db/wallabag_test.sqlite" | 9 | env(TEST_DATABASE_PATH): "%kernel.project_dir%/data/db/wallabag_test.sqlite" |
10 | test_database_charset: utf8 | 10 | test_database_charset: utf8 |
diff --git a/app/config/tests/parameters_test.sqlite.yml b/app/config/tests/parameters_test.sqlite.yml index 5c731bf5..2b92d579 100644 --- a/app/config/tests/parameters_test.sqlite.yml +++ b/app/config/tests/parameters_test.sqlite.yml | |||
@@ -8,5 +8,5 @@ parameters: | |||
8 | # Using an environnement variable in order to avoid the error "attempt to write a readonly database" | 8 | # Using an environnement variable in order to avoid the error "attempt to write a readonly database" |
9 | # when the schema is dropped then recreate | 9 | # when the schema is dropped then recreate |
10 | test_database_path: "%env(TEST_DATABASE_PATH)%" | 10 | test_database_path: "%env(TEST_DATABASE_PATH)%" |
11 | env(TEST_DATABASE_PATH): "%kernel.root_dir%/../data/db/wallabag_test.sqlite" | 11 | env(TEST_DATABASE_PATH): "%kernel.project_dir%/data/db/wallabag_test.sqlite" |
12 | test_database_charset: utf8 | 12 | test_database_charset: utf8 |
diff --git a/app/config/wallabag.yml b/app/config/wallabag.yml index d70653ce..6b4722fc 100644 --- a/app/config/wallabag.yml +++ b/app/config/wallabag.yml | |||
@@ -27,7 +27,7 @@ wallabag_core: | |||
27 | fetching_error_message: | | 27 | fetching_error_message: | |
28 | wallabag can't retrieve contents for this article. Please <a href="http://doc.wallabag.org/en/user/errors_during_fetching.html#how-can-i-help-to-fix-that">troubleshoot this issue</a>. | 28 | wallabag can't retrieve contents for this article. Please <a href="http://doc.wallabag.org/en/user/errors_during_fetching.html#how-can-i-help-to-fix-that">troubleshoot this issue</a>. |
29 | api_limit_mass_actions: 10 | 29 | api_limit_mass_actions: 10 |
30 | encryption_key_path: "%kernel.root_dir%/../data/site-credentials-secret-key.txt" | 30 | encryption_key_path: "%kernel.project_dir%/data/site-credentials-secret-key.txt" |
31 | default_internal_settings: | 31 | default_internal_settings: |
32 | - | 32 | - |
33 | name: share_public | 33 | name: share_public |
@@ -159,4 +159,4 @@ wallabag_user: | |||
159 | 159 | ||
160 | wallabag_import: | 160 | wallabag_import: |
161 | allow_mimetypes: ['application/octet-stream', 'application/json', 'text/plain', 'text/csv'] | 161 | allow_mimetypes: ['application/octet-stream', 'application/json', 'text/plain', 'text/csv'] |
162 | resource_dir: "%kernel.root_dir%/../web/uploads/import" | 162 | resource_dir: "%kernel.project_dir%/web/uploads/import" |