使用学说时出错:build --all symfony 1.4.4 撇号 trunk

问题描述 投票:0回答:1

我很困惑为什么当我执行doctrine:build -all 时它会抛出 2 个警告。 我尝试注释掉所有 schema.yml 文件,但它仍然抛出它。 任何更了解情况的人都可以帮助我了解它来自哪里,是否有一些我不知道的缓存?

我已经删除了缓存(./symfony cc)。手动删除所有库/模型、表单、过滤器任务,这样就不会有任何残留且无济于事的东西。我在谷歌上找不到任何关于该错误的信息,所以我很困惑,我想了解错误来自哪里,它还处于该过程的早期阶段,所以我认为它与 yaml 相关,但我不知道如何追踪哪里。

干杯,

保罗

Shell 输出部分如下:

生成模型类的原则 PHP 警告:array_merge():参数 #2 不是 /mnt/Target01/338166/www.example.co.uk/web/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/task/sfDoctrineBaseTask 中的数组。 class.php 第 182 行 PHP 堆栈跟踪: PHP 1. {main}() /mnt/Target01/338166/www.example.co.uk/web/symfony:0 PHP 2.include() /mnt/Target01/338166/www.example.co.uk/web/symfony:14 PHP 3. sfSymfonyCommandApplication->run() /mnt/Target01/338166/www.example.co.uk/web/lib/vendor/symfony/lib/command/cli.php:20 PHP 4. sfTask->runFromCLI() /mnt/Target01/338166/www.example.co.uk/web/lib/vendor/symfony/lib/command/sfSymfonyCommandApplication.class.php:76 PHP 5. sfBaseTask->doRun() /mnt/Target01/338166/www.example.co.uk/web/lib/vendor/symfony/lib/task/sfTask.class.php:97 PHP 6. sfDoctrineBuildTask->execute() /mnt/Target01/338166/www.example.co.uk/web/lib/vendor/symfony/lib/task/sfBaseTask.class.php:68 PHP 7. sfTask->run() /mnt/Target01/338166/www.example.co.uk/web/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/task/sfDoctrineBuildTask.class.php:156 PHP 8. sfBaseTask->doRun() /mnt/Target01/338166/www.example.co.uk/web/lib/vendor/symfony/lib/task/sfTask.class.php:173 PHP 9. sfDoctrineBuildModelTask->execute() /mnt/Target01/338166/www.example.co.uk/web/lib/vendor/symfony/lib/task/sfBaseTask.class.php:68 PHP 10. sfDoctrineBaseTask->prepareSchemaFile() /mnt/Target01/338166/www.example.co.uk/web/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/task/sfDoctrineBuildModelTask.class.php:67 PHP 11. array_merge() /mnt/Target01/338166/www.example.co.uk/web/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/task/sfDoctrineBaseTask.class.php:182

警告:array_merge():参数 #2 不是 /mnt/Target01/338166/www.example.co.uk/web/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/task/sfDoctrineBaseTask 中的数组。 class.php 第 182 行

调用堆栈: 0.0008 47204 1. {main}() /mnt/Target01/338166/www.example.co.uk/web/symfony:0 0.0136 279748 2. include('/mnt/Target01/338166/www.example.co.uk/web/lib/vendor/symfony/lib/command/cli.php') /mnt/Target01/338166/www.example. co.uk/web/symfony:14 0.9075 7815564 3. sfSymfonyCommandApplication->run() /mnt/Target01/338166/www.example.co.uk/web/lib/vendor/symfony/lib/command/cli.php:20 0.9419 7817164 4. sfTask->runFromCLI() /mnt/Target01/338166/www.example.co.uk/web/lib/vendor/symfony/lib/command/sfSymfonyCommandApplication.class.php:76 0.9433 7818056 5. sfBaseTask->doRun() /mnt/Target01/338166/www.example.co.uk/web/lib/vendor/symfony/lib/task/sfTask.class.php:97 1.0198 8445008 6. sfDoctrineBuildTask->execute() /mnt/Target01/338166/www.example.co.uk/web/lib/vendor/symfony/lib/task/sfBaseTask.class.php:68 2.0900 9762304 7. sfTask->run() /mnt/Target01/338166/www.example.co.uk/web/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/task/sfDoctrineBuildTask.class.php:156 2.0907 9764724 8. sfBaseTask->doRun() /mnt/Target01/338166/www.example.co.uk/web/lib/vendor/symfony/lib/task/sfTask.class.php:173 2.0926 9766452 9. sfDoctrineBuildModelTask->execute() /mnt/Target01/338166/www.example.co.uk/web/lib/vendor/symfony/lib/task/sfBaseTask.class.php:68 2.1560 9789556 10.sfDoctrineBaseTask->prepareSchemaFile() /mnt/Target01/338166/www.example.co.uk/web/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/task/sfDoctrineBuildModelTask.class.php:67 4.3235 10119764 11. array_merge() /mnt/Target01/338166/www.example.co.uk/web/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/task/sfDoctrineBaseTask.class.php:182

文件+ /tmp/doctrine_schema_70082.yml

php doctrine symfony1
1个回答
0
投票

我刚刚偶然发现了同样的错误。我在 schema.yml 中定义了一个空表名,出现了错误:

SomeTableNameThatShouldHaveBeenRemoved:
SomeOtherTableName:
  colums:
    id: etc. pp

人们会认为很容易发现,但当抛出如此模糊的警告时......

© www.soinside.com 2019 - 2024. All rights reserved.