symfony-cmf / blog-bundle

ABANDONED - to focus our efforts, this bundle is no longer maintained
http://cmf.symfony.com
22 stars 31 forks source link

Symfony\Cmf\Component\Routing\RouteReferrersReadInterface' not found #49

Open emgiezet opened 10 years ago

emgiezet commented 10 years ago

Hello!

Im using blog bundle

"require": {
        "php": ">=5.3.3",
        "symfony/symfony": "2.3.*",
        "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.*",
        "symfony-cmf/symfony-cmf": "1.0.*",
        "symfony-cmf/simple-cms-bundle": "1.0.*",
        "symfony-cmf/search-bundle": "1.0.*",
        "symfony-cmf/create-bundle": "1.0.*",
        "symfony-cmf/routing-bundle": "1.1.*",
        "symfony-cmf/routing-auto-bundle": "1.0.0-alpha8@dev",
        "symfony-cmf/blog-bundle": "1.0.0-beta7@dev",
        "symfony-cmf/tree-browser-bundle": "1.0.*",
        "jackalope/jackalope-doctrine-dbal": "1.0.*",
        "jackalope/jackalope-jackrabbit": "1.0.*",
        "friendsofsymfony/user-bundle": "1.3.*@dev",
        "hwi/oauth-bundle": "dev-master",
        "doctrine/doctrine-bundle": "1.2.*",
        "doctrine/migrations": "1.0.x-dev",
        "doctrine/data-fixtures": "1.0.*",
        "doctrine/doctrine-fixtures-bundle": "dev-master",
        "doctrine/doctrine-migrations-bundle": "dev-master",
        "doctrine/phpcr-odm": "1.0.*@dev",
        "sonata-project/cache-bundle": "2.1.*",
        "sonata-project/doctrine-phpcr-admin-bundle": "1.0.*",
        "sonata-project/doctrine-orm-admin-bundle": "dev-master",
        "sonata-project/intl-bundle": "2.1.*",
        "eko/feedbundle": "1.0.*",
        "vich/uploader-bundle": "dev-master",
        "knplabs/gaufrette" : "dev-master",
        "knplabs/knp-gaufrette-bundle" : "dev-master",
        "sonata-project/user-bundle": "2.2.*@dev",
        "eko/feedbundle": "1.0.*",
        "lunetics/locale-bundle": "2.2.*",
        "liip/functional-test-bundle": "1.0.*",
        "jms/translation-bundle": "1.1.*",
        "symfony-cmf/routing": "1.1.0-beta2",
        "emgiezet/errbit-php": "dev-master",
        "Trsteel/ckeditor-bundle": "dev-master",
        "sonata-project/core-bundle": "dev-master",
        "helios-ag/fm-elfinder-bundle": "~1.4"
    },

And i cant find this interface... Just wested entire day with composer.phar update

PHP Fatal error:  Interface 'Symfony\Cmf\Component\Routing\RouteReferrersReadInterface' not found in /home/mgz/workspace/simcms/vendor/symfony-cmf/blog-bundle/Symfony/Cmf/Bundle/BlogBundle/Document/Blog.php on line 15
Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache handling the post-update-cmd event terminated with an exception

Any help will be gr8!

Cheers! Max

lsmith77 commented 10 years ago

can you give us the output of composer show --installed? the class should definitely be installed https://github.com/symfony-cmf/Routing/blob/1.1/RouteReferrersReadInterface.php if you have a stable release of the routing 1.1 component which is a dependency of the RoutingBundle 1.1

emgiezet commented 10 years ago

Those I have

symfony-cmf/block-bundle                   1.0.x-dev 318d98c  Symfony CMF Block Bundle
symfony-cmf/blog-bundle                    dev-master 90b4d38 Symfony CMF Blog Bundle
symfony-cmf/content-bundle                 1.0.x-dev fbc3a45  Symfony CMF Content Bundle
symfony-cmf/core-bundle                    dev-master 93ea17f Symfony CMF Core Bundle
symfony-cmf/create-bundle                  dev-master ee440b9 Symfony Bundle for createphp and create.js. The easiest way to make any site editable and have semantic annotations with RDFa.
symfony-cmf/media-bundle                   1.0.x-dev fd2f47d  Symfony CMF Media Bundle
symfony-cmf/menu-bundle                    1.0.x-dev befdef8  Symfony CMF Menu Bundle
symfony-cmf/routing                        1.1.0-beta2        Extends the Symfony2 routing component for dynamic routes and chaining several routers
symfony-cmf/routing-auto-bundle            1.0.0-alpha8       Bundle which automatically creates and manages routes for persisted objects
symfony-cmf/routing-bundle                 1.1.x-dev 96d0649  Symfony RoutingBundle
symfony-cmf/search-bundle                  dev-master 0ec707c Symfony SearchBundle
symfony-cmf/simple-cms-bundle              1.0.x-dev 165e4b8  A simple CMS bundle based on the Symfony CMF
symfony-cmf/symfony-cmf                    1.0.x-dev 65fe1b6  Symfony Content Management Framework
symfony-cmf/tree-browser-bundle            1.0.x-dev 45d62a9  Symfony CMF Tree Browser Bundle
lsmith77 commented 10 years ago

ah i see now you have an explicit dependency on "symfony-cmf/routing": "1.1.0-beta2", .. could you remove that?

emgiezet commented 10 years ago

ok removing and updating composer.

There is some fubard depenancy between blog => routing-bundle => routing

I've tried in beta and dev stability.

Updated. And still same error

symfony-cmf/block-bundle                   1.0.x-dev 318d98c  Symfony CMF Block Bundle
symfony-cmf/blog-bundle                    dev-master 90b4d38 Symfony CMF Blog Bundle
symfony-cmf/content-bundle                 1.0.x-dev fbc3a45  Symfony CMF Content Bundle
symfony-cmf/core-bundle                    dev-master 93ea17f Symfony CMF Core Bundle
symfony-cmf/create-bundle                  dev-master ee440b9 Symfony Bundle for createphp and create.js. The easiest way to make any site editable and have semantic annotations with RDFa.
symfony-cmf/media-bundle                   1.0.x-dev fd2f47d  Symfony CMF Media Bundle
symfony-cmf/menu-bundle                    1.0.x-dev befdef8  Symfony CMF Menu Bundle
symfony-cmf/routing                        1.1.0-beta2        Extends the Symfony2 routing component for dynamic routes and chaining several routers
symfony-cmf/routing-auto-bundle            1.0.0-alpha8       Bundle which automatically creates and manages routes for persisted objects
symfony-cmf/routing-bundle                 1.1.x-dev 96d0649  Symfony RoutingBundle
symfony-cmf/search-bundle                  dev-master 0ec707c Symfony SearchBundle
symfony-cmf/simple-cms-bundle              1.0.x-dev 165e4b8  A simple CMS bundle based on the Symfony CMF
symfony-cmf/symfony-cmf                    1.0.x-dev 65fe1b6  Symfony Content Management Framework
symfony-cmf/tree-browser-bundle            1.0.x-dev 45d62a9  Symfony CMF Tree Browser Bundle
./composer.phar update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Writing lock file
Generating autoload files
Download or update create
Download or update ckeditor
PHP Fatal error:  Interface 'Symfony\Cmf\Component\Routing\RouteReferrersReadInterface' not found in /home/mgz/workspace/simcms/vendor/symfony-cmf/blog-bundle/Symfony/Cmf/Bundle/BlogBundle/Document/Blog.php on line 15
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.  

update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock] [--no-plugins] [--no-custom-installers] [--no-scripts] [--no-progress] [--with-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [packages1] ... [packagesN]
lsmith77 commented 10 years ago

it works in the cmf-sandbox .. see https://github.com/symfony-cmf/cmf-sandbox/blob/master/composer.json however it seems like others are having issues too https://github.com/symfony-cmf/symfony-cmf-docs/pull/376

/cc @dantleech

dantleech commented 10 years ago

I will have a look at the other issue tonight. I would have guessed its related to RoutingAuto but its pinned at alpha8 in this case.

emgiezet commented 10 years ago

the alpha8 is from cmf-sandbox composer.json

emgiezet commented 10 years ago

Ok @ alpha-10

it crashes with:

Loading composer repositories with package information
Updating dependencies (including require-dev)
  - Removing symfony-cmf/routing-auto-bundle (1.0.0-alpha8)
  - Installing symfony-cmf/routing-auto-bundle (1.0.0-alpha10)
    Downloading: 100%         

Writing lock file
Generating autoload files
Download or update create
Download or update ckeditor

  [Symfony\Component\Config\Definition\Exception\InvalidConfigurationException]  
  Unrecognized options "auto_route_mapping" under "cmf_routing_auto"  
emgiezet commented 10 years ago

This error is with this installed packages

symfony-cmf/block-bundle                   1.0.x-dev 318d98c  Symfony CMF Block Bundle
symfony-cmf/blog-bundle                    dev-master 90b4d38 Symfony CMF Blog Bundle
symfony-cmf/content-bundle                 1.0.x-dev fbc3a45  Symfony CMF Content Bundle
symfony-cmf/core-bundle                    dev-master 93ea17f Symfony CMF Core Bundle
symfony-cmf/create-bundle                  dev-master ee440b9 Symfony Bundle for createphp and create.js. The easiest way to make any site editable and have semantic annotations with RDFa.
symfony-cmf/media-bundle                   1.0.x-dev fd2f47d  Symfony CMF Media Bundle
symfony-cmf/menu-bundle                    1.0.x-dev befdef8  Symfony CMF Menu Bundle
symfony-cmf/routing                        1.1.0-beta2        Extends the Symfony2 routing component for dynamic routes and chaining several routers
symfony-cmf/routing-auto-bundle            1.0.0-alpha10      Bundle which automatically creates and manages routes for persisted objects
symfony-cmf/routing-bundle                 1.1.x-dev 96d0649  Symfony RoutingBundle
symfony-cmf/search-bundle                  dev-master 0ec707c Symfony SearchBundle
symfony-cmf/simple-cms-bundle              1.0.x-dev 165e4b8  A simple CMS bundle based on the Symfony CMF
symfony-cmf/symfony-cmf                    1.0.x-dev 65fe1b6  Symfony Content Management Framework
symfony-cmf/tree-browser-bundle            1.0.x-dev 45d62a9  Symfony CMF Tree Browser Bundle
lsmith77 commented 10 years ago

there were changes in the configuration which are causing Unrecognized options "auto_route_mapping" under "cmf_routing_auto" .. not sure if the changes have been documented yet ..

@dantleech can we update the 1.0/master or at least the master branch on the cmf-sandbox to the latest release of the routing auto bundle?

dantleech commented 10 years ago

Thats to be expected. alpha10 introduced a new configuration schema. alpha9 is the latest release with the old schema. The new schema looks like this: http://symfony.com/doc/master/cmf/bundles/routing_auto/introduction.html#usage

Saying that -- I wonder if upgrading the blog to the latest version would be a good idea? Maybe it would be better to wait until the 1.1 release of ODM // @lsmith77 @dbu

lsmith77 commented 10 years ago

we already have a 1.0 branch .. so if you want you can do it in master

emgiezet commented 10 years ago

yay! we got a solution! waiting for your commit and push ;) ! :+1: @dantleech you're my hero!

emgiezet commented 10 years ago

ping?

emgiezet commented 10 years ago

any luck with this?

dantleech commented 10 years ago

Not yet -- it should be quite simple to do however I guess, there is documentation for the routing auto bundle:

If not maybe I can have a look later / this weekend.

emgiezet commented 10 years ago

Hello!

Rewrited the autorouting_default.yml to this:

cmf_routing_auto:
    mappings:
        Sandbox\CalendarBundle\Document\Calendar:
            content_path:
                routing_path:
                    provider: [ specified,  {path: cms/routes}]
                    exists_action:
                        strategy: use
                    not_exists_action:
                        strategy: throw_exception
                namespace:
                    provider: [ specified,  {path: stream}]
                    exists_action:
                        strategy: use
                    not_exists_action:
                        strategy: create
            content_name:
                provider: [ content_method,  {method: getName}]
                exists_action:
                    strategy: auto_increment
                not_exists_action:
                    strategy: create
        Sandbox\CalendarBundle\Document\Event:
            content_path:
                routing_path:
                    provider: [ content_method,  {method: getCalendar}]
                    exists_action:
                        strategy: use
                    not_exists_action:
                        strategy: throw_exception
                date:
                    provider: [ content_datetime,  {method: getDate}]
                    exists_action:
                        strategy: use
                    not_exists_action:
                        strategy: create
            content_name:
                provider: [ content_method,  {method: getTitle}]
                exists_action:
                    strategy: auto_increment
                not_exists_action:
                    strategy: create

Now I get rid of the error.

But poof!

The missing interface comes back!

Bazinga!

dantleech commented 10 years ago

Strange. Try adding "symfony-cmf/routing": "1.1.0" to your composer.json. If I read correctly above you are onbeta2which is 6 months old (but I guess still matches routing-autos specification of1.1.*`.

dantleech commented 10 years ago

Also, you might want to check out this tutorial:

http://symfony.com/doc/master/cmf/cookbook/creating_a_cms/index.html

Which really lays the foundations for a blog as much as this bundle does.

dbu commented 10 years ago

the routing 1.1.0-beta2 is still before the BC break we did to cleanup the interface names. you really need to have at least 1.1.0 stable - maybe one of your other deps is pulling things down to the beta version. you could try

    "symfony-cmf/routing-bundle": "1.1.*@stable",

and then see where you get a conflict.