我尝试按照SonataBundle tutorial
的教程安装进行操作我只改变了这种方式的映射
doctrine:
dbal:
driver: pdo_mysql
host: '%database_host%'
port: '%database_port%'
dbname: '%database_name%'
user: '%database_user%'
password: '%database_password%'
charset: UTF8
# if using pdo_sqlite as your database driver:
# 1. add the path in parameters.yml
# e.g. database_path: '%kernel.project_dir%/var/data/data.sqlite'
# 2. Uncomment database_path in parameters.yml.dist
# 3. Uncomment next line:
#path: '%database_path%'
types:
json: Sonata\Doctrine\Types\JsonType
orm:
auto_generate_proxy_classes: "%kernel.debug%"
naming_strategy: doctrine.orm.naming_strategy.underscore
auto_mapping: true
mappings:
ApplicationSonataMediaBundle: ~
SonataMediaBundle: ~
命令
php app/console sonata:easy-extends:generate --dest=src SonataMediaBundle
在src/Application/Sonata/MediaBundle/ApplicationSonataMediaBundle
生成
但我总是得到这个错误:
Class' Application \ Sonata \ MediaBundle \ ApplicationSonataMediaBundle'找不到