gpt4 book ai didi

php - Symfony 3.4 和 Fixtures Bundle 问题与捆绑版本 3.0

转载 作者:行者123 更新时间:2023-12-01 01:48:39 26 4
gpt4 key购买 nike

我正在尝试从以下位置配置 bundle :https://symfony.com/doc/master/bundles/DoctrineFixturesBundle/index.html

当我尝试运行命令时:

$ php bin/console doctrine:fixtures:load

出现错误:在 LoadDataFixturesDoctrineCommand.php 第 95 行: 找不到任何要加载的夹具服务。

最佳答案

你需要更新 (app/config/services.yml)

services:
resource: '../../src/DataFixtures/*'

https://symfony.com/doc/master/bundles/DoctrineFixturesBundle/index.html

其他问题在上面的教程中

// src/DataFixtures/AppFixtures.php
namespace App\DataFixtures;

命名空间应该是:

namespace DataFixtures;

关于php - Symfony 3.4 和 Fixtures Bundle 问题与捆绑版本 3.0,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50252845/

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