小编Faz*_*Faz的帖子

symfony4.1.3导入Doctrine\Bundle\FixturesBundle\Fixture无法解析

我正在学习 Symfony 4.1.3。

我已经用作曲家创建了我的演示项目:

composer -V: Composer version 1.7.1 2018-08-07 09:39:23
Run Code Online (Sandbox Code Playgroud)

我已经安装了 orm-fixtures:

composer require orm-fixture
    Using version ^3.0 for doctrine/doctrine-fixtures-bundle
    ./composer.json has been updated
    Loading composer repositories with package information
    Updating dependencies (including require-dev)
    Restricting packages listed in "symfony/symfony" to "4.1.*"
    Nothing to install or update
    Generating autoload files
    ocramius/package-versions:  Generating version class...
    ocramius/package-versions: ...done generating version class
Run Code Online (Sandbox Code Playgroud)

然后我创建了我的装置:

php bin/console make:fixtures
Run Code Online (Sandbox Code Playgroud)

文件 src/DataFixtures/ArticleFixtures.php 已创建:

<?php
namespace App\DataFixtures;

use Doctrine\Common\Persistence\ObjectManager;
use Doctrine\Bundle\FixturesBundle\Fixture;

class ArticleFixtures extends Fixture
{

    public function …
Run Code Online (Sandbox Code Playgroud)

symfony4

4
推荐指数
1
解决办法
1601
查看次数

标签 统计

symfony4 ×1