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

Conversion error with defaults tag #18

Open
mweimerskirch opened this issue Mar 15, 2018 · 2 comments
Open

Conversion error with defaults tag #18

mweimerskirch opened this issue Mar 15, 2018 · 2 comments

Comments

@mweimerskirch
Copy link

I got a "conversion error" with the following file:
https://github.com/symfony/symfony/blob/3.4/src/Symfony/Bundle/TwigBundle/Resources/config/form.xml

The problem seems to be the "defaults" tag:

 <defaults public="false" />

which should be converted to

 _defaults:
   public: false
@rosstuck
Copy link
Owner

Sorry, thought I'd answered this one already, my bad!

I'm pretty sure the converter is running a very old version of Symfony DI container which probably didn't support _defaults. If that dependency gets updated, it should work...I hope. Can you let me know if that's the case? If so, I'll update the dep (and the converter site).

@mweimerskirch
Copy link
Author

Thanks for your feedback. I just tried updating the dependencies. Instead of converting the tag, the "public: false" is added to all the converted services, so instead of this:

    _defaults:
        public: false
    test.average:
        class: '%test.average.class%'
        tags:
            - { name: test.faketag }
        arguments: ['@test.loader.factory', '@test.dumper.factory']
    test.empty:
        class: '%test.empty.class%'

the output is this:

    test.average:
        class: '%test.average.class%'
        tags:
            - { name: test.faketag }
        arguments: ['@test.loader.factory', '@test.dumper.factory']
        public: false
    test.empty:
        class: '%test.empty.class%'
        public: false

Here's what I was working on: https://github.com/mweimerskirch/TuckaConverterBundle/commits/master
I'm not sure this can even be fixed, and if it does, a proper fix will probably be much more complex.

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