Skip to content

Extension always turns off autowiring for existing cache storage #50

@jankonas

Description

@jankonas

While registering own storage(s) this extension always turns off autowiring for the existing storage (ie. FileStorage or any else):

if ($storages === 0) {
	$builder->getDefinitionByType(IStorage::class)
		->setAutowired(false);
}

When there is no default connection configured, this leaves the DI container without autowired cache storage. Shouldn't the condition be changed to:

if ($connection->storageAutowired ?? $autowired) {
	$builder->getDefinitionByType(IStorage::class)
		->setAutowired(false);
}

?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Triage: Now

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions