zanysoft / laravel-zip

MIT License
300 stars 95 forks source link

ErrorException : Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)` #21

Closed atifjkhan closed 4 years ago

atifjkhan commented 4 years ago

when i run php artisan serve

ErrorException : Unparenthesized a ? b : c ? d : e is deprecated. Use either (a ? b : c) ? d : e or a ? b : (c ? d : e)

at C:\Users\Atif\Desktop\Multi Restaurants Laravel App\vendor\themsaid\laravel-langman\src\Commands\FindCommand.php:113 109| $original = []; 110| 111| foreach ($allLanguages as $languageKey) { 112| $original[$languageKey] = 114| ? $values[$languageKey] 115| : isset($filesContent[$fileName][$languageKey][$key]) ? $filesContent[$fileName][$languageKey][$key] : ''; 116| } 117|

Exception trace:

1 Illuminate\Foundation\Bootstrap\HandleExceptions::handleError("Unparenthesized a ? b : c ? d : e is deprecated. Use either (a ? b : c) ? d : e or `a ? b :staurants Laravel App\vendor\composer/../themsaid/laravel-langman/src/Commands/FindCommand.php"]) C:\Users\Atif\Desktop\Multi Restaurants Laravel App\vendor\composer\ClassLoader.php:444

2 include() C:\Users\Atif\Desktop\Multi Restaurants Laravel App\vendor\composer\ClassLoader.php:444

Please use the argument -v to see more details. PS C:\Users\Atif\Desktop\Multi Restaurants Laravel App> -v PS C:\Users\Atif\Desktop\Multi Restaurants Laravel App> php artisan migrate

ErrorException : Unparenthesized a ? b : c ? d : e is deprecated. Use either (a ? b : c) ? d : e or a ? b : (c ? d : e)

at C:\Users\Atif\Desktop\Multi Restaurants Laravel App\vendor\themsaid\laravel-langman\src\Commands\FindCommand.php:113 109| $original = []; 110| 111| foreach ($allLanguages as $languageKey) { 112| $original[$languageKey] =

113| isset($values[$languageKey]) 114| ? $values[$languageKey] 115| : isset($filesContent[$fileName][$languageKey][$key]) ? $filesContent[$fileName][$languageKey][$key] : ''; 116| } 117|

Exception trace:

1 Illuminate\Foundation\Bootstrap\HandleExceptions::handleError("Unparenthesized a ? b : c ? d : e is deprecated. Use either (a ? b : c) ? d : e or a ? b : (c ? d : e)", "C:\Users\Atif\Desktop\Multi Restaurants Laravel App\vendor\themsaid\laravel-langman\src\Commands\FindCommand.php", ["C:\Users\Atif\Desktop\Multi Restaurants Laravel App\vendor\composer/../themsaid/laravel-langman/src/Commands/FindCommand.php"]) C:\Users\Atif\Desktop\Multi Restaurants Laravel App\vendor\composer\ClassLoader.php:444

2 include() C:\Users\Atif\Desktop\Multi Restaurants Laravel App\vendor\composer\ClassLoader.php:444

Please use the argument -v to see more details.

MarosMincak commented 4 years ago

Have you tried this as suggested mohamedFatehy? replace this line (line 405) to $files = (is_array($files) ? $files : is_string($files)) ? [$files]: $files;

Or try to downgrade PHP version to 7.3

Although the first option works for me but there appears another error with no such file.

remcom commented 4 years ago

duplicate of bug #16 Check there for your solution