stephpy/timeline-bundle

InvalidDefinitionException after upgrading

Closed this issue · 6 comments

After upgrading to 92d7135 we're getting:

[Symfony\Component\Config\Definition\Exception\InvalidDefinitionException]                               
  ->addDefaultsIfNotSet() is not applicable to prototype nodes at path "highco_timeline.render.resources"  

Thanks for this feedback

Hmm. This seems to be part of a change in from 2.0 to 2.1. I'm concerned that just blanket removing it, as in #32, may have unintended consequences.

It seems the appropriate way to handle it is to use addDefaultChildrenIfNoneSet instead. I'll look into this shortly.

Wow. It would seem that it does indeed continue to work properly without using either addDefaultsIfNotSet() addDefaultChildrenIfNoneSet().

FYI - This config section is based very closely off of Symfony's TwigBundle Configuration, which was changed from 2.0 to 2.1 for the new method, which was why I was concerned about not using it here.

Nevermind! :)

I'll write some tests on configuration when i find some time ... we'll be sure to be compatible for 2.0 and 2.1 so :)

@brentc are you on 2.0? i could have thought about breaking 2.0 behavior prior to my fix, as it obviously worked for you with the addDefaultsIfNotSet call.

Yeah, the project I implemented #30 for is still on 2.0 until I get some cycles to upgrade it.