Skip to content

Instantly share code, notes, and snippets.

@epicsagas
Forked from ziadoz/composer_path.json
Created August 14, 2024 07:56
Show Gist options
  • Save epicsagas/73a247f2e0961c43ee9626fddfe86b08 to your computer and use it in GitHub Desktop.
Save epicsagas/73a247f2e0961c43ee9626fddfe86b08 to your computer and use it in GitHub Desktop.

Revisions

  1. @ziadoz ziadoz revised this gist Aug 4, 2016. 2 changed files with 2 additions and 2 deletions.
    2 changes: 1 addition & 1 deletion composer_path.json
    Original file line number Diff line number Diff line change
    @@ -6,6 +6,6 @@
    }
    ],
    "require": {
    "local-project": "dev-branch-name"
    "${project}": "dev-${branch}"
    }
    }
    2 changes: 1 addition & 1 deletion composer_vcs.json
    Original file line number Diff line number Diff line change
    @@ -6,6 +6,6 @@
    }
    ],
    "require": {
    "local-project": "dev-branch-name"
    "${project}": "dev-${branch}"
    }
    }
  2. @ziadoz ziadoz revised this gist Jan 15, 2016. 2 changed files with 2 additions and 2 deletions.
    2 changes: 1 addition & 1 deletion composer_path.json
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@
    "repositories": [
    {
    "type": "path",
    "url": "../relative/path/to/local/project/vcs"
    "url": "../relative/project/path"
    }
    ],
    "require": {
    2 changes: 1 addition & 1 deletion composer_vcs.json
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@
    "repositories": [
    {
    "type": "vcs",
    "url": "/path/to/local/project/vcs"
    "url": "/absolute/project/path"
    }
    ],
    "require": {
  3. @ziadoz ziadoz revised this gist Jan 15, 2016. 2 changed files with 4 additions and 4 deletions.
    4 changes: 2 additions & 2 deletions composer_path.json
    Original file line number Diff line number Diff line change
    @@ -1,8 +1,8 @@
    {
    "repositories": [
    {
    "type":"path",
    "url":"../relative/path/to/local/project/vcs"
    "type": "path",
    "url": "../relative/path/to/local/project/vcs"
    }
    ],
    "require": {
    4 changes: 2 additions & 2 deletions composer_vcs.json
    Original file line number Diff line number Diff line change
    @@ -1,8 +1,8 @@
    {
    "repositories": [
    {
    "type":"vcs",
    "url":"/path/to/local/project/vcs"
    "type": "vcs",
    "url": "/path/to/local/project/vcs"
    }
    ],
    "require": {
  4. @ziadoz ziadoz revised this gist Jan 15, 2016. 3 changed files with 29 additions and 2 deletions.
    11 changes: 11 additions & 0 deletions composer_path.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    {
    "repositories": [
    {
    "type":"path",
    "url":"../relative/path/to/local/project/vcs"
    }
    ],
    "require": {
    "local-project": "dev-branch-name"
    }
    }
    File renamed without changes.
    20 changes: 18 additions & 2 deletions notes.md
    Original file line number Diff line number Diff line change
    @@ -1,11 +1,27 @@
    # Notes

    You can pull in a local project (e.g. for testing changes) using either `vcs` or `path` repository types in Composer:

    ## VCS

    Put the path to the local project VCS (Git, Hg, SVN etc) in the `url` field.

    Prefix the branch name with `dev-`, so `my-branch` becomes `dev-my-branch`.
    See: `composer_vcs.json`

    ## Path

    Put the relative path to the local project in the `url` field.

    See: `composer_path.json`

    ## Branch

    Prefix the branch name you want to use with `dev-`, so `my-branch` becomes `dev-my-branch`.

    # Links

    [Install a Local Package with Composer](http://marekkalnik.tumblr.com/post/22929686367/composer-installing-package-from-local-git)

    [Using a Branch as a Dependency in Composer](http://www.lornajane.net/posts/2014/use-a-github-branch-as-a-composer-dependency)
    [Using a Branch as a Dependency in Composer](http://www.lornajane.net/posts/2014/use-a-github-branch-as-a-composer-dependency)

    [Composer Path Repositories](https://getcomposer.org/doc/05-repositories.md#path)
  5. @ziadoz ziadoz revised this gist Jul 22, 2015. No changes.
  6. @ziadoz ziadoz revised this gist Jul 22, 2015. 1 changed file with 7 additions and 4 deletions.
    11 changes: 7 additions & 4 deletions notes.md
    Original file line number Diff line number Diff line change
    @@ -1,8 +1,11 @@
    # Notes

    [Install a Local Package with Composer](http://marekkalnik.tumblr.com/post/22929686367/composer-installing-package-from-local-git)
    [Using a Branch as a Dependency in Composer](http://www.lornajane.net/posts/2014/use-a-github-branch-as-a-composer-dependency)

    Put the path to the local project VCS (Git, Hg, SVN etc) in the `url` field.

    Prefix the branch name with `dev-`, so `my-branch` becomes `dev-my-branch`.
    Prefix the branch name with `dev-`, so `my-branch` becomes `dev-my-branch`.

    # Links

    [Install a Local Package with Composer](http://marekkalnik.tumblr.com/post/22929686367/composer-installing-package-from-local-git)

    [Using a Branch as a Dependency in Composer](http://www.lornajane.net/posts/2014/use-a-github-branch-as-a-composer-dependency)
  7. @ziadoz ziadoz revised this gist Jul 22, 2015. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions notes.md
    Original file line number Diff line number Diff line change
    @@ -4,4 +4,5 @@
    [Using a Branch as a Dependency in Composer](http://www.lornajane.net/posts/2014/use-a-github-branch-as-a-composer-dependency)

    Put the path to the local project VCS (Git, Hg, SVN etc) in the `url` field.

    Prefix the branch name with `dev-`, so `my-branch` becomes `dev-my-branch`.
  8. @ziadoz ziadoz created this gist Jul 22, 2015.
    11 changes: 11 additions & 0 deletions composer.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    {
    "repositories": [
    {
    "type":"vcs",
    "url":"/path/to/local/project/vcs"
    }
    ],
    "require": {
    "local-project": "dev-branch-name"
    }
    }
    7 changes: 7 additions & 0 deletions notes.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    # Notes

    [Install a Local Package with Composer](http://marekkalnik.tumblr.com/post/22929686367/composer-installing-package-from-local-git)
    [Using a Branch as a Dependency in Composer](http://www.lornajane.net/posts/2014/use-a-github-branch-as-a-composer-dependency)

    Put the path to the local project VCS (Git, Hg, SVN etc) in the `url` field.
    Prefix the branch name with `dev-`, so `my-branch` becomes `dev-my-branch`.