samedi 22 août 2020

Call to a member function isdeferred() on null

it gives me this problem on this "deferred" part. Can you help me? I'm new.

I wrote the whole code again. Can you help this time? Thank you.

       class ProviderRepository


protected function compileManifest($providers)
{

    $manifest = $this->freshManifest($providers);

    foreach ($providers as $provider) {
        $instance = $this->createProvider($provider);

   //The problem starts right on this line! (deferred)

 if ($instance->isdeferred()) {
            foreach ($instance->provides() as $service) {
                $manifest['deferred'][$service] = $provider;
            }

            $manifest['when'][$provider] = $instance->when();
        }

        
        else {
            $manifest['eager'][] = $provider;
        }
    }

    return $this->writeManifest($manifest);
}


via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire