我试图弄清楚为什么我不能从 Symfony2 (2.2) 的主要学说包中看到(当然也不能运行)命令行任务。当我执行
php app/console
我只看到:
doctrine
doctrine:database:create Creates the configured databases
doctrine:database:drop Drops the configured databases
doctrine:fixtures:load Load data fixtures to your database.
doctrine:generate:crud Generates a CRUD based on a Doctrine entity
doctrine:generate:entities Generates entity classes and method stubs from your mapping information
doctrine:generate:entity Generates a new Doctrine entity inside a bundle
doctrine:generate:form Generates a form type class based on a Doctrine entity
doctrine:mapping:import Imports mapping information from an existing database
doctrine:migrations:diff Generate a migration by comparing your current database to your mapping information.
doctrine:migrations:execute Execute a single migration version up or down manually.
doctrine:migrations:generate Generate a blank migration class.
doctrine:migrations:migrate Execute a migration to a specified version or the latest available version.
doctrine:migrations:status View the status of a set of migrations.
doctrine:migrations:version Manually add and delete migration versions from the version table.
为什么没有任务
doctrine:schema
命名空间?
这是我的 AppKernel.php 的一部分:
$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 Symfony\Bundle\AsseticBundle\AsseticBundle(),
new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
new JMS\AopBundle\JMSAopBundle(),
new JMS\DiExtraBundle\JMSDiExtraBundle($this),
new JMS\SecurityExtraBundle\JMSSecurityExtraBundle(),
new Knp\Bundle\MenuBundle\KnpMenuBundle(),
new Sonata\CacheBundle\SonataCacheBundle(),
new Sonata\BlockBundle\SonataBlockBundle(),
new Sonata\AdminBundle\SonataAdminBundle(),
new Sonata\IntlBundle\SonataIntlBundle(),
new Sonata\DoctrineORMAdminBundle\SonataDoctrineORMAdminBundle(),
new Sonata\EasyExtendsBundle\SonataEasyExtendsBundle(),
new Sonata\UserBundle\SonataUserBundle('FOSUserBundle'),
new Sonata\SeoBundle\SonataSeoBundle(),
new Sonata\jQueryBundle\SonatajQueryBundle(),
new Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle(),
new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle(),
new Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle(),
new FOS\UserBundle\FOSUserBundle(),
new Genemu\Bundle\FormBundle\GenemuFormBundle(),
new Liip\ImagineBundle\LiipImagineBundle(),
new Knp\Bundle\GaufretteBundle\KnpGaufretteBundle(),
new Vich\UploaderBundle\VichUploaderBundle(),
new FOS\JsRoutingBundle\FOSJsRoutingBundle(),
new Knp\Bundle\PaginatorBundle\KnpPaginatorBundle(),
new Mopa\Bundle\BootstrapBundle\MopaBootstrapBundle(),
new HWI\Bundle\OAuthBundle\HWIOAuthBundle(),
new App\BackendBundle\AppBackendBundle(),
new App\FrontendBundle\AppFrontendBundle(),
new App\GeneralBundle\AppGeneralBundle(),
new App\DemoBundle\AppDemoBundle(),
new App\CompanyBundle\AppCompanyBundle(),
其他捆绑包是否有可能覆盖来自学说捆绑包的任务?任何修复它的提示将不胜感激。
提前致谢!