These are chat archives for symfony2admingenerator/GeneratorBundle

20th
Jul 2015
Lorenzo Sanzari
@ulisse73
Jul 20 2015 14:54

Hi guys,
why admingenerator (v2) doesn't recognize admin:generate-admin command?

c:\wamp\www\sfbase>php app/console admin:generate-admin

Welcome to the Symfony2Admingenerator

Create controllers for a generator module
Generator to use (doctrine, doctrine_odm, propel)
[0] doctrine
[1] doctrine_odm
[2] propel

0
Notice: Undefined index: doctrine
Generator to use (doctrine, doctrine_odm, propel)
[0] doctrine
[1] doctrine_odm
[2] propel

Option "0" (doctrine) doesn't works
(I'm using it with Sensio Generator v2.5, and SF v2.7)
Lorenzo Sanzari
@ulisse73
Jul 20 2015 15:12

Hi!

Stéphane
@sescandell
Jul 20 2015 15:25
Hello
did you configured the admigen bundle through your config file? defining which generators are available?
Lorenzo Sanzari
@ulisse73
Jul 20 2015 15:26
AHhhhh, ok
Stéphane
@sescandell
Jul 20 2015 15:27
add in your config file the following lines:
admingenerator_generator:
    use_doctrine_orm: true
Lorenzo Sanzari
@ulisse73
Jul 20 2015 15:28
Tnx :-)
Stéphane
@sescandell
Jul 20 2015 15:30
Is it working?
Lorenzo Sanzari
@ulisse73
Jul 20 2015 15:30
I'm installing... :-)
Lorenzo Sanzari
@ulisse73
Jul 20 2015 15:43
admin generate command with doctrine doesn't works

c:\wamp\www\sfbase>php app/console admin:generate-admin

Welcome to the Symfony2Admingenerator

Create controllers for a generator module
Generator to use (doctrine, doctrine_odm, propel)
[0] doctrine
1 doctrine_odm
2 propel

0
Notice: Undefined index: doctrine
Generator to use (doctrine, doctrine_odm, propel)
[0] doctrine
1 doctrine_odm
2 propel

Bob van de Vijver
@bobvandevijver
Jul 20 2015 15:50
Have you tried clearing all cache and warming it?
Lorenzo Sanzari
@ulisse73
Jul 20 2015 15:53
Doesn't works in the same way

My app/config

admingenerator_generator:

# choose  and enable at least one
#use_propel:           false
use_doctrine_orm:     true
#use_doctrine_odm:     false

# choose and uncomment only one
base_admin_template: AdmingeneratorGeneratorBundle::base.html.twig

base_admin_template: AdmingeneratorGeneratorBundle::base_uncompressed.html.twig

My app composer.json:

"require": {
"php": ">=5.3.9",
"symfony/symfony": "2.7.*",
"doctrine/orm": "~2.2,>=2.2.3,<2.5", "doctrine/dbal": "<2.5", "doctrine/doctrine-bundle": "~1.4", "symfony/assetic-bundle": "~2.3", "symfony/swiftmailer-bundle": "~2.3", "symfony/monolog-bundle": "~2.4", "sensio/distribution-bundle": "~4.0", "sensio/framework-extra-bundle": "~3.0,>=3.0.2",
"incenteev/composer-parameter-handler": "~2.0",
"symfony2admingenerator/generator-bundle":"~2.0",
"symfony2admingenerator/form-extensions-bundle": "dev-master",
"symfony2admingenerator/user-bundle": "dev-master"

},
"require-dev": {
    "sensio/generator-bundle": "~2.5"
},
"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",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget"
    ],
    "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",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget"
    ]
},
"config": {
    "bin-dir": "bin"
},
"extra": {
    "symfony-app-dir": "app",
    "symfony-web-dir": "web",
    "symfony-assets-install": "relative",
    "incenteev-parameters": {
        "file": "app/config/parameters.yml"
    }
}
"symfony/symfony": "2.7.*",
Bob van de Vijver
@bobvandevijver
Jul 20 2015 15:57
Could you try to update your messages such that it is in a readable format?
Lorenzo Sanzari
@ulisse73
Jul 20 2015 15:58
I'm using SF v2.7.*, with Admingenerator Bundle v. 2

When I try to use "admin:generate-admin" command in interactive mode, SF ask me to choose orm model:

0 doctrine (orm)
1 doctrine_odm
2 propel

If I insert "0", SF say me "Notice: Undefined index: doctrine"
How can I resolve the problem? :-)
(It's readable now? :-) )
(Sorry for my english)
Bob van de Vijver
@bobvandevijver
Jul 20 2015 16:05
The problem was already clear, but try to place your code snippets in code blocks
As you can see at your composer.json, only half is in a code block
Could you post your complete app/config.yml?