Epharion
Epharion

Reputation: 1071

How can we easily update our own vendor in symfony?

I have a symfony project.
I have a bundle in my vendor directory. This bundle belongs to me. The bundle is hosted in our own server (git).
This bundle is constantly evolving.

My question is :
Is it possible to update this bundle inside my symfony project ?
I tried but I don't know how to push the updated code...

For the moment, I am obliged to import the bundle in a new project, do the update, commit and push, and finally do the "composer update" in symdony project.
It is a bit complicated.

Do you have another way to do that ?

Upvotes: 1

Views: 998

Answers (1)

Jeff Lambert
Jeff Lambert

Reputation: 24661

I think you can do this with composer alone. You can specify your dependencies to come directly from a branch in your git repository. Example below uses github, but you should be able to use your git server instead:

{
    "repositories": [
        {
            "type": "git",
            "url": "https://github.com/username/repository"
        }
    ],
    "require": {
        "username/repository": "dev-branch_name"
    }

}

Then you can just do your edits inside of the bundle's repository, commit, push, and just run composer update to pull your changes in to your current project.

Upvotes: 1

Related Questions