symfony-cmf / content-bundle

Provides some basic document classes and controllers for modeling content
https://cmf.symfony.com
19 stars 32 forks source link

Dependency on MenuBundle? #63

Closed fazy closed 11 years ago

fazy commented 11 years ago

I think there's a dependency on the menu bundle here: https://github.com/symfony-cmf/ContentBundle/blob/master/Model/StaticContent.php#L16

I noticed it when updating (because I haven't started using MenuBundle yet, so it's not loaded).

Assuming I'm not doing something wrong... should we just accept the dependency and update composer.json?

lsmith77 commented 11 years ago

its an optional dependency: https://github.com/symfony-cmf/ContentBundle/blob/master/composer.json#L30

see also https://github.com/symfony-cmf/symfony-cmf-docs/pull/196

dbu commented 11 years ago

@fazy if you want a content without a menu, you should use the StaticContentBase class which does not have the dependency on menu, or extend the base class and add what you need.

fazy commented 11 years ago

Thanks, actually I'm not using StaticContent or StaticContentBase directly. I think it's being called when constructing the service cmf_content.admin, although I'm not using this. Here's my config:

cmf_content:
    persistence:
        phpcr:
            use_sonata_admin: false

I also tried adding:

            document_class: Symfony\Cmf\Bundle\ContentBundle\Doctrine\Phpcr\StaticContentBase

but this hasn't helped. I have worked around it for now by installing the MenuBundle, so it's not a big deal for me.

dbu commented 11 years ago

that sounds wrong indeed. i'll try with symfony-standard to see if i can reproduce the problem.

lsmith77 commented 11 years ago

hmm ok that sounds like something fishy is going on indeed. would be great to get this figured out before tomorrow when I do the next releases.

dbu commented 11 years ago

so it was not about sonata but about proxy generation. i created #64 which explains the things some more.