1
votes

I made a tiny bundle that saves a lot of time when you want to create a restfull api on symfony2 using FosRestBundle and jmsSerializer.

I would like to share this bundle in my projects, but when i add it to its destination, composers returns "Your requirements could not be resolved to an installable set of packages."

I guess i made something wrong but can not find out what

{
    "name": "lenim/api-generic-bundle",
    "type": "symfony-bundle",
    "description": "Rest Api creation helper",
    "keywords": ["Api", "RestApi"],
    "homepage": "http://friendsofsymfony.github.com",
    "license": "MIT",
    "minimum-stability" : "dev",
    "target-dir": "LeniM/ApiGenericBundle",
    "authors": [
        {
            "name": "Martin Leni",
            "role" : "Developer"
        }
    ],
    "require": {
        "php": ">=5.3.3",
        "symfony/framework-bundle": "~2.3|~3.0",
        "doctrine/orm": "^2.5",
        "friendsofsymfony/rest-bundle": "^1.7",
        "jms/serializer-bundle": "^1.1"
    },
    "require-dev": {
        "symfony/console": "~2.3|~3.0",
        "symfony/phpunit-bridge": "~2.7|~3.0",
        "symfony/validator": "~2.3|~3.0",
        "symfony/yaml": "~2.3|~3.0",
        "willdurand/propel-typehintable-behavior": "~1.0"
    },
    "suggest": {
        "nelmio/NelmioApiDocBundle": "More than recommanded to keep your api well documentated"
    },
    "autoload": {
        "psr-4": { "LeniM\\ApiGenericBundle\\": "" }
    },
    "extra": {
        "branch-alias": {
            "dev-master": "1.0.x-dev"
        }
    },
    "support": {
        "docs": "https://github.com/LeniM/apiGenericBundle/readme.md"
    }
}
  • required it with its name : lenim/api-generic-bundle

Is there something else to do to register your thrid part bundle to composer ?

Thanks :)

1

1 Answers

2
votes

You have to either publish this package on packagist.org or specify target repository path in particular project's composer.json file: https://getcomposer.org/doc/05-repositories.md#vcs