symfony - Hautelook Alice Faker With MongoDB (ODM) 无法在 services.yml 中声明
问题描述
我有使用 MongoDB 的 Symfony 应用程序,我正在尝试将 Hautelook Alice Faker 安装到我的应用程序中。所以我确实遵循了与本文档和本文档完全相同的操作。当我尝试在我的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"
}
]
}
我错过了什么吗?
解决方案
推荐阅读
- performance - 使用 LINQ 代替 foreach
- azure - 如何为 linux 诊断设置 azurerm_virtual_machine_extension
- python - 如何不允许用户从私人电报频道转发消息
- python - 是否可以为行为中的单个场景设置“before_all”?
- reactjs - 我在 mapStateToProps 和 render 方法中没有正确重做的错误是什么?以及要解决什么问题?
- javascript - React Router Switch 路由不匹配
- r - 如何更改多列中的数值?
- json - 在powershell中解析响应的问题
- shopify - 我可以通过 AJAX 请求向 Campaign Monitor 提交新订阅者吗?
- html - 如何仅在我的活动页面中自定义导航项元素