symfony2Related issues-Collection of common programming errors
Touki
symfony2 bundle snappy
I have a fatal error when I try to install Knp Snappy BundleFatal error: Interface ‘Knp\Bundle\SnappyBundle\Snappy\GeneratorInterface’ not found in /…/vendor/bundles/Knp/Bundle/SnappyBundle/Snappy/LoggableGenerator.php on line 13 Any idea?
campagnolo_1
class symfony2
The project works in my local environment but when I deploy it on shared web server it doesn’t work.Server/home/app/src/gestor/UsuarioBundle… /vendors…./public_html/webapp.php…If I go to host/app.php ->Fatal error:Class ‘Gestor\UsuarioBundle\UsuarioBundle’ not found in /home/esdrhazc/app/AppKernel.php on line 19AppKernel.phpuse Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Config\Loader\LoaderInterface;class AppKernel extends Kernel {public function registerBundles(){$bundle
richsage
symfony2
I’m trying to install symfony for a week now and i have plenty of errors everytime !!! i couldn’t find a solution to this specific error :Fatal error: Class ‘Doctrine\Common\Annotations\AnnotationRegistry’ not found in C:\wamp\www\Symfony\app\autoload.php on line 35here’s what i have in the autoload.php file :$loader->register();AnnotationRegistry::registerLoader(function($class) use ($loader) { $loader->loadClass($class);return class_exists($class, false);});Any ideas please?
KevinM1
symfony2 doctrine2
Names changed due to NDA.I’m trying to come up with a survey form. Each survey question can have multiple answers/scores, so there’s a natural 1:* relationship to them. That said, for the public-facing form, I need to have a 1:1 relationship between the score and the question it relates to, which is what I’m working on now. Right now, the survey is open to the public, so each completed survey is not related to a user.The interesting parts of my current setup are as follows…Question:namespac
hakre
php symfony2 assetic
when I dump my assets using the following commandapp/console assetic:dump –env=dev –watchI receive this errorFatal error: Method Symfony\Bundle\AsseticBundle\Factory\Resource\FileResource::__toString() must not throw an exception in vendor/assetic/src/Assetic/Factory/Loader/CachedFormulaLoader.php on line 0It doesn’t happen when dumping using app/console assetic:dump –env=prod –no-debug
avowkind
symfony2 phpunit
using the classical phpunit style I generate:test with the symfony2 helper. I can get the service and I can assert it ok. // testspublic function testGetServiceUrl() {$ecservice = $this->getModule(‘Symfony2’)->grabServiceFromContainer(“ecservice”);$this->assertEquals(“https://ecoconnect2.niwa.co.nz/services”, $ecservice->getServiceUrl());$this->assertEquals(“xxx”, $ecservice->getServiceUrl());}However in the second case where the assertion fails I get an exception:Trying to test get
Mattia Premoli
symfony2 doctrine2 entity classnotfound
This is NewEventController.php:namespace Passtuff\RestBundle\Controller;use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Symfony\Component\HttpFoundation\Response; use Passtuff\RestBundle\Entity\Event;class NewEventController extends Controller { public function createAction(){$event = new Event(); //line 14//…}}and this is Event.phpnamespace Passtuff\RestBundle\Entity;use Doctrine\ORM\Mapping as ORM;/*** @ORM\Entity* @ORM\Table(name=”event”)*/ class Event {//… }I get this
Wouter J
php symfony2 symfony-cmf
I’m trying to install Symfony CMF but I’m getting the following error while creating the database:Fatal error: Class ‘PHPCR\Util\Console\Command\MoveCommand’ not foundin/vendor/doctrine/phpcr-bundle/Doctrine/Bundle/PHPCRBundle/Command/NodeMoveCommand.phpon line 34My composer.json is as follows:”require”: {“php”: “>=5.3.3″,”symfony/symfony”: “2.2.*”,”doctrine/orm”: “2.3.*”,”doctrine/doctrine-bundle”: “1.2.*”,”twig/extensions”: “1.0.*”,”symfony/assetic-bundle”: “2.1.*”,”symfony/swiftmailer-bund
Lion
php symfony2
I am getting Class ‘Splash\\SiteBundle\\Util\\Resize’ not found when running my app on prod. This does not happen on dev.Here is the code from the error:$resize = new \Splash\SiteBundle\Util\Resize($this->getAbsolutePath());I have a file called Splash\SiteBundle\Util\Resize.php with this namespacenamespace Splash\SiteBundle\Util;Class Resize{ … }Any thoughts?
linuxatico
symfony2 doctrine2
I can’t launch my simple Fixture, I installed the bundle in the right way and put the 2 lines in autoload.php and Appkernel.php like stated at here, and then I created my fixture class as it follows:<?phpnamespace ABCBundle\DataFixtures\ORM;use Doctrine\Common\DataFixtures\FixtureInterface; use ABCBundle\Entity\Rubrica;class LoadRubricaData implements FixtureInterface {public function load(ObjectManager $manager){$rubrica = new Rubrica();$rubrica->setX(“XXX”);$manager->persist($rubrica)
Web site is in building