-
Notifications
You must be signed in to change notification settings - Fork 84
Deprecation of DoctrineCacheBundle #156
Comments
Do you have a doc explaining how to make Doctrine works with Symfony Cache ? Each times I tried, it was not working (cache:clear fails). If I remember correctly, doctrine (I've forget what package exactly) was not compatible with PHP-FIG standard... so I always ended up by installing DoctrineCacheBundle... |
…BAC (pamil) This PR was merged into the 1.3 branch. Discussion ---------- Related to doctrine/DoctrineCacheBundle#156. Commits ------- a332334 Remove dead configuration related to pre-stable Sylius RBAC
|
Currently, you just create the cache pool you want to use, then create a With the new minor release of DoctrineBundle (to be released in May) you'll be able to specify a
That's correct - doctrine/cache does not implement PSR-6 or PSR-16, but this can be worked around (e.g. with the
No decision on this yet since we'll fix bugs in the latest minor release for some time to come. |
i would not mark it as abandon right now, but maybe in summer? it will make people aware and make them move away. the README of this repo should clearly explain what is meant with the abandon and that for now its okay to keep using it in legacy projects. it might make sense to do a PR on the symfony/cache DoctrineAdaptor as well, to mark that one as deprecated (with an explanation) so that people notice. |
Except that the |
ups, sorry. i did not realize that. yeah then the adapter still makes sense. i'd add to the deprection/abandon information that this is only about the bundle, and doctrine/cache remains maintained and used. |
Small hint: In case you are running DoctrineCacheBundle with Symfony 4.3 and use
in your
Fix: Just remove the line above and everything seems fine. Here is my "require": {
"php": "^7.3",
"ext-iconv": "*",
"erusev/parsedown": "~1.7.3",
"genkgo/mail": "~2.5.4",
"jaybizzle/crawler-detect": "^1.2.84",
"league/iso3166": "^2.1.1",
"php-curl-class/php-curl-class": "~8.6.0",
"sensio/framework-extra-bundle": "~5.4.1",
"symfony/apache-pack": "^1.0",
"symfony/asset": "~4.3.3",
"symfony/cache": "~4.3.3",
"symfony/console": "~4.3.3",
"symfony/dotenv": "~4.3.3",
"symfony/flex": "~1.4.5",
"symfony/form": "~4.3.3",
"symfony/framework-bundle": "~4.3.3",
"symfony/monolog-bundle": "~3.4.0",
"symfony/orm-pack": "^1.0",
"symfony/property-access": "~4.3.3",
"symfony/security-bundle": "4.3.*",
"symfony/serializer": "~4.3.3",
"symfony/twig-bridge": "~4.3.3",
"symfony/twig-bundle": "~4.3.3",
"symfony/validator": "~4.3.3",
"symfony/yaml": "~4.3.3",
"twig/extensions": "~1.5.4",
"twig/twig": "~2.11.3"
} |
@k00ni that looks weird. This bundles.php file is managed by Flex, which should remove the line automatically when DoctrineCacheBundle gets removed from the dependencies. |
@k00ni: I’ll investigate this later. Did you upgrade DoctrineBundle from 1.x to 2.x which triggered this error? |
@stof wrote:
My project was created with Symfony 4.0 and adapted a lot since back then. Sometimes Flex adapts files via a recipe, but sometimes it doesn't. Any info about it available? @alcaeus wrote:
I only use Doctrine via |
I think I'm hitting this same issue with a project that was initially Symfony 4.0. I manually removed the line that looks like this from
My doctrine-bundle is at 2.0 as well. I'm not sure which component made that change, but it's definitely breaking. Is there a composer command I can run to figure that out? Edit: I think symfony/orm-pack v1.0.7 changed its reqs from: to: |
Recently we have had some CI failures due to DoctrineCacheBundle, and we are not alone; see: doctrine/DoctrineCacheBundle#156 (comment)
I think you found the cause. I have a rough idea and will test that out later. Thanks! |
Note that we haven't been able to reproduce this with an empty project: flex always properly removed the DoctrineCacheBundle entry from bundles.php. If someone has a reproducible test application, please share it with us so we can further investigate this. Thanks! |
I had the same error like @k00ni . I have a Symfony 4.3 application and installed doctrine via So i unpacked the orm-pack with
Now the error is gone. I still have the line
in the bundles.php. |
Doctrine 2.0.1 was released which fixed this issue for me. The update removes also my DoctrineCacheBundle line from bundles.php. If you still have a error message after the update, like "cannot autowire service argument ..." just follow the Doctrine upgrade guide. |
With 1.4.0 this bundle will be deprecated. Please read the release notes to find out more. |
After evaluation, we have decided that we will not adapt this bundle for compatibility with Symfony 5. We will provide limited support while people continue to use it with Symfony 3.4 LTS and supported versions of Symfony 4, but we actively suggest people don't use this bundle anymore to configure caches from Symfony 5 onwards.
With Symfony 3.4, the Symfony Cache Component was introduced, along with a very simple way to configure it using FrameworkBundle. Unlike
doctrine/cache
, this component is compatible with the PHP-FIG cache standards (PSR-6 and PSR-16). With this in mind,symfony/cache
is more interoperable thandoctrine/cache
, which was always specifically tailored to the needs of the Doctrine projects.Last but not least, the cache bundle is no longer needed to configure caches for the DoctrineBundle: the current Symfony Flex recipe already configures
symfony/cache
adapters for ORM, and the new version of the bundle for ORM will support configuring asymfony/cache
straight from the configuration. With all this in mind, there is no point allowing to configuredoctrine/cache
for anything other than it was originally intended to be used, which renders this bundle obsolete.Please note that while we are preparing for DoctrineBundle to no longer depend on this bundle, we welcome feedback from the community on the deprecation of DoctrineCacheBundle. Please let us know if you are actively using this bundle to configure caches for usages outside of doctrine/orm. If you don't have a
doctrine_cache
node in your Symfony configuration, this deprecation will most likely not affect you at all. If you do, we'd appreciate your input.The text was updated successfully, but these errors were encountered: