You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Am developing a package and I need to support people still using lower Laravel versions.
But I run into this error;
PHP Warning: count(): Parameter must be an array or an object that implements Countable in C:\xampp\htdocs\laravel-53\vendor\laravel\framework\src\Illuminate\Database\Eloquent\Builder.php on line 1231
Note: I understand this issue was resolved for PHP 7.2 #22858 and #20258 but is there a fix or workaround for lower PHP versions..!?
Upgrading to PHP 7.1 is impossible because different package users can opt for the lowest support PHP version.
I can't help you out for 5.3 & 5.4 since we don't support those anymore, sorry. Are you absolutely sure you're experiencing this on 5.5 as well? Because it seems to me that the prs you're linking to indicate that the problems were fixed for 5.5.
Description:
Am developing a package and I need to support people still using lower Laravel versions.
But I run into this error;
PHP Warning: count(): Parameter must be an array or an object that implements Countable in C:\xampp\htdocs\laravel-53\vendor\laravel\framework\src\Illuminate\Database\Eloquent\Builder.php on line 1231
Note: I understand this issue was resolved for PHP 7.2 #22858 and #20258 but is there a fix or workaround for lower PHP versions..!?
Upgrading to PHP 7.1 is impossible because different package users can opt for the lowest support PHP version.
Is there a way to override (in my model);
callScope()
forgetDeletedAtColumn()
is already fixed.Steps To Reproduce:
Simply fix your PHP version to the lowest acceptable.
App\User::count();
The text was updated successfully, but these errors were encountered: