antonioribeiro / health

Laravel Health Panel
BSD 3-Clause "New" or "Revised" License
1.94k stars 198 forks source link

Laravel 5.8: syntax error, unexpected '=>' (T_DOUBLE_ARROW), expecting ',' or ')' #260

Open naowas opened 2 years ago

naowas commented 2 years ago

Unable to hit route www.domain.com/health/check or artisan command health:panel

Issue occurring on \vendor\pragmarx\health\src\Checkers\Extensions.php

$alerts = $needed->reject(fn ($value) => $installed->contains($value));

Laravel version: 5.8 PHP: 7.2.3

lintaba commented 2 years ago

fn (arrow functions ) are introduced in PHP 7.4. Either the composers.json's minimum php version should be bumped to 7.4, or it should be replaced with the long version. I'd vote for the second option, so made a PR: https://github.com/antonioribeiro/health/pull/265