En mi caso necesitaba hacer uso de unas librerías para el envío de notificaciones push en IOS:
https://github.com/duccio/ApnsPHP
Este el aspecto mas o menos del fichero composer.json de un proyecto de symfony
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | { "name": "symfony/framework-standard-edition", "description": "The \"Symfony Standard Edition\" distribution", "autoload": { "psr-0": { "": "src/" } } "require": { "php": ">=5.3.3", "symfony/symfony": "2.2.*", "doctrine/orm": "~2.2,>=2.2.3", "doctrine/doctrine-bundle": "1.2.*", "doctrine/mongodb-odm": "1.0.*@dev", "doctrine/mongodb": "1.*", "doctrine/mongodb-odm-bundle": "3.0.*@dev", "twig/extensions": "1.0.*", "symfony/assetic-bundle": "2.1.*", "symfony/swiftmailer-bundle": "2.2.*", "symfony/monolog-bundle": "2.2.*", "sensio/distribution-bundle": "2.2.*", "sensio/framework-extra-bundle": "2.2.*", "sensio/generator-bundle": "2.2.*", "jms/security-extra-bundle": "1.4.*" }, "scripts": { "post-install-cmd": [ "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": [ "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" }, "minimum-stability": "alpha", "extra": { "symfony-app-dir": "app", "symfony-web-dir": "web", "branch-alias": { "dev-master": "2.2-dev" } } } |
Así es como queda después de añadir nuestro repositorio git :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | { "name": "symfony/framework-standard-edition", "description": "The \"Symfony Standard Edition\" distribution", "autoload": { "psr-0": { "": "src/", "ApnsPHP_" : "vendor/duccio/ApnsPHP" } }, "repositories": [{ "type": "package", "package": { "name": "duccio/ApnsPHP", "version": "1.0.0", "source": { "url": "https://github.com/duccio/ApnsPHP.git", "type": "git", "reference": "master" } } }], "require": { "php": ">=5.3.3", "symfony/symfony": "2.2.*", "doctrine/orm": "~2.2,>=2.2.3", "doctrine/doctrine-bundle": "1.2.*", "doctrine/mongodb-odm": "1.0.*@dev", "doctrine/mongodb": "1.*", "doctrine/mongodb-odm-bundle": "3.0.*@dev", "twig/extensions": "1.0.*", "symfony/assetic-bundle": "2.1.*", "symfony/swiftmailer-bundle": "2.2.*", "symfony/monolog-bundle": "2.2.*", "sensio/distribution-bundle": "2.2.*", "sensio/framework-extra-bundle": "2.2.*", "sensio/generator-bundle": "2.2.*", "jms/security-extra-bundle": "1.4.*", "duccio/ApnsPHP" : "*" }, "scripts": { "post-install-cmd": [ "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": [ "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" }, "minimum-stability": "alpha", "extra": { "symfony-app-dir": "app", "symfony-web-dir": "web", "branch-alias": { "dev-master": "2.2-dev" } } } |
Se hacen varios pasos
1 - se declara el repositorio (linea 7 hasta la 18).
2 - se pone como dependencia del proyecto( linea 35 ).
3 - se declara el autoload de la librería en cuestión (linea 5).
Podéis ver el artículo original donde me documenté aquí (¡Gracias Pedro!)

