diff --git a/configs/application/config-test.php b/configs/application/config-test.php index 73e9068b3..ca509720e 100644 --- a/configs/application/config-test.php +++ b/configs/application/config-test.php @@ -59,3 +59,4 @@ $configuration['sympa']['directory']='http://127.0.0.1/sympa.php'; $configuration['sympa']['config_url']='http://127.0.0.1/sympa.php'; $configuration['sympa']['host'] = 'old.afup.org'; +return $configuration; \ No newline at end of file diff --git a/configs/application/config.php.dist b/configs/application/config.php.dist index ca8c30c7b..6501fcb48 100644 --- a/configs/application/config.php.dist +++ b/configs/application/config.php.dist @@ -59,3 +59,4 @@ $configuration['sympa']['mot_de_passe']='sympa'; $configuration['sympa']['directory']='http://127.0.0.1/sympa.php'; $configuration['sympa']['config_url']='http://127.0.0.1/sympa.php'; $configuration['sympa']['host'] = 'old.afup.org'; +return $configuration; \ No newline at end of file diff --git a/configs/application/config.php.dist-docker b/configs/application/config.php.dist-docker index afca62992..e95ac91fa 100644 --- a/configs/application/config.php.dist-docker +++ b/configs/application/config.php.dist-docker @@ -59,3 +59,4 @@ $configuration['sympa']['mot_de_passe']='sympa'; $configuration['sympa']['directory']='http://127.0.0.1/sympa.php'; $configuration['sympa']['config_url']='http://127.0.0.1/sympa.php'; $configuration['sympa']['host'] = 'old.afup.org'; +return $configuration; \ No newline at end of file diff --git a/phpstan.neon b/phpstan.neon index 37677585e..28b5ee87e 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -16,12 +16,3 @@ parameters: - sources/AppBundle/Twig/TwigExtension.php # Ce fichier est impossible à analyser, des variables globales, du eval, etc. - sources/Afup/Utils/Configuration.php - ignoreErrors: - # Variable globale - - - message: '#Undefined variable: \$configuration#' - path: sources/Afup/Utils/SymfonyKernel.php - # Variable globale - - - message: '#Undefined variable: \$smarty#' - path: sources/AppBundle/Controller/LegacyController.php diff --git a/sources/Afup/Utils/SymfonyKernel.php b/sources/Afup/Utils/SymfonyKernel.php index 6ed8e39b5..ef958771d 100644 --- a/sources/Afup/Utils/SymfonyKernel.php +++ b/sources/Afup/Utils/SymfonyKernel.php @@ -44,9 +44,7 @@ public function __construct(Request $request = null) private function getLegacyConfig() { // $configuration comes from this file - include(__DIR__ . '/../../../configs/application/config.php'); - - return $configuration; + return include(__DIR__ . '/../../../configs/application/config.php'); } /**