m2install icon indicating copy to clipboard operation
m2install copied to clipboard

The updateMagentoEnvFile() generates an empty env.php file

Open yyevgenii opened this issue 5 years ago • 1 comments

There's a bug in the updateMagentoEnvFile(). It generates and executed a PHP code which throws the error:

PHP Warning:  Class 'Tightenco\Collect\Support\Arr' not found in vendor/tightenco/collect/src/Collect/Support/alias.php on line 16
PHP Parse error:  syntax error, unexpected '=' in vendor/tightenco/collect/src/Collect/Support/Arr.php on line 388

As a result a generated env.php is empty.

yyevgenii avatar May 02 '19 20:05 yyevgenii

It looks like the error appear because tightenco/collect requires PHP 7.1. But if I change the updateMagentoEnvFile() in the way to use PHP 7.1 instead of 7.0 I'm getting other errors:

PHP Warning:  Invalid argument supplied for foreach() in - on line 58
PHP Warning:  Cannot use a scalar value as an array in - on line 41
PHP Warning:  Cannot use a scalar value as an array in - on line 16
PHP Warning:  Cannot use a scalar value as an array in - on line 10

yyevgenii avatar May 02 '19 20:05 yyevgenii