diff --git a/sources/Afup/Utils/Configuration.php b/sources/Afup/Utils/Configuration.php index 3a5d4a34b..2c5454982 100644 --- a/sources/Afup/Utils/Configuration.php +++ b/sources/Afup/Utils/Configuration.php @@ -4,8 +4,6 @@ namespace Afup\Site\Utils; -use Symfony\Component\Yaml\Yaml; - /** * Classe de gestion de la configuration */ @@ -19,7 +17,6 @@ public function __construct() return; } - $sfParameters = $this->loadSymfonyParameters(); $parameters = [ 'database_host', 'database_name', 'database_user', 'database_password', 'database_port', 'smtp_host', 'smtp_port', 'smtp_tls', 'smtp_username', 'smtp_password', @@ -31,30 +28,7 @@ public function __construct() if (false !== $value = getenv(strtoupper($param))) { self::$values[$param] = $value; } - - // override by parameter_ENV.yaml ? - if (isset($sfParameters[$param])) { - self::$values[$param] = $sfParameters[$param]; - } - } - } - - private function loadSymfonyParameters(): array - { - $parameters = []; - $basePath = __DIR__ . '/../../../app/config'; - - if (isset($_ENV['APP_ENV'])) { - $file = $basePath . '/config_' . $_ENV['APP_ENV'] . '.yml'; - if (is_file($file)) { - $values = Yaml::parseFile($file); - if (isset($values['parameters'])) { - $parameters = array_merge($parameters, $values['parameters']); - } - } } - - return $parameters; } public function obtenir($cle)