TuckConverterBundle icon indicating copy to clipboard operation
TuckConverterBundle copied to clipboard

Conversion error with defaults tag

Open mweimerskirch opened this issue 6 years ago • 2 comments

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

mweimerskirch avatar Mar 15 '18 13:03 mweimerskirch

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).

rosstuck avatar Mar 29 '18 08:03 rosstuck

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.

mweimerskirch avatar Mar 29 '18 11:03 mweimerskirch