8000 [Session] session.storage.metadata_bag is non-existent for test env in 5.3 · Issue #40282 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
[Session] session.storage.metadata_bag is non-existent for test env in 5.3 #40282
Closed
@jrushlow

Description

@jrushlow

Symfony version(s) affected: main

Description
In the test environment when creating a KernelBrowser a dependency error is thrown:

Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException : The service "session.storage.mock_file" has a dependency on a non-existent service "session.storage.metadata_bag".

How to reproduce

class SomeTest extends WebTestCase
{
    public function testTest(): void
    {
        $client = self::createClient();
        self::assertInstanceOf(KernelBrowser::class, $client);
    }
}

Possible Solution
for framework.session.storage_factory_id use session.storage.factory.mock_file instead if session.storage.mock_file

Additional context
There are a dozen or so tests failing in MakerBundle partly due to this. CI Results -> https://github.com/symfony/maker-bundle/runs/1954376810?check_suite_focus=true. If we need a simple reproducer, I can whip one up based off of one of the failing maker tests.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0