问题描述
我已经安装了Symfony 3.4应用程序,并在项目开始时安装了Symfony PHP Unit Bridge。现在,我想将数据夹具实现到我的Mongo数据库中。但是每当我运行this documentation时,就运行 composer require --dev doctrine/doctrine-fixtures-bundle
。我遇到了以下错误。
问题1 -symfony / PHPunit-bridge [v5.1.3]可以满足所请求的软件包symfony / PHPunit-bridge(锁定在v5.1.3,要求为^ 3.0),但这些与您的要求或最低稳定性冲突。
我确实尝试过this solution,但是没有运气。以下是我的composer.json
{
"name": "sofiticaPortal/management","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","alcaeus/mongo-PHP-adapter": "^1.1","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": {
"PHPstan/PHPstan": "^0.12.33","roave/security-advisories": "dev-master","sensio/generator-bundle": "^3.0","squizlabs/PHP_codesniffer": "^3.5","symfony/PHPunit-bridge": "^3.0"
},"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 --coverage-html build/coverage-report","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"
}
]
}
解决方法
仅供参考,请更改
symfony/phpunit-bridge: ^3.0
到
symfony/phpunit-bridge: 5.1.3
解决了这个问题。