Skip to content

Instantly share code, notes, and snippets.

@romanzipp
Last active November 20, 2020 07:08
Show Gist options
  • Select an option

  • Save romanzipp/89ae95077e48e0fecc6d44ec1c4c1654 to your computer and use it in GitHub Desktop.

Select an option

Save romanzipp/89ae95077e48e0fecc6d44ec1c4c1654 to your computer and use it in GitHub Desktop.
Add local composer package for development

1. (optional) Remove remote package

composer remove author/package

2. Add local repository

Add the symlink option if your filesystem supports symlinks.

The url value can be the absolute or relative path to the package

{
    "repositories": [
        {
            "type": "path",
            "url": "/Users/author/Code/folder",
            "options": {
                "symlink": true
            }
        }
    ]
}

3. Require the package again

Be sure, to add the @dev version

composer require author/package @dev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment