0

I am trying to use DoctrineFixturesBundle in my project which is using DoctrineFixturesBundle to load some test data into the DB. I have downloaded it from github and not able to figure out where to add it and how to make it autoload.

As per the documentation it says to use Composer. But it dosen't work with my company network proxy.

Second thing is - how to understand path of bundles given in appkernal.php. If I put DoctrineFixturesBundle under vendor folder how I should mention it in appkernal.php

$bundles = array(
        new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
        new Symfony\Bundle\SecurityBundle\SecurityBundle(),
        new Symfony\Bundle\TwigBundle\TwigBundle(),
        new Symfony\Bundle\MonologBundle\MonologBundle(),

Please help.

Manojkumar
  • 1,351
  • 5
  • 35
  • 63
  • does your project have a composer.json file ? – Vamsi Krishna B Dec 09 '16 at 06:38
  • No. there is no `composer.json` but I tried it as well. I created a composer.json file and install/update it. Totally composer doesn't work behind proxies. SO I need manul set up of this bundle. – Manojkumar Dec 09 '16 at 06:41
  • Atlest I need to know how twig bundle is set up. It sits in vendor folder. Then the path added for it in appkernal is - Symfony\Bundle\TwigBundle\TwigBundle(). How it reads?. Pleas explain me. – Manojkumar Dec 09 '16 at 06:43

1 Answers1

1

You are missing out a lot , byt not using composer. you should try contacting your network admin and figure out how to make it work.

There are also few methods that you can try to get composer working beind a proxy.

but if you can't really get composer working , try instantiating the DoctrineFixturesBundle

new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle()

in the $bundles array of the registerBundles() method in the app/AppKernel.php file .

$bundles = array(
        new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
        new Symfony\Bundle\SecurityBundle\SecurityBundle(),
        new Symfony\Bundle\TwigBundle\TwigBundle(),
        new Symfony\Bundle\MonologBundle\MonologBundle(),
        new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle(),

clear the cache and check if the doctrine:fixtures:load is present.

if it's not working, you should figure out how Autoloading is setup in your project .

Vamsi Krishna B
  • 11,377
  • 15
  • 68
  • 94