Developer
Developer

Reputation: 2895

creating fork of Symfony vendor github bundle

I want create some new features to vendor (sonata-page-bundle) i create fork , here is it https://github.com/grekpg/SonataPageBundle

add repository to composer.json

  "repositories": [
        {
            "type": "vcs",
            "url":  "[email protected]:grekpg/SonataPageBundle.git"
        },

rename composer.json inside bundle

"name": "grekpg/page-bundle",

add to symfony composer.json

"require": {
   "grekpg/page-bundle": "dev-master",

I do this and have files.

But when i try add vendor/grekpg/page-bundle to phpstorm version control it like non git repository. I should create git repo and add remote ?

Upvotes: 0

Views: 187

Answers (1)

M. Kebza
M. Kebza

Reputation: 1508

Default composer installs only source code without repository information. To install with git repository add to your project composer

...
"config": {
    "preferred-install": {
        "grekpg/*": "source",
        "*": "dist"
    },
    ...
},
...

Then reinstall all vendors (remove vendor dir and run composer update again). Now you should get repository inside vendor folder, so you can commit / push etc.

Upvotes: 1

Related Questions