Open
Description
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