Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I got error when running all "php artisan" commands #107

Open
KeldNielsen86 opened this issue Nov 16, 2022 · 5 comments
Open

I got error when running all "php artisan" commands #107

KeldNielsen86 opened this issue Nov 16, 2022 · 5 comments

Comments

@KeldNielsen86
Copy link

KeldNielsen86 commented Nov 16, 2022

root@server:/path/to/project/gitpab# php artisan key:generate


In FindCommand.php line 113:

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

root@server:/path/to/project/gitpab# php artisan migrate


In FindCommand.php line 113:

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

root@server:/path/to/project/gitpab# php artisan db:seed


In FindCommand.php line 113:

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

root@server:/path/to/project/gitpab# php artisan make:user


In FindCommand.php line 113:

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


@KeldNielsen86
Copy link
Author

KeldNielsen86 commented Nov 16, 2022

it seems that the error can be fixed by changing this file (around Line 111) - but I'm not sure if this will break something else or if it's a good solution, but it seems to be a workaround

nano /path/to/project/gitpab/vendor/themsaid/laravel-langman/src/Commands/FindCommand.php

FROM


foreach ($allLanguages as $languageKey) {
   $original[$languageKey] = isset($values[$languageKey]) ? $values[$languageKey] : isset($filesContent[$fileName][$languageKey][$key]) ? $filesContent[$fileName][$languageKey][$key] : ''; }

TO

foreach ($allLanguages as $languageKey) {
    $original[$languageKey] = (isset($values[$languageKey]) ? $values[$languageKey] : isset($filesContent[$fileName][$languageKey][$key])) ? $filesContent[$fileName][$languageKey][$key] : ''; }

@mnvx
Copy link
Contributor

mnvx commented Nov 16, 2022 via email

@mnvx
Copy link
Contributor

mnvx commented Nov 16, 2022 via email

@KeldNielsen86
Copy link
Author

ahh okay, I am using php 7.4 . :)

@KeldNielsen86
Copy link
Author

it seems that the error can be fixed by changing this file (around Line 111) - but I'm not sure if this will break something else or if it's a good solution, but it seems to be a workaround

nano /path/to/project/gitpab/vendor/themsaid/laravel-langman/src/Commands/FindCommand.php

FROM


foreach ($allLanguages as $languageKey) {
   $original[$languageKey] = isset($values[$languageKey]) ? $values[$languageKey] : isset($filesContent[$fileName][$languageKey][$key]) ? $filesContent[$fileName][$languageKey][$key] : ''; }

TO

foreach ($allLanguages as $languageKey) {
    $original[$languageKey] = (isset($values[$languageKey]) ? $values[$languageKey] : isset($filesContent[$fileName][$languageKey][$key])) ? $filesContent[$fileName][$languageKey][$key] : ''; }

the workaround works for me, so I managed to install gitpab successfully

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants