@@ -33,21 +33,11 @@ class ScriptHandler
3333 */
3434 const ROUTES_CONFIGURATION_FILE = '/config/routing_modules.yml ' ;
3535
36- /**
37- * @var string
38- */
39- const PARAMETERS_CONFIGURATION_FILE = '/config/parameters.yml ' ;
40-
4136 /**
4237 * @var string
4338 */
4439 const GENERAL_CONFIGURATION_FILE = '/config/config_modules.yml ' ;
4540
46- /**
47- * @var string
48- */
49- const PARAMETERS_TEMPLATE_FILE = '/config/parameters.yml.dist ' ;
50-
5141 /**
5242 * @var string
5343 */
@@ -274,24 +264,6 @@ public static function clearAllCaches():void
274264 $ fileSystem ->remove (self ::getApplicationRoot () . '/var/cache ' );
275265 }
276266
277- /**
278- * Creates config/parameters.yml (the parameters configuration file).
279- *
280- * @return void
281- */
282- public static function createParametersConfiguration (): void
283- {
284- $ configurationFilePath = self ::getApplicationRoot () . self ::PARAMETERS_CONFIGURATION_FILE ;
285- if (file_exists ($ configurationFilePath )) {
286- return ;
287- }
288-
289- $ templateFilePath = __DIR__ . '/../.. ' . static ::PARAMETERS_TEMPLATE_FILE ;
290- $ configuration = file_get_contents ($ templateFilePath );
291-
292- self ::createAndWriteFile ($ configurationFilePath , $ configuration );
293- }
294-
295267 /**
296268 * Creates the .env file (the environment variables consumed by the parameters configuration)
297269 * by copying it from .env.dist, generating a fresh app secret in the process.
@@ -301,11 +273,13 @@ public static function createParametersConfiguration(): void
301273 public static function createDotenvConfiguration (): void
302274 {
303275 $ dotenvFilePath = self ::getApplicationRoot () . self ::DOTENV_FILE ;
276+ $ templateFilePath = __DIR__ . '/../.. ' . static ::DOTENV_TEMPLATE_FILE ;
277+
304278 if (file_exists ($ dotenvFilePath )) {
279+ copy ($ dotenvFilePath , $ templateFilePath );
305280 return ;
306281 }
307282
308- $ templateFilePath = __DIR__ . '/../.. ' . static ::DOTENV_TEMPLATE_FILE ;
309283 $ template = file_get_contents ($ templateFilePath );
310284
311285 $ secret = bin2hex (random_bytes (20 ));
0 commit comments