sonata-project / SonataClassificationBundle

Symfony SonataClassificationBundle
https://docs.sonata-project.org/projects/SonataClassificationBundle
MIT License
89 stars 115 forks source link

Broken Preject... #25

Closed DougHayward closed 10 years ago

DougHayward commented 10 years ago

Updated my project via "composer update" yesterday now I am getting the following error:

    [Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException]   
    The service "sonata.classification.api.form.type.category" has a dependency  
     on a non-existent service "jms_serializer.metadata_factory". 

Have looked all over and can't seem to find a fix.

My current composer file looks like this...

            "php": ">=5.5.0",
    "symfony/symfony": "2.3.*",
    "doctrine/orm": ">=2.2.3,<2.4-dev",
    "doctrine/doctrine-bundle": "1.2.*",
    "twig/extensions": "1.0.*",
    "symfony/assetic-bundle": "2.3.*",
    "symfony/swiftmailer-bundle": "2.3.*",
    "symfony/monolog-bundle": "2.3.*",
    "sensio/distribution-bundle": "2.3.*",
    "sensio/framework-extra-bundle": "2.3.*",
    "sensio/generator-bundle": "2.3.*",
    "incenteev/composer-parameter-handler": "~2.0",
    "friendsofsymfony/user-bundle": "~1.3",

    "knplabs/knp-paginator-bundle": "2.3.*",
    "knplabs/knp-menu-bundle": "1.1.*",
    "knplabs/knp-menu": "1.1.*",

    "sonata-project/intl-bundle": "dev-master",
    "sonata-project/media-bundle": "dev-master",
    "sonata-project/core-bundle": "~2.2@dev",
    "sonata-project/news-bundle": "dev-master",
    "sonata-project/formatter-bundle": "~2.2@dev",
    "sonata-project/classification-bundle": "~2.2@dev",
    "sonata-project/easy-extends-bundle": "dev-master",
    "sonata-project/block-bundle": "2.2.*@dev",
    "sonata-project/doctrine-orm-admin-bundle": "dev-master",
    "sonata-project/user-bundle": "dev-master",
    "sonata-project/admin-bundle": "2.2.*@dev",        
    "sonata-project/cache": "dev-master",
    "sonata-project/markitup-bundle": "2.1.*@dev",

    "egeloen/ckeditor-bundle": "~2.0",
    "jms/serializer-bundle": "dev-master",

    "nelmio/api-doc-bundle": "2.5.*@dev",
    "friendsofsymfony/rest-bundle": "1.3.*@dev",

    "triplepoint/php-units-of-measure": "dev-develop",
    "bcc/extra-tools-bundle": "dev-master"

Please help :)

pekindenis commented 10 years ago

You need install "jms/serializer-bundle": "~0.11" and add following:

// in AppKernel::registerBundles() $bundles = array( // ... new JMS\SerializerBundle\JMSSerializerBundle(), // ... );

DougHayward commented 10 years ago

Have changed it from dev-master to ~0.11 but no change in error...

   Updating dependencies (including require-dev)
    - Updating jms/serializer-bundle (dev-master ca66cd3 => 0.13.0)
    Checking out bb15db3e661168f4310fad48b86915ff1ca33795

     Writing lock file
     Generating autoload files
     Updating the "app/config/parameters.yml" file

    [Symfony\Component\DependencyInjection\Exception\ServiceNotFoundExcepton] The service "sonata.classification.api.form.type.category" has a dependency on a non-existent service "jms_serializer.metadata_factory".

      Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache handling the post-update-cmd event terminated with an exception

           [RuntimeException]
           An error occurred when executing the ""cache:clear --no-warmup"" command.
DougHayward commented 10 years ago

Flipping heck... can't believe I've looked pretty much everywhere before asking this question... except in my own ****ing Kernel (have been spoilt up to yet with the app_kernel being auto updated)... sorry to have wasted everyone's time. Fixed now. Thank-you.

webdevilopers commented 10 years ago

This dependency should be stated in the docs: http://sonata-project.org/bundles/media/master/doc/reference/installation.html#id1

Though it mentions: This bundle is mainly dependant of the SonataAdminBundle and the SonataDoctrineORMAdminBundle or SonataDoctrineMongoDBAdminBundle. So be sure you have installed those two bundles before starting.

I don't think the other bundles require JMSSerializerBundle, correct?

fourpixels commented 10 years ago

Come on guys, if this is a real dependency, why it's not included?! I've stumbled upon this for a third time, and I keep forgetting it! And the issue is STILL relevant!

iBenito commented 10 years ago

Completely agree with @webdevilopers and @fourpixels, if it's a real dependency, please include it in the docs.

Bladrak commented 10 years ago

Could you submit a PR to the docs? Quite easy to do, feel free :)

Th3Mouk commented 9 years ago

https://github.com/sonata-project/SonataMediaBundle/pull/676/files

Correction added

krewetka commented 9 years ago

Why is this still not pulled to the official docs on site?

It getting really annoying with all the outdated docs out there.

rande commented 9 years ago

@krewetka the documentation has been updated, just wait for the CDN to flush its content: http://sonata-project.org/bundles/media/master/doc/reference/installation.html

OskarStark commented 9 years ago

@rande this is missing in the classification bundle.

The link you added is from the SonataMediaBundle, which indeed needs the classification bundle, but if you first setup the classification bundle you'll stumble upon this....