Closed cacahouwete closed 9 years ago
can you please provide a PR?
Can confirm this issue. Got the same problem. Therefore i can't do a 'cap deploy' with capistrano with capifony.
This is the exception that popups in capistrano with capifony:
Generating autoload files post-autoload-dump: ComponentInstaller\Installer::postAutoloadDump Compiling component files post-update-cmd: Incenteev\ParameterHandler\ScriptHandler::buildParameters Updating the "app/config/parameters.yml" file post-update-cmd: Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::buildBootstrap post-update-cmd: Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache [Doctrine\Common\Annotations\AnnotationException] [Semantical Error] The annotation "@ApiDoc" in method Sonata\MediaBundle\Controller\Api\GalleryController::getGalleriesAction() was never imported. Did you maybe forget to add a "use" statement for this annotation? 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.
In your composer.json edit following code line:
From:
"require": {
"sonata-project/media-bundle": "dev-master"
}
To:
"require": {
"sonata-project/media-bundle": "dev-master#1cc799eda0fa7dc0fb01045cb36747e89b4bffcf"
}
This commited dev master (See https://github.com/sonata-project/SonataMediaBundle/commits/master) by @Soullivaneuh is working at least.
Waiting till this bug is fixed.
After this commit (#9327923) the error is still occuring.
can you provide a link what do you mean? my PR isn't merged yet
Ah my fault. i only saw that you added the referenced. But it isn't merged yet as you said. Waiting for merging.
i merged this, try again
The error is passed. But now another error occurs:
[Doctrine\Common\Annotations\AnnotationException]
[Semantical Error] The class "FOS\RestBundle\View\View" is not annotated with @Annotation.
Are you sure this class can be used as annotation?
If so, then you need to add @Annotation to the _class_ doc comment of "FOS\RestBundle\View\View".
If it is indeed no annotation, then you need to add @IgnoreAnnotation("View") to the _class_
doc comment of method Sonata\MediaBundle\Controller\Api\MediaController::getMediaAction().
Dont know if its a problem of FOSUserBundle or SonataMediaBundle.
please try to fix this and then provide a PR or the Solution here to me
The solution for MediaBundle will be this (said in error text): then you need to add @IgnoreAnnotation("View") to the class doc comment of method Sonata\MediaBundle\Controller\Api\MediaController::getMediaAction()
If this doesn't help, i will start an issue at FOSUserBundle.
to fix it, I add / replace some "use" in "Sonata\MediaBundle\Controller\Api\MediaController.php":
use FOS\RestBundle\Controller\Annotations\QueryParam; use FOS\RestBundle\Controller\Annotations\Route; use FOS\RestBundle\Controller\Annotations\View; // use FOS\RestBundle\View\View;
ping @core23 can you please check this out?
Fixxed by #879
The annotation "@ApiDoc" in method
Sonata\MediaBundle\Controller\Api\GalleryController::getGalleriesAction()
was never imported.