symfony-cmf / media-bundle

UNMAINTAINED - Minimalistic interfaces to handle media in the context of the CMF
http://cmf.symfony.com/
30 stars 40 forks source link

change prepend parameters for CmfCreateBundle to use semantic config #48

Closed shieldo closed 11 years ago

shieldo commented 11 years ago

I've experienced the error:

You have requested a non-existent parameter "cmf_media.persistence.phpcr.image.class".

when compiling the container in an application that also contains the CmfCreateBundle. The parameter references are resolved before the parameters are created from CmfMediaBundle's own semantic config.

I haven't dived far down this rabbit hole, but it looks to me as if the parameter references are being resolved too early when calling prependExtensionConfig() on the container builder (in which case, this would be an issue in the Symfony DependencyInjection component).

This PR short-circuits the issue by using the config from the CmfMediaBundle directly, rather than passing parameter references. It solves my error, but please feed back if you think this is an incorrect approach.

lsmith77 commented 11 years ago

@rmsint

rmsint commented 11 years ago

looks good to me, maybe this is the same issue as https://github.com/symfony-cmf/CreateBundle/pull/75#issuecomment-23328197

shieldo commented 11 years ago

Thanks!