Symfony doctrine:schema:更新错误

时间:2016-09-27 14:38:26

标签: php symfony doctrine-orm

我将Symfony v2.1项目升级到v2.7,现在Doctrine中出现了一些问题。

php app/console doctrine:schema:update --force --dump-sql

..输出如下

0.0002     363728   1. {main}() /home/user/www/parking/app/console:0
0.0219    2546128   2. Symfony\Component\Console\Application->run() /home/user/www/parking/app/console:22
0.0238    2682232   3. Symfony\Bundle\FrameworkBundle\Console\Application->doRun() /home/user/www/parking/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:120
1.0257   30796904   4. Symfony\Component\Console\Application->doRun() /home/user/www/parking/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:90
1.0259   30796904   5. Symfony\Component\Console\Application->doRunCommand() /home/user/www/parking/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:189
1.0283   30981584   6. Symfony\Component\Console\Command\Command->run() /home/user/www/parking/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:852
1.0285   30984872   7. Doctrine\Bundle\DoctrineBundle\Command\Proxy\UpdateSchemaDoctrineCommand->execute() /home/user/www/parking/vendor/symfony/symfony/src/Symfony/Component/Console/Command/Command.php:256
1.0287   30991376   8. Doctrine\Bundle\DoctrineBundle\Command\Proxy\DoctrineCommandHelper::setApplicationEntityManager() /home/user/www/parking/vendor/doctrine/doctrine-bundle/Command/Proxy/UpdateSchemaDoctrineCommand.php:48
1.0287   30991376   9. Doctrine\Bundle\DoctrineBundle\Registry->getEntityManager() /home/user/www/parking/vendor/doctrine/doctrine-bundle/Command/Proxy/DoctrineCommandHelper.php:37
1.0289   30991376  10. Doctrine\Bundle\DoctrineBundle\Registry->getEntityManager() /home/user/www/parking/vendor/doctrine/doctrine-bundle/Registry.php:73
1.0290   30991376  11. Doctrine\Bundle\DoctrineBundle\Registry->getEntityManager() /home/user/www/parking/vendor/doctrine/doctrine-bundle/Registry.php:73
...
1.0847   31077856 244. Doctrine\Bundle\DoctrineBundle\Registry->getEntityManager() /home/user/www/parking/vendor/doctrine/doctrine-bundle/Registry.php:73
1.0850   31078232 245. Doctrine\Bundle\DoctrineBundle\Registry->getEntityManager() /home/user/www/parking/vendor/doctrine/doctrine-bundle/Registry.php:73
1.0850   31078232 246. trigger_error() /home/user/www/parking/vendor/doctrine/doctrine-bundle/Registry.php:71
1.0850   31079192 247. Symfony\Component\Debug\ErrorHandler->handleError() /home/user/www/parking/vendor/doctrine/doctrine-bundle/Registry.php:71
1.0851   31438448 248. Monolog\Logger->log() /home/user/www/parking/vendor/symfony/debug/ErrorHandler.php:482
1.0851   31438448 249. Monolog\Logger->addRecord() /home/user/www/parking/vendor/monolog/monolog/src/Monolog/Logger.php:517
1.0851   31439200 250. Monolog\Handler\AbstractProcessingHandler->handle() /home/user/www/parking/vendor/monolog/monolog/src/Monolog/Logger.php:336
1.0851   31439200 251. Monolog\Formatter\LineFormatter->format() /home/user/www/parking/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php:35
1.0851   31439200 252. Monolog\Formatter\NormalizerFormatter->format() /home/user/www/parking/vendor/monolog/monolog/src/Monolog/Formatter/LineFormatter.php:68
1.0851   31439200 253. Monolog\Formatter\NormalizerFormatter->normalize() /home/user/www/parking/vendor/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php:43
1.0852   31439576 254. Monolog\Formatter\NormalizerFormatter->normalize() /home/user/www/parking/vendor/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php:82
1.0852   31439632 255. Monolog\Formatter\NormalizerFormatter->normalize() /home/user/www/parking/vendor/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php:82
1.0852   31439632 256. Monolog\Formatter\LineFormatter->normalizeException() /home/user/www/parking/vendor/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php:95

我在config.yml中的学说部分

dbal:
    driver:   "%database_driver%"
    host:     "%database_host%"
    port:     "%database_port%"
    dbname:   "%database_name%"
    user:     "%database_user%"
    password: "%database_password%"
    charset:  UTF8

orm:
    auto_generate_proxy_classes: "%kernel.debug%"
    naming_strategy: doctrine.orm.naming_strategy.underscore
    auto_mapping: true

composer.json看起来也不错

"require": {
    "php": ">=5.3.3",
    "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",
    "Trsteel/ckeditor-bundle": "~1.6",
    "stof/doctrine-extensions-bundle": "~1.1@dev",
    "symfony/intl": "2.8.*",
    "sensio/generator-bundle": "~2.3",
    "jms/security-extra-bundle": "1.6.*",
    "jms/di-extra-bundle": "1.8.*",
    "gedmo/doctrine-extensions": "<=2.3.x-dev",
    "phpunit/phpunit": "3.7.*",
    "behat/symfony2-extension": "1.1.0",
    "behat/mink-extension": "1.2.0",
    "behat/mink-browserkit-driver":  "1.1.0",
    "behat/mink-zombie-driver":  "1.1.0",
    "hwi/oauth-bundle": "0.4",
    "hipchat/hipchat-php": "dev-master",
    "inori/banklink" : "0.2.4",
    "exercise/htmlpurifier-bundle": "*",
    "symfony/var-dumper": "^3.1",
    "symfony/debug": "^3.1"
},

有人可能会在这里提出错误或我可以尝试的建议吗?

0 个答案:

没有答案