Skip to content

Invalid alias definition Symfony\Contracts\Cache\NamespacedPoolInterface #61045

Open
@VincentLanglet

Description

@VincentLanglet

Symfony version(s) affected

7.3.1

Description

Since #60625, the cache.app is now enforced to implement NamespacedPoolInterface

As an example, sentry provide his own cache class
https://github.com/getsentry/sentry-symfony/blob/58bbad0c288651789154cf82d3011951a4790a3c/src/Tracing/Cache/TraceableCacheAdapterForV3.php#L19

In 7.3.0, there is no error
In 7.3.1, there is the error

Invalid alias definition: alias "Symfony\Contracts\Cache\NamespacedPoolInte
  rface" is referencing class "Sentry\SentryBundle\Tracing\Cache\TraceableCac
  heAdapter" but this class does not implement "Symfony\Contracts\Cache\Names
  pacedPoolInterface". Because this alias is an interface, "Sentry\SentryBund
  le\Tracing\Cache\TraceableCacheAdapter" must implement "Symfony\Contracts\C
  ache\NamespacedPoolInterface".

How to reproduce

https://github.com/VincentLanglet/namespace-cache/tree/main

Which can also be reproduced with

composer create-project symfony/skeleton:"7.3.*" namespace-cache
cd namespace-cache
composer require sentry/sentry-symfony
bin/console lint:container --env=prod

Possible Solution

I'm currently fixing it on sentry side, but I consider a global fix should be done on Symfony side to avoid such "BC-break".

Additional Context

No response

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

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy