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

v2.0.0: The "name" property of directories must be given - but must we specify directories? #607

Closed
narcoticfresh opened this issue Oct 6, 2017 · 2 comments

Comments

@narcoticfresh
Copy link

Hi guys..

I searched existing and closed issue and couldn't find any information on my small problem. If seen in the UPGRADING file, that the name key inside jms_serializer.metadata.directories must be provided.

Thing is, we never specified any directories. Our config looks like this (and worked fine, only using auto detection):

jms_serializer:
    handlers:
        datetime:
            default_format: Y-m-d\TH:i:sO
            default_timezone: UTC
    metadata:
        cache: graviton.core.jms.cache.provider
        debug: "%kernel.debug%"
        file_cache:
            dir: "%kernel.cache_dir%/serializer"
        auto_detection: true

So after updating the Bundle to 2.0.0, we get

PHP Fatal error:  Uncaught exception 'Symfony\Component\Config\Definition\Exception\InvalidConfigurationException' with message 'The attribute "name" must be set for path "jms_serializer.metadata.directories".' in /src/git/graviton2/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/PrototypedArrayNode.php:244
Stack trace:
#0 /src/git/graviton2/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/BaseNode.php(264): Symfony\Component\Config\Definition\PrototypedArrayNode->normalizeValue(Array)

So i guess the question is: Do we really need to specify some directories? What do I define if I don't have anything to specify? ;-)

Thanks for a short clarification
And thanks for your great work!

@goetas
Copy link
Collaborator

goetas commented Oct 6, 2017

No, specifying directories is not necessary. are you sure that directories are not specified somewhere? like in config_(test|prod|dev).yml?

@narcoticfresh
Copy link
Author

@goetas aah... i've found a bundle that defines a directory in its config.yml.. ok, thx.. closing the issue.. sorry for the premature issue creation ;-)

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

2 participants