linuxserver / Heimdall

An Application dashboard and launcher
MIT License
7.46k stars 540 forks source link

PHP 8.3 causes error why running php artisan to add an app #1294

Closed andymarden closed 4 months ago

andymarden commented 4 months ago

Taking one of the apps from https://apps.heimdall.site/request, instructions that I could find to install (absent it seems from this page), you copy the files to SupportedApps for the app and run, from inside the docker container:

php artisan register:app

(artisan is now under /app/www in the container and not /var/www/localhost/heimdall/)

The app I downloaded was ProxmoxBackServer.

It looks like we have a php version error and the scripts need updating - the app still registers but it's rather offputting and pay omit doing something I guess (ther is only teh one example in that script - not sure about others - where ${directory} needs changing to {$directory}.

Be rather nice to have a link to how you actually install an app linked in from that page wouldn't it?

  at vendor/facade/ignition/src/SolutionProviders/MergeConflictSolutionProvider.php:52
     48▕     }
     49▕ 
     50▕     protected function getCurrentBranch(string $directory): string
     51▕     {
  ➜  52▕         $branch = "'".trim(shell_exec("cd ${directory}; git branch | grep \\* | cut -d ' ' -f2"))."'";
     53▕ 
     54▕         if ($branch === "''") {
     55▕             $branch = 'current branch';
     56▕         }
PHP Fatal error:  Uncaught Whoops\Exception\ErrorException: Using ${var} in strings is deprecated, use {$var} instead in /app/www/vendor/facade/ignition/src/SolutionProviders/MergeConflictSolutionProv
ider.php:52
Stack trace:
#0 /app/www/vendor/composer/ClassLoader.php(571): Whoops\Run->handleError()
#1 /app/www/vendor/composer/ClassLoader.php(571): include()
#2 /app/www/vendor/composer/ClassLoader.php(428): Composer\Autoload\includeFile()
#3 [internal function]: Composer\Autoload\ClassLoader->loadClass()
#4 /app/www/vendor/facade/ignition/src/SolutionProviders/SolutionProviderRepository.php(50): class_implements()
#5 [internal function]: Facade\Ignition\SolutionProviders\SolutionProviderRepository->Facade\Ignition\SolutionProviders\{closure}()
#6 /app/www/vendor/laravel/framework/src/Illuminate/Collections/Arr.php(717): array_filter()
#7 /app/www/vendor/laravel/framework/src/Illuminate/Collections/Collection.php(358): Illuminate\Support\Arr::where()
#8 /app/www/vendor/facade/ignition/src/SolutionProviders/SolutionProviderRepository.php(49): Illuminate\Support\Collection->filter()
#9 /app/www/vendor/nunomaduro/collision/src/Adapters/Laravel/IgnitionSolutionsRepository.php(36): Facade\Ignition\SolutionProviders\SolutionProviderRepository->getSolutionsForThrowable()
#10 /app/www/vendor/nunomaduro/collision/src/Writer.php(244): NunoMaduro\Collision\Adapters\Laravel\IgnitionSolutionsRepository->getFromThrowable()
#11 /app/www/vendor/nunomaduro/collision/src/Writer.php(123): NunoMaduro\Collision\Writer->renderSolution()
#12 /app/www/vendor/nunomaduro/collision/src/Handler.php(39): NunoMaduro\Collision\Writer->write()
#13 /app/www/vendor/filp/whoops/src/Whoops/Run.php(370): NunoMaduro\Collision\Handler->handle()
#14 [internal function]: Whoops\Run->handleException()
#15 {main}
  thrown in /app/www/vendor/facade/ignition/src/SolutionProviders/MergeConflictSolutionProvider.php on line 52
KodeStar commented 4 months ago

Seems fine to me, what version of the app are you using?

KodeStar commented 4 months ago

My guess is you were using a pre 2.6.0 build which didn't fully support PHP 8.3, v2.6.0 updated the underlying framework from Laravel 8 to 10. Feel free to re-open if that's not the case.