Today, I decided to learn and task myself to create REST API in Symfony2. I have installed composer using this command
curl -sS https://getcomposer.org/installer | php
Now I am installing Voryx REST Generator Bundle using this command
php composer.phar require voryx/restgeneratorbundle dev-master
And I am getting this error
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of package
Problem 1
- Installation request for voryx/restgeneratorbundle dev-master -> s
le by voryx/restgeneratorbundle[dev-master].
- voryx/restgeneratorbundle dev-master requires sensio/generator-bun
-> satisfiable by sensio/generator-bundle[3.0.x-dev, v3.0.0, v3.0.1, v3
.0.3, v3.0.4, v3.0.5, v3.0.6] but these conflict with your requirements
um-stability
Installation failed, reverting ./composer.json to its original content.
This is the github repository for the bundle
https://github.com/voryx/restgeneratorbundle
========EDITTED======== This is the composer.json file
{
"name": "symfony/framework-standard-edition",
"license": "MIT",
"type": "project",
"description": "The \"Symfony Standard Edition\" distribution",
"autoload": {
"psr-0": { "": "src/", "SymfonyStandard": "app/" }
},
"require": {
"php": ">=5.3.3",
"symfony/symfony": "2.5.*",
"doctrine/orm": "~2.2,>=2.2.3",
"doctrine/doctrine-bundle": "~1.2",
"twig/extensions": "~1.0",
"symfony/assetic-bundle": "~2.3",
"symfony/swiftmailer-bundle": "~2.3",
"symfony/monolog-bundle": "~2.4",
"sensio/distribution-bundle": "~3.0",
"sensio/framework-extra-bundle": "~3.0",
"incenteev/composer-parameter-handler": "~2.0"
},
"require-dev": {
"sensio/generator-bundle": "~2.3"
},
"scripts": {
"post-root-package-install": [
"SymfonyStandard\\Composer::hookRootPackageInstall"
],
"post-install-cmd": [
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::removeSymfonyStandardFiles"
],
"post-update-cmd": [
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::removeSymfonyStandardFiles"
]
},
"config": {
"bin-dir": "bin"
},
"extra": {
"symfony-app-dir": "app",
"symfony-web-dir": "web",
"incenteev-parameters": {
"file": "app/config/parameters.yml"
},
"branch-alias": {
"dev-master": "2.5-dev"
}
}
}
Please what am doing wrong?
Don't specify the version of the bundle (dev-master) you want to install: simply let the job to Composer simply launch the command:
php composer.phar require voryx/restgeneratorbundle
And will install the version suitable with your current dependency (0.3.0).
For install a sf3 installation version please refer to the doc here: currently exists various way to install it. With composer you can simply run the command:
php composer.phar create-project symfony/framework-standard-edition my_project_name
Hope this help
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.