Skip to content

Conversation

@c-v-c-v
Copy link
Contributor

@c-v-c-v c-v-c-v commented Jul 2, 2024

Although this may not seem common, it is very covert for facade Log, as shown in the following code

class Service extends BaseService
{
    public function __construct(
        private readonly LoggerInterface $logger,
    ) {}
}

$this->app->when(Service::class)
            ->needs(LoggerInterface::class)
            ->give(function () {
                return Log::channel('test');
            });

The following examples in the documentation seem to be OK, probably without nested make. contextual-binding

@c-v-c-v c-v-c-v changed the title Fix using container nesting to make the same 'abstract' in different … Fix using container nesting to make the same 'abstract' in different context Jul 2, 2024
@driesvints driesvints changed the title Fix using container nesting to make the same 'abstract' in different context [11.x] Fix using container nesting to make the same 'abstract' in different context Jul 2, 2024
@taylorotwell taylorotwell merged commit 8d20a9c into laravel:11.x Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants