Skip to content
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

Metadadata cache generates empty files each timefor Loggable and Softdeleteable #411

Open
pohlaniacz opened this issue Aug 5, 2020 · 1 comment

Comments

@pohlaniacz
Copy link

pohlaniacz commented Aug 5, 2020

Hi, I've had high usage of memcached and as fix I've change provider to Doctrine\Common\Cache\PhpFileCache and on production I've looked for cache files and my entity class cache looks fine are and not changing but Loggable and Softdeleteable (which I'm using) generates file with empty content which CacheProvider make as:

<?php return unserialize('a:2:{s:8:"lifetime";N;s:4:"data";a:0:{}}');

Loggable and Softdeletetable is working fine, but not for all my entities. Cache provider instead (imo) looks for all classes?

My config is:

doctrine:
    orm:
        auto_generate_proxy_classes: "%kernel.debug%"
        default_entity_manager: default
        entity_managers:
            default:
                connection: default
                auto_mapping: true
                naming_strategy: doctrine.orm.naming_strategy.underscore
                mappings:
                    gedmo_loggable:
                        type: annotation
                        prefix: Gedmo\Loggable\Entity
                        dir: "%kernel.root_dir%/../vendor/gedmo/doctrine-extensions/lib/Gedmo/Loggable/Entity"
                        alias: GedmoLoggable # (optional) it will default to the name set for the mappingmapping
                        is_bundle: false
                filters:
                    softdeleteable:
                        class: Gedmo\SoftDeleteable\Filter\SoftDeleteableFilter
                        enabled: true

stof_doctrine_extensions:
    orm:
        default:
            loggable: true
            softdeleteable: true

In every doc I've looked (ie. https://www.doctrine-project.org/projects/doctrine-orm/en/2.7/reference/metadata-drivers.html#core-metadata-drivers ) they say that metada cache is not changing, so these is weird behaviour? My symfony version is 3.4, newset doctrine extensions, and stof bundle in 1.3.0.

@pohlaniacz
Copy link
Author

probably this is the fix doctrine-extensions/DoctrineExtensions#2158

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant