Skip to content

[DependencyInjection] CheckTypeDeclarationsPass does not validate deprecated services (in lint:container) #43263

@simonberger

Description

@simonberger

Symfony version(s) affected: 4.4, 5.3

In this bug report I mean the usage of the pass in the lint:container usage. I am not aware of other usages.
When calling lint:container it won't report broken services that are marked as deprecated.

If the service is deprecated it calls the parent processValue function and with this skips the validation.

if (!$value instanceof Definition || $value->hasErrors() || $value->isDeprecated()) {
    return parent::processValue($value, $isRoot);
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions