diff --git a/.github/ISSUE_TEMPLATE/2-bug-report.md b/.github/ISSUE_TEMPLATE/2-bug-report.md
index 70705d61a..bcbc1b827 100644
--- a/.github/ISSUE_TEMPLATE/2-bug-report.md
+++ b/.github/ISSUE_TEMPLATE/2-bug-report.md
@@ -17,7 +17,7 @@ Installation: How did you install wallabag? Using git clone, the docker image, a
PHP version: The version of PHP you are using
OS: The host running wallabag
Database: The storage system your instance is using (SQLite, MySQL/MariaDB or PostgreSQL) with the version
-Parameters: Paste the content of your app/config/parameters.yml (hide sensitive stuff if you want)
+Parameters: Put the content of your environment variables (hide sensitive stuff if you want)
-->
### Environment
@@ -29,10 +29,37 @@ Parameters: Paste the content of your app/config/parameters.yml (hide sensitiv
* **Parameters**:
- My app/config/parameters.yml
is:
+ My environment variables are:
```
- PASTE HERE
+ LOCALE=
+
+ # Make sure to hide username and password below, if any
+ DATABASE_URL=
+ DATABASE_TABLE_PREFIX=
+
+ FOSUSER_REGISTRATION=
+ FOSUSER_CONFIRMATION=
+
+ FOS_OAUTH_SERVER_ACCESS_TOKEN_LIFETIME=
+ FOS_OAUTH_SERVER_REFRESH_TOKEN_LIFETIME=
+ TWOFACTOR_SENDER=
+
+ # Make sure to hide username and password below, if any
+ MAILER_DSN=
+ FROM_EMAIL=
+
+ RABBITMQ_HOST=
+ RABBITMQ_PORT=
+
+ REDIS_SCHEME=
+ REDIS_HOST=
+ REDIS_PORT=
+ REDIS_PATH=
+ RABBITMQ_PREFETCH_COUNT=
+
+ # Make sure to hide username and password below, if any
+ SENTRY_DSN=
```
diff --git a/.github/workflows/coding-standards.yml b/.github/workflows/coding-standards.yml
index cf6a0f5dd..3b4571433 100644
--- a/.github/workflows/coding-standards.yml
+++ b/.github/workflows/coding-standards.yml
@@ -40,7 +40,7 @@ jobs:
run: |
sudo systemctl start mysql.service
sudo mysql -u root -proot -h 127.0.0.1 -e "CREATE DATABASE wallabag_test"
- cp app/config/tests/parameters_test.mysql.yml app/config/parameters_test.yml
+ cp app/config/tests/.env.mysql .env.test.local
- name: "Install dependencies with Composer"
id: composer-install
diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml
index 67c50c8cf..83f1aa380 100644
--- a/.github/workflows/continuous-integration.yml
+++ b/.github/workflows/continuous-integration.yml
@@ -89,7 +89,7 @@ jobs:
run: yarn build:dev
- name: "Prepare database configuration"
- run: cp app/config/tests/parameters_test.${{ matrix.database }}.yml app/config/parameters_test.yml
+ run: cp app/config/tests/.env.${{ matrix.database }} .env.test.local
- name: "Run PHPUnit"
run: "php bin/phpunit -v"
@@ -140,8 +140,7 @@ jobs:
- name: "Remove database prefix"
run: |
- pip install --user yq
- yq -Y --in-place '.parameters.database_table_prefix = ""' app/config/parameters.yml.dist
+ sed -i 's/DATABASE_TABLE_PREFIX=wallabag_/DATABASE_TABLE_PREFIX=/' .env
- name: "Setup MySQL"
if: "${{ matrix.database == 'mysql' }}"
@@ -169,7 +168,7 @@ jobs:
run: yarn build:dev
- name: "Prepare database configuration"
- run: cp app/config/tests/parameters_test.${{ matrix.database }}.yml app/config/parameters_test.yml
+ run: cp app/config/tests/.env.${{ matrix.database }} .env.test.local
- name: "Run PHPUnit"
run: "php bin/phpunit -v"
@@ -235,7 +234,7 @@ jobs:
run: yarn build:dev
- name: "Prepare database configuration"
- run: cp app/config/tests/parameters_test.${{ matrix.database }}.yml app/config/parameters_test.yml
+ run: cp app/config/tests/.env.${{ matrix.database }} .env.test.local
- name: "Run PHPUnit"
run: "php bin/phpunit -v"
diff --git a/.gitignore b/.gitignore
index b8f1c6f8f..41c2a8ad1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -17,9 +17,6 @@
phpunit.xml
compose.override.yaml
-# Parameters
-/app/config/parameters.yml
-
# Managed by Composer
/vendor/
diff --git a/app/config/config_test.yml b/app/config/config_test.yml
index 20b92f01f..a9bb06a65 100644
--- a/app/config/config_test.yml
+++ b/app/config/config_test.yml
@@ -1,11 +1,11 @@
imports:
- { resource: config_dev.yml }
- - { resource: parameters_test.yml }
- { resource: services_test.yml }
parameters:
fosuser_registration: true
wallabag_dbname_suffix: '_test'
+ database_url: '%env(resolve:DATABASE_URL)%'
domain_name: '%env(DOMAIN_NAME)%'
framework:
diff --git a/app/config/parameters.yml.dist b/app/config/parameters.yml.dist
deleted file mode 100644
index db23ba4d6..000000000
--- a/app/config/parameters.yml.dist
+++ /dev/null
@@ -1,65 +0,0 @@
-# This file is a "template" of what your parameters.yml file should look like
-parameters:
- # Uncomment these settings or manually update your parameters.yml
- # to use Docker Compose
- #
- # database_driver: %env.database_driver%
- # database_host: %env.database_host%
- # database_port: %env.database_port%
- # database_name: %env.database_name%
- # database_user: %env.database_user%
- # database_password: %env.database_password%
-
- database_driver: pdo_mysql
- database_host: 127.0.0.1
- database_port: ~
- database_name: wallabag
- database_user: root
- database_password: ~
- # For SQLite, database_path should be "%kernel.project_dir%/data/db/wallabag.sqlite"
- database_path: null
- database_table_prefix: wallabag_
- database_socket: null
- # with PostgreSQL and SQLite, you must set "utf8"
- database_charset: utf8mb4
-
- domain_name: https://your-wallabag-instance.wallabag.org
- server_name: "Your wallabag instance"
-
- mailer_dsn: smtp://127.0.0.1
-
- locale: en
-
- # A secret key that's used to generate certain security-related tokens
- secret: CHANGE_ME_TO_SOMETHING_SECRET_AND_RANDOM
-
- # two factor stuff
- twofactor_sender: no-reply@wallabag.org
-
- # fosuser stuff
- fosuser_registration: false
- fosuser_confirmation: true
-
- # how long the access token should live in seconds for the API
- fos_oauth_server_access_token_lifetime: 3600
- # how long the refresh token should life in seconds for the API
- fos_oauth_server_refresh_token_lifetime: 1209600
-
- from_email: no-reply@wallabag.org
-
- # RabbitMQ processing
- rabbitmq_host: localhost
- rabbitmq_port: 5672
- rabbitmq_user: guest
- rabbitmq_password: guest
- rabbitmq_prefetch_count: 10
-
- # Redis processing
- redis_scheme: tcp
- redis_host: localhost
- redis_port: 6379
- redis_path: null
- redis_password: null
-
- # sentry logging
- sentry_dsn: ~
diff --git a/app/config/parameters_test.yml b/app/config/parameters_test.yml
deleted file mode 100644
index 9f9f812a2..000000000
--- a/app/config/parameters_test.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-parameters:
- database_path: "%kernel.project_dir%/data/db/wallabag%wallabag_dbname_suffix%.sqlite"
- database_url: '%env(resolve:DATABASE_URL)%'
- domain_name: '%env(DOMAIN_NAME)%'
diff --git a/app/config/tests/.env.mysql b/app/config/tests/.env.mysql
new file mode 100644
index 000000000..742ef5bbc
--- /dev/null
+++ b/app/config/tests/.env.mysql
@@ -0,0 +1 @@
+DATABASE_URL=mysql://root:root@127.0.0.1:3306/wallabag?charset=utf8mb4
diff --git a/app/config/tests/.env.pgsql b/app/config/tests/.env.pgsql
new file mode 100644
index 000000000..d7a3a0f8b
--- /dev/null
+++ b/app/config/tests/.env.pgsql
@@ -0,0 +1 @@
+DATABASE_URL=postgres://wallabag:wallabagrocks@localhost/wallabag?charset=utf8
diff --git a/app/config/tests/.env.sqlite b/app/config/tests/.env.sqlite
new file mode 100644
index 000000000..12f18d778
--- /dev/null
+++ b/app/config/tests/.env.sqlite
@@ -0,0 +1 @@
+DATABASE_URL=sqlite:///%kernel.project_dir%/data/db/wallabag%wallabag_dbname_suffix%.sqlite?charset=utf8
diff --git a/app/config/tests/parameters_test.mysql.yml b/app/config/tests/parameters_test.mysql.yml
deleted file mode 100644
index 3e825114d..000000000
--- a/app/config/tests/parameters_test.mysql.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-parameters:
- env(DATABASE_URL): mysql://root:root@127.0.0.1:3306/wallabag?charset=utf8mb4
- database_url: '%env(resolve:DATABASE_URL)%'
- domain_name: '%env(DOMAIN_NAME)%'
diff --git a/app/config/tests/parameters_test.pgsql.yml b/app/config/tests/parameters_test.pgsql.yml
deleted file mode 100644
index 0bf594828..000000000
--- a/app/config/tests/parameters_test.pgsql.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-parameters:
- env(DATABASE_URL): postgres://wallabag:wallabagrocks@localhost/wallabag?charset=utf8
- database_url: '%env(resolve:DATABASE_URL)%'
- domain_name: '%env(DOMAIN_NAME)%'
diff --git a/app/config/tests/parameters_test.sqlite.yml b/app/config/tests/parameters_test.sqlite.yml
deleted file mode 100644
index 5b1b89787..000000000
--- a/app/config/tests/parameters_test.sqlite.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-parameters:
- env(DATABASE_URL): sqlite:///%kernel.project_dir%/data/db/wallabag%wallabag_dbname_suffix%.sqlite?charset=utf8
- database_url: '%env(resolve:DATABASE_URL)%'
- domain_name: '%env(DOMAIN_NAME)%'
diff --git a/composer-dependency-analyser.php b/composer-dependency-analyser.php
index a83b8247d..5199c8ee8 100644
--- a/composer-dependency-analyser.php
+++ b/composer-dependency-analyser.php
@@ -21,7 +21,6 @@ $config
'ergebnis/composer-normalize',
'friendsofphp/php-cs-fixer',
'friendsoftwig/twigcs',
- 'incenteev/composer-parameter-handler',
'j0k3r/graby-site-config',
'laminas/laminas-code',
'lcobucci/jwt',
diff --git a/composer.json b/composer.json
index c681991ee..a0fb18610 100644
--- a/composer.json
+++ b/composer.json
@@ -77,7 +77,6 @@
"friendsofsymfony/user-bundle": "^3.2.1",
"guzzlehttp/psr7": "^2.6.2",
"html2text/html2text": "^4.3.1",
- "incenteev/composer-parameter-handler": "^2.2",
"j0k3r/graby": "^2.4.5",
"j0k3r/graby-site-config": "^1.0",
"javibravo/simpleue": "^2.1",
@@ -223,9 +222,6 @@
"sort-packages": true
},
"extra": {
- "incenteev-parameters": {
- "file": "app/config/parameters.yml"
- },
"public-dir": "web",
"symfony": {
"allow-contrib": true,
@@ -240,7 +236,6 @@
"@post-cmd"
],
"post-cmd": [
- "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
"bin/console cache:clear --no-warmup",
"bin/console assets:install web --symlink --relative"
]
diff --git a/composer.lock b/composer.lock
index 786c81fd3..f77445ba9 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "275616311733b2f623c48eda835def87",
+ "content-hash": "14496bc12cd56950bd548fb244a8c769",
"packages": [
{
"name": "babdev/pagerfanta-bundle",
@@ -4159,63 +4159,6 @@
},
"time": "2021-07-21T13:50:14+00:00"
},
- {
- "name": "incenteev/composer-parameter-handler",
- "version": "v2.2.0",
- "source": {
- "type": "git",
- "url": "https://github.com/Incenteev/ParameterHandler.git",
- "reference": "90bffce926e96b365579a2ef024aab457f4b80c5"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/Incenteev/ParameterHandler/zipball/90bffce926e96b365579a2ef024aab457f4b80c5",
- "reference": "90bffce926e96b365579a2ef024aab457f4b80c5",
- "shasum": ""
- },
- "require": {
- "php": ">=7.4",
- "symfony/yaml": "^5.4 || ^6.0 || ^7.0"
- },
- "require-dev": {
- "composer/composer": "^2.0@dev",
- "phpspec/prophecy-phpunit": "^2.1",
- "phpunit/phpunit": "^9.6",
- "symfony/filesystem": "^5.4 || ^6.0 || ^7.0",
- "symfony/phpunit-bridge": "^6.4.1 || ^7.0.1"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "2.x-dev"
- }
- },
- "autoload": {
- "psr-4": {
- "Incenteev\\ParameterHandler\\": ""
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Christophe Coevoet",
- "email": "stof@notk.org"
- }
- ],
- "description": "Composer script handling your ignored parameter file",
- "homepage": "https://github.com/Incenteev/ParameterHandler",
- "keywords": [
- "parameters management"
- ],
- "support": {
- "issues": "https://github.com/Incenteev/ParameterHandler/issues",
- "source": "https://github.com/Incenteev/ParameterHandler/tree/v2.2.0"
- },
- "time": "2023-12-09T10:31:14+00:00"
- },
{
"name": "j0k3r/graby",
"version": "2.4.5",
diff --git a/docker/php/config/parameters.yml b/docker/php/config/parameters.yml
deleted file mode 100644
index 249a0258d..000000000
--- a/docker/php/config/parameters.yml
+++ /dev/null
@@ -1,50 +0,0 @@
-parameters:
- database_driver: ${DATABASE_DRIVER:-pdo_sqlite}
- database_host: ${DATABASE_HOST:-127.0.0.1}
- database_port: ${DATABASE_PORT:-~}
- database_name: ${DATABASE_NAME:-symfony}
- database_user: ${DATABASE_USER:-root}
- database_password: ${DATABASE_PASSWORD:-~}
- database_path: ${DATABASE_PATH:-"%kernel.project_dir%/data/db/wallabag.sqlite"}
- database_table_prefix: ${DATABASE_TABLE_PREFIX:-wallabag_}
- database_socket: ${DATABASE_SOCKET:-~}
- database_charset: ${DATABASE_CHARSET:-utf8}
-
- domain_name: ${DOMAIN_NAME:-https://www.example.com}
- server_name: ${SERVER_NAME:-"Your wallabag instance"}
-
- mailer_dsn: ${MAILER_DSN:-"smtp://127.0.0.1"}
-
- locale: ${LOCALE:-en}
-
- # A secret key that's used to generate certain security-related tokens
- secret: ${SECRET:-~}
-
- # two factor stuff
- twofactor_sender: ${TWOFACTOR_SENDER:-no-reply@wallabag.org}
-
- # fosuser stuff
- fosuser_registration: ${FOSUSER_REGISTRATION:-false}
- fosuser_confirmation: ${FOSUSER_CONFIRMATION:-true}
-
- fos_oauth_server_access_token_lifetime: ${FOS_OAUTH_SERVER_ACCESS_TOKEN_LIFETIME:-3600}
- fos_oauth_server_refresh_token_lifetime: ${FOS_OAUTH_SERVER_REFRESH_TOKEN_LIFETIME:-1209600}
-
- from_email: ${FROM_EMAIL:-wallabag@example.com}
-
- # RabbitMQ processing
- rabbitmq_host: ${RABBITMQ_HOST:-rabbitmq}
- rabbitmq_port: ${RABBITMQ_PORT:-5672}
- rabbitmq_user: ${RABBITMQ_USER:-guest}
- rabbitmq_password: ${RABBITMQ_PASSWORD:-guest}
- rabbitmq_prefetch_count: ${RABBITMQ_PREFETCH_COUNT:-10}
-
- # Redis processing
- redis_scheme: ${REDIS_SCHEME:-tcp}
- redis_host: ${REDIS_HOST:-redis}
- redis_port: ${REDIS_PORT:-6379}
- redis_path: ${REDIS_PATH:-~}
- redis_password: ${REDIS_PASSWORD:-~}
-
- # Sentry
- sentry_dsn: ${SENTRY_DSN:-~}
diff --git a/docker/php/entrypoint.sh b/docker/php/entrypoint.sh
index e147ed311..038954fda 100755
--- a/docker/php/entrypoint.sh
+++ b/docker/php/entrypoint.sh
@@ -1,6 +1,5 @@
#!/bin/sh
envsubst < /opt/wallabag/config/wallabag-php.ini > /usr/local/etc/php/conf.d/wallabag-php.ini
-envsubst < /opt/wallabag/config/parameters.yml > /var/www/html/app/config/parameters.yml
exec "$@"
diff --git a/docker/php/env.example b/docker/php/env.example
index 70319de03..7b09edb02 100644
--- a/docker/php/env.example
+++ b/docker/php/env.example
@@ -1,5 +1,3 @@
-DOMAIN_NAME=http://localhost:8000
-SECRET=ch4n63m31fy0uc4n
PHP_SESSION_SAVE_PATH=tcp://redis:6379?database=2
PHP_SESSION_HANDLER=redis
TRUSTED_PROXIES=0.0.0.0/0
diff --git a/templates/Static/about.html.twig b/templates/Static/about.html.twig
index 02805405b..399d00876 100644
--- a/templates/Static/about.html.twig
+++ b/templates/Static/about.html.twig
@@ -100,7 +100,6 @@
hoa/visitor | BSD-3-Clause |
hoa/zformat | BSD-3-Clause |
htmlawed/htmlawed | GPL-2.0+ or LGPL-3.0 |
- incenteev/composer-parameter-handler | MIT |
j0k3r/graby | MIT |
j0k3r/graby-site-config | Public domain |
j0k3r/php-readability | Apache-2.0 |