Reputation: 3860
Welcome !
I have created a symfony repo locally , and I want to test it on a new folder.
in the folder
/usr/share/nginx/www/gitproject
, I have a .git folder and I have the remote repo in
/usr/share/gitproject
I want to install the project in the folder
/usr/share/nginx/www/project
I think my composer should be like this ?
{
"require" : {
"symfony/framework-standard-edition" : "dev-master"
},
"repositories" : [{
"type" : "vcs",
"url" : "/usr/share/nginx/www/gitproject/"
}]
}
But I have a dependency problem when running composer update
.
Problem 1
- symfony/framework-standard-edition dev-master requires doctrine/mongodb-odm dev-master -> no matching package found.
My Question is : What should I put in the composer , since my gitrepo depends on those vendors , and I think it would be ok to put just 1 dependency that dependson other vendors.
In other words , if A depends On B and B depends on C & D & E , you put only A in dependency and it gets all the dependecies.
Am I wrong?
Appendix
this is the composer file for the symfony project
{
"name": "symfony/framework-standard-edition",
"license": "MIT",
"type": "project",
"description": "The \"Symfony Standard Edition\" distribution",
"autoload": {
"psr-0": {
"": "src/"
}
},
"require": {
"php": ">=5.3.3",
"symfony/symfony": "~2.4",
"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": "~2.3",
"sensio/framework-extra-bundle": "~3.0",
"sensio/generator-bundle": "~2.3",
"doctrine/mongodb-odm": "dev-master",
"doctrine/mongodb-odm-bundle": "dev-master",
"incenteev/composer-parameter-handler": "~2.0",
"friendsofsymfony/elastica-bundle": "3.0.*@dev",
"matthecat/htmlcompressor-bundle": "dev-master",
"salva/jshrink-bundle": "1.0.*@dev",
"cboden/Ratchet": "0.3.*",
"react/zmq": "0.2.*"
},
"scripts": {
"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"],
"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"]
},
"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.4-dev"
}
}
}
Upvotes: 1
Views: 358
Reputation: 335
You should create project with:
composer create-project symfony/framework-standard-edition myproject/ ~2.5
(see http://symfony.com/doc/current/quick_tour/the_big_picture.html). create-project is more than just require the package and this is the preferred way to install symfony.
The reason why composer can not find mongo package is default stability:
minimum-stability (root-only)#
This defines the default behavior for filtering packages by stability. This defaults to stable, so if you rely on a dev package, you should specify it in your file to avoid surprises.
(more: https://getcomposer.org/doc/04-schema.md#minimum-stability).
Upvotes: 1
Reputation: 458
You should add all the requirements to your new composer :
{
"require" : {
"php": ">=5.3.3",
"symfony/symfony": "2.4",
"twig/extensions": "~1.0",
"symfony/assetic-bundle": "~2.3",
"symfony/swiftmailer-bundle": "~2.3",
"symfony/monolog-bundle": "~2.4",
"sensio/distribution-bundle": "~2.3",
"sensio/framework-extra-bundle": "~3.0",
"sensio/generator-bundle": "~2.3",
"doctrine/mongodb-odm": "dev-master",
"doctrine/mongodb-odm-bundle": "dev-master",
"incenteev/composer-parameter-handler": "~2.0",
"friendsofsymfony/elastica-bundle": "3.0.*@dev",
"matthecat/htmlcompressor-bundle": "dev-master",
"salva/jshrink-bundle": "1.0.*@dev",
"cboden/Ratchet": "0.3.*",
"react/zmq": "0.2.*",
"symfony/framework-standard-edition" : "dev-master"
},
"repositories" : [{
"type" : "vcs",
"url" : "/usr/share/nginx/www/gitneargood/"
}]
}
Upvotes: 1