具有MongoDBODM的Hautelook Alice Faker无法在services.yml中声明

问题描述

我有使用MongoDB的Symfony应用程序,我正在尝试将Hautelook Alice Faker安装到我的应用程序中。因此,我确实遵循与this documentationthis documentation相同的方法。当我尝试在我的services.yml文件注册并运行./bin/console时,它显示了以下错误

“ hautelook_alice.data_fixtures.loader.file_resolver_loader”服务依赖于不存在的“ fidry_alice_data_fixtures.doctrine.purger_loader”服务。

下面是我在serivice.yml文件中的安装方式。

    fidry_alice_data_fixtures.persistence.purger_factory.doctrine:
      class: Fidry\AliceDataFixtures\Bridge\Doctrine\Purger\Purger
      arguments:
        - '@doctrine_mongodb.odm.document_manager'

此外,我已经按照以下说明在AppKernal.PHP注册

 if (in_array($this->getEnvironment(),['dev','test'],true)) {
            $bundles[] = new Symfony\Bundle\DebugBundle\DebugBundle();
            $bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
            $bundles[] = new Sensio\Bundle\distributionBundle\SensiodistributionBundle();
            $bundles[] = new Nelmio\Alice\Bridge\Symfony\NelmioAliceBundle();
            $bundles[] = new Fidry\AliceDataFixtures\Bridge\Symfony\FidryAliceDataFixturesBundle();
            $bundles[] = new Hautelook\AliceBundle\HautelookAliceBundle();

            if ('dev' === $this->getEnvironment()) {
                $bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle();
                $bundles[] = new Symfony\Bundle\WebServerBundle\WebServerBundle();
            }
        }

这是我的composer.json文件

{
    "name": "mma/mmb","license": "proprietary","type": "project","autoload": {
        "psr-4": {
            "AppBundle\\": "src/AppBundle"
        },"classmap": [
            "app/AppKernel.PHP","app/AppCache.PHP"
        ]
    },"autoload-dev": {
        "psr-4": {
            "Tests\\": "tests/"
        },"files": [
            "vendor/symfony/symfony/src/Symfony/Component/VarDumper/Resources/functions/dump.PHP"
        ]
    },"require": {
        "PHP": ">=7.1","ext-intl": "*","ext-json": "*","ext-mongodb": "^1.5.3","aws/aws-sdk-PHP": "^3.0","bankofmaldives/bml-connect-PHP": "^2.0","beepsolutions/beep-PHP": "^2.0","defuse/PHP-encryption": "^2.2","doctrine/dbal": "^2.6.0","doctrine/doctrine-bundle": "^1.6","doctrine/mongodb-odm-bundle": "^3.5.0","doctrine/orm": "^2.6","donatj/PHPuseragentparser": "^0.15.0","dziki/monolog-sentry-bundle": "^1.0","friendsofsymfony/user-bundle": "~2.0","incenteev/composer-parameter-handler": "^2.0","intercom/intercom-PHP": "3.1","intriro/csv-bundle": "^1.0","jms/serializer": "^3.6","knplabs/knp-gaufrette-bundle": "^0.5.0","knplabs/knp-paginator-bundle": "2.8.0","mailjet/mailjet-apiv3-PHP": "1.3.0","mailjet/mailjet-bundle": "^1.0","misteio/cloudinary-bundle": "^0.2.0","oneup/uploader-bundle": "^2.2","onfido/api-PHP-client": "^3.1.0","ornicar/gravatar-bundle": "^1.1","pmill/aws-cognito": "dev-master","pomelopay/pomelopay-connect-PHP": "^2.0","samiaraboglu/one-signal-api-bundle": "^2.0","sensio/distribution-bundle": "^5.0.19","sensio/framework-extra-bundle": "^5.0.0","stof/doctrine-extensions-bundle": "1.3","surfnet/messagebird-api-client-bundle": "^4.1","symfony/monolog-bundle": "^3.1.0","symfony/polyfill-apcu": "^1.0","symfony/swiftmailer-bundle": "^2.6.4","symfony/symfony": "3.4.*","twig/extensions": "^1.5","twig/twig": "^1.0||^2.0","vich/uploader-bundle": "1.11.0","willdurand/negotiation": "^2.3"
    },"require-dev": {
        "alcaeus/mongo-PHP-adapter": "^1.1","doctrine/data-fixtures": "^1.4","doctrine/doctrine-fixtures-bundle": "^3.3","doctrine/mongodb-odm": "^1.1","hautelook/alice-bundle": "^2.7","PHPstan/PHPstan": "^0.12.33","roave/security-advisories": "dev-master","sensio/generator-bundle": "^3.0","squizlabs/PHP_codesniffer": "^3.5","symfony/PHPunit-bridge": "5.1.3","theofidry/alice-data-fixtures": "^1.2"
    },"scripts": {
        "symfony-scripts": [
            "Sensio\\Bundle\\distributionBundle\\Composer\\ScriptHandler::buildBootstrap","Sensio\\Bundle\\distributionBundle\\Composer\\ScriptHandler::installrequirementsFile","Sensio\\Bundle\\distributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget"
        ],"post-install-cmd": [
            "@symfony-scripts"
        ],"post-update-cmd": [
            "@symfony-scripts"
        ],"test": "./vendor/bin/simple-phpunit -c ./PHPunit.xml ./tests","PHPcs": "./vendor/bin/PHPcs --extensions=PHP --standard=PSR2 ./src/*","stan" : "./vendor/bin/PHPstan analyse --level=7 ./src"
    },"config": {
        "sort-packages": true,"platform": {
            "ext-mongo": "1.6.16"
        }
    },"minimum-stability": "stable","extra": {
        "symfony-app-dir": "app","symfony-bin-dir": "bin","symfony-var-dir": "var","symfony-web-dir": "web","symfony-tests-dir": "tests","symfony-assets-install": "relative","incenteev-parameters": {
            "file": "app/config/parameters.yml"
        },"branch-alias": null
    },"repositories": [
        {
            "type": "vcs","url": "https://github.com/onfido/api-PHP-client.git"
        }
    ]
}

我错过了什么吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)