Skip to content

[5.4 beta2] Functional tests, problem with the DI container #44062

Closed
@COil

Description

@COil

Symfony version(s) affected

5.4.0 beta2

Description

I've got this error when runnig my test locally, I am sure it comes from beta2 because it was Ok with beta1. If I revert the beta2 commit and I run composer install, the error goes away :

PHPUnit 9.5.10 by Sebastian Bergmann and contributors.

Testing
.PHP Fatal error:  Cannot declare class ContainerE3dHZO7\EntityManager_9a5be93, because the name is already in use in /strangebuzz.com/var/cache/test/ContainerE3dHZO7/proxy-classes.php on line 9

Fatal error: Cannot declare class ContainerE3dHZO7\EntityManager_9a5be93, because the name is already in use in /strangebuzz.com/var/cache/test/ContainerE3dHZO7/proxy-classes.php on line 9

Remaining indirect deprecation notices (119)
Symfony\Component\ErrorHandler\Error\FatalError^ {#7
  -error: array:4 [
    "type" => 64
    "message" => "Cannot declare class ContainerE3dHZO7\EntityManager_9a5be93, because the name is already in use"
    "file" => "/strangebuzz.com/var/cache/test/ContainerE3dHZO7/proxy-classes.php"
    "line" => 9
  ]
  #message: "Compile Error: Cannot declare class ContainerE3dHZO7\EntityManager_9a5be93, because the name is already in use"
  #code: 0
  #file: "./var/cache/test/ContainerE3dHZO7/proxy-classes.php"
  #line: 9
}
make: *** [test] Error 255

How to reproduce

./vendor/bin/phpunit --testsuite='main' --filter='.' --stop-on-failure

Possible Solution

No response

Additional Context

All was OK with 5.4 beta1.
Site seems OK in other environments.

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