I am using symfony application for heroku. When I try to run the command:
heroku run php app/console doctrine:fixtures:load
I get an error message:
[InvalidArgumentException] There are no commands defined in the "doctrine:fixtures" namespace. Did you mean one of these? doctrine:database doctrine:generate doctrine:query doctrine:schema doctrine:mapping doctrine:cache doctrine
Everything else seems to work in my local environment. If this is the wrong way to load values into mysql database in heroku using doctrine, what is it?
My composer file :
{ "name": "symfony/framework-standard-edition", "license": "MIT", "type": "project", "description": "The \"Symfony Standard Edition\" distribution", "autoload": { "psr-0": { "": "src/", "SymfonyStandard": "app/" } }, "require": { "php": ">=5.3.3", "symfony/symfony": "2.6.*", "doctrine/orm": "~2.2,>=2.2.3,<2.5", "doctrine/dbal": "<2.5", "doctrine/doctrine-bundle": "~1.2", "doctrine/doctrine-fixtures-bundle": "2.2.*", "twig/extensions": "~1.0", "symfony/assetic-bundle": "~2.3", "symfony/swiftmailer-bundle": "~2.3", "symfony/monolog-bundle": "~2.4", "sensio/distribution-bundle": "~3.0,>=3.0.12", "sensio/framework-extra-bundle": "~3.0,>=3.0.2", "incenteev/composer-parameter-handler": "~2.0", "jms/security-extra-bundle": "*", "sensiolabs/security-checker" : "2.0.1", "friendsofsymfony/user-bundle": "dev-master", "knplabs/knp-paginator-bundle": "~2.4", "knplabs/knp-snappy-bundle": "dev-master", "symfony/debug": "~2.6" }, "require-dev": { "sensio/generator-bundle": "~2.3", "liip/functional-test-bundle": "~1.0" }, "scripts": { "post-root-package-install": [ "SymfonyStandard\\Composer::hookRootPackageInstall" ], "post-install-cmd": [ "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::removeSymfonyStandardFiles" ], "post-update-cmd": [ "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::removeSymfonyStandardFiles" ] }, "config": { "bin-dir": "bin" }, "extra": { "symfony-app-dir": "app", "symfony-web-dir": "web", "symfony-assets-install": "relative", "incenteev-parameters": { "file": "app/config/parameters.yml" }, "branch-alias": { "dev-master": "2.6-dev" } } }
My config_prod.yml file:
imports: - { resource: parameters_prod.php } - { resource: security.yml } framework: translator: { fallback: en } secret: %secret% router: { resource: "%kernel.root_dir%/config/routing.yml" } form: true csrf_protection: true validation: { enable_annotations: true } templating: { engines: ['twig'] }
EDITED
My AppKernel file :
<?php use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Config\Loader\LoaderInterface; class AppKernel extends Kernel { public function registerBundles() { $bundles = array( new Symfony\Bundle\FrameworkBundle\FrameworkBundle(), new Symfony\Bundle\SecurityBundle\SecurityBundle(), new Symfony\Bundle\TwigBundle\TwigBundle(), new Symfony\Bundle\MonologBundle\MonologBundle(), new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(), new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(), new Symfony\Bundle\AsseticBundle\AsseticBundle(), new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(), new JMS\AopBundle\JMSAopBundle(), new JMS\SecurityExtraBundle\JMSSecurityExtraBundle(),