gpt4 book ai didi

Symfony 2.1.7 和学说迁移 bundle 错误

转载 作者:行者123 更新时间:2023-12-04 05:12:25 25 4
gpt4 key购买 nike

我正在关注本教程:http://tutorial.symblog.co.uk/docs/extending-the-model-blog-comments.html#doctrine-2-migrations

1) 安装 Doctrine 迁移包

1.1) - 添加

 "doctrine/migrations": "dev-master",
"doctrine/doctrine-migrations-bundle": "dev-master"

到 composer.json

1.2) 运行
 php composer.phar update

2) 添加
new Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle(),

在 AppKernel.php 中

3) 运行
php app/console doctrine:migrations:diff

这应该运行命令并找到当前实体和数据库之间的差异,是吗?
但我收到一个错误:
 Fatal error: Class 'Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle' not found in D:\xampp\htdocs\symblog.dev\app\AppKernel.php on line 23

这正是 (2.)

你能帮我吗?欢迎任何建议!

最佳答案

我认为 bundle 同时被重命名。尝试:(更新问题):

// app/AppKernel.php
public function registerBundles()
{
$bundles = array(
//...
new Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle(),
);
}

DoctrineMigrationsBundle documentation DoctrineMigrationsBundle class .

关于Symfony 2.1.7 和学说迁移 bundle 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14733257/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com