Dec 13, 2023
0
Level 3
Laravel 10 upgrade error in AuthServiceProvider.php
I am trying to upgrade my Laravel application from 9 to 10, but I encounter this error. This is coming when the composer install.
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover
In AuthServiceProvider.php line 36:
foreach() argument must be of type array|object, null given
Script @php artisan package:discover handling the post-autoload-dump event returned with error code 1
So this is came from AuthorizeServiceProvider same as AuthServiceProvider;
public function boot()
{
$this->policies = $this->getEntityPolicyBindings();
$this->policies[SubscriptionData::class] = SubscriptionIndexPolicy::class;
$this->policies[SubscriptionAddOnData::class] = SubscriptionIndexPolicy::class;
//$this->registerPolicies();
}
How we fix this?
Please or to participate in this conversation.