Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[FrameworkBundle][Cache] cache:pool:list are missing pools #35030

Copy link
Copy link
Closed
@alex-dev

Description

@alex-dev
Issue body actions

Symfony version(s) affected: 4.3 and up (#31021)

Description
Caches are not all reported by cache:pool:list. Ensuring there is at least two caches in separate clearers will trigger the bug.

Origin
Code from: https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Cache/DependencyInjection/CachePoolPass.php
Out of context code has been removed to simplify my point.

$pools = [];
$clearers = [];

// Fill out $pools and $clearers;

foreach ($clearers as $id => $pools) {
    // $pools will be leaked out of the scope;
    // Hopefully unintended behavior;
}

if ($container->hasDefinition('console.command.cache_pool_list')) {
    $container->getDefinition('console.command.cache_pool_list')->replaceArgument(0, array_keys($pools));
}

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

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.