-
-
Notifications
You must be signed in to change notification settings - Fork 454
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix compatibility layer for cache services #1352
Conversation
f366db2
to
1b9bcd1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also UPGRADE-2.4.md should be updated
I'll make another attempt at auto-detecting this using a compiler pass...tomorrow 😉 |
I've pushed a commit which fixes this via compiler pass instead. Would be great if you guys would review & test this, so that we can merge this and release 2.4 soon. |
e1e67a0
to
91cec75
Compare
bccc1c7
to
b8e0ac3
Compare
@ostrolucky I just tested it and it works nicely except for one case I tried this config using a doctrine/cache service for metadata caching orm:
default_entity_manager: default
entity_managers:
default:
metadata_cache_driver:
type: service
id: my.doctrine.cache this works fine for debug cases but fails for no-debug (when the PhpArrayAdapter is used):
|
Same error for me as @dmaicher when running Output:PHP Fatal error: Uncaught TypeError: Argument 2 passed to Symfony\Component\Cache\Adapter\PhpArrayAdapter::__construct() must implement interface Symfony\Component\Cache\Adapter\AdapterInterface, instance of Symfony\Component\Cache\DoctrineProvider given, called in /Users/me/Documents/Sulu/sulu-develop.localhost/vendor/sulu/sulu/var/cache/admin/prod/ContainerKCQGinW/App_KernelProdContainer.php on line 886 and defined in /Users/me/Documents/Sulu/sulu-develop.localhost/vendor/sulu/sulu/vendor/symfony/cache/Adapter/PhpArrayAdapter.php:48
Stack trace:
#0 /Users/me/Documents/Sulu/sulu-develop.localhost/vendor/sulu/sulu/var/cache/admin/prod/ContainerKCQGinW/App_KernelProdContainer.php(886): Symfony\Component\Cache\Adapter\PhpArrayAdapter->__construct('/Users/me...', Object(Symfony\Component\Cache\DoctrineProvider))
#1 /Users/me/Documents/Sulu/sulu-develop.localhost/vendor/sulu/sulu/var/cache/admin/prod/ContainerKCQGinW/App_KernelProdContainer.php(829): ContainerKCQGinW\A in /Users/me/Documents/Sulu/sulu-develop.localhost/vendor/sulu/sulu/vendor/symfony/cache/Adapter/PhpArrayAdapter.php on line 48
Fatal error: Uncaught TypeError: Argument 2 passed to Symfony\Component\Cache\Adapter\PhpArrayAdapter::__construct() must implement interface Symfony\Component\Cache\Adapter\AdapterInterface, instance of Symfony\Component\Cache\DoctrineProvider given, called in /Users/me/Documents/Sulu/sulu-develop.localhost/vendor/sulu/sulu/var/cache/admin/prod/ContainerKCQGinW/App_KernelProdContainer.php on line 886 and defined in /Users/me/Documents/Sulu/sulu-develop.localhost/vendor/sulu/sulu/vendor/symfony/cache/Adapter/PhpArrayAdapter.php:48
Stack trace:
#0 /Users/me/Documents/Sulu/sulu-develop.localhost/vendor/sulu/sulu/var/cache/admin/prod/ContainerKCQGinW/App_KernelProdContainer.php(886): Symfony\Component\Cache\Adapter\PhpArrayAdapter->__construct('/Users/me...', Object(Symfony\Component\Cache\DoctrineProvider))
#1 /Users/me/Documents/Sulu/sulu-develop.localhost/vendor/sulu/sulu/var/cache/admin/prod/ContainerKCQGinW/App_KernelProdContainer.php(829): ContainerKCQGinW\A in /Users/me/Documents/Sulu/sulu-develop.localhost/vendor/sulu/sulu/vendor/symfony/cache/Adapter/PhpArrayAdapter.php on line 48 |
Thx for feedback. This should be now fixed |
@ostrolucky can confirm it is fixed for me now! |
|
Due to container isolation, we cannot access the definition of the given cache service, which breaks autodetection. Thus, we introduce a new
is_psr
configuration option to be used with cache services for people to indicate that they are using a PSR-6 cache service.Includes the test from #1350 in addition to another functional test for a PSR-6 service.