4
votes

As a beginner in Symfony Im trying to install and use new bundle in Symfony (DoctrineFixturesBundle) but result in a problem.

I install bundle following the instruction http://symfony.com/doc/master/bundles/DoctrineFixturesBundle/index.html

and after all when adding new project using new-Symfony in Netbeans i got this message:

enter image description here

enter image description here

1
Are you sure that composer successfully updated vendor? Search for the bundle you installed into your vendor folder or try php composer.phar update again and be sure that there is no error.Devatoria
Have you remove the src/AppBundle/ directory? If so, remove new AppBundle\AppBundle() from the list of your bundle.Federkun
uses the previous contents of composer.json then run composer update. Finally install DoctrineFixturesBundle with composer require doctrine/doctrine-fixtures-bundle "2.2.*"Federkun
@user233352, entirely erases your Symfony folder and reinstall it with composer create-project. Check if that work well then install DoctrineFixturesBundle as I said in my comment. Then add the bundle in AppKernel.phpFederkun
The console is located in /MyProject/app/console. Just left-click on the MyProject-> Symfony2 -> Run Command.Federkun

1 Answers

2
votes

NetBeans simply uses <Source Files>/app/console to run console.

When unzipping Symfony and installing new bundle it's neccesary to zip subfolder of Symfony directory, not root directory.

Unzipped directory structure looks like this

symfony2.6.1\Symfony\app\console
symfony2.6.1\Symfony\bin\...
symfony2.6.1\Symfony\src\...

My fault was that I zipped root directory: symfony2.6.1\, instead of Symfony\, or all these subdirectories below Symfony\