symfony-cmf / block-bundle

Extends the SonataBlockBundle to integrate with PHPCR ODM
https://cmf.symfony.com
20 stars 51 forks source link

Annotation Exception #62

Closed oste closed 11 years ago

oste commented 11 years ago

[Doctrine\Common\Annotations\AnnotationException] [Creation Error] The annotation @PHPCRODM\Child declared on property Symfony\Cmf\Bundle\BlockBundle\Document\ImagineBlock::$image does not have a property named "name". Available properties: nodeName, cascade

I am seeing the above error after composer update or cache clear

Here are my deps, I am just investigating around so these might not be ideal

{
    "name": "symfony/framework-standard-edition",
    "description": "The \"Symfony Standard Edition\" distribution",
    "autoload": {
        "psr-0": { "": "src/" }
    },
    "require": {
        "php": ">=5.3.3",
        "symfony/symfony": "2.2.*",
        "doctrine/orm": "~2.2,>=2.2.3",
        "doctrine/doctrine-bundle": "1.2.*",
        "twig/extensions": "1.0.*",
        "symfony/assetic-bundle": "2.1.*",
        "symfony/swiftmailer-bundle": "2.2.*",
        "symfony/monolog-bundle": "2.2.*",
        "sensio/distribution-bundle": "2.2.*",
        "sensio/framework-extra-bundle": "2.2.*",
        "sensio/generator-bundle": "2.2.*",
        "jms/security-extra-bundle": "1.4.*",
        "jms/di-extra-bundle": "1.3.*",

        "doctrine/doctrine-fixtures-bundle": "2.1.*",
        "jackalope/jackalope-doctrine-dbal": "dev-master",
        "symfony-cmf/menu-bundle": "dev-master",
        "symfony-cmf/block-bundle": "dev-master",
        "symfony-cmf/content-bundle": "dev-master",
        "symfony-cmf/routing-auto-bundle": "dev-master",
        "sonata-project/admin-bundle": "dev-master",
        "sonata-project/doctrine-phpcr-admin-bundle": "dev-master"
    },
    "scripts": {
        "post-install-cmd": [
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile"
        ],
        "post-update-cmd": [
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile"
        ]
    },
    "minimum-stability": "dev",
    "extra": {
        "symfony-app-dir": "app",
        "symfony-web-dir": "web"
    }
}
lsmith77 commented 11 years ago

this is caused by https://github.com/doctrine/phpcr-odm/pull/279 would be great if you could work on a PR

see also https://github.com/symfony-cmf/RoutingBundle/pull/100

oste commented 11 years ago

I would like to open a PR but I am unsure about what to do.

I tried to change this line to be "type" instead of "name" here: https://github.com/symfony-cmf/BlockBundle/blob/master/Document/ImagineBlock.php#L19

but that gives this error:

[Doctrine\Common\Annotations\AnnotationException]
  [Creation Error] The annotation @PHPCRODM\Child declared on property Symfony\Cmf\Bundle\BlockBundle\Document\ImagineBlock::$image does not have a property named "type". Available pr
  operties: nodeName, cascade
rmsint commented 11 years ago

I think you should try to use "nodeName" instead of "name" according the changelog here https://github.com/doctrine/phpcr-odm/blob/master/CHANGELOG.md

dbu commented 11 years ago

ideally we would switch this to xml mappings instead of annotations, now that the xml mapping is properly working. if nobody does a PR tonight, i will do that tomorrow morning.

dbu commented 11 years ago

fixed by #64