Skip to content

Instantly share code, notes, and snippets.

@yusufhm
Created March 28, 2022 06:48
Show Gist options
  • Save yusufhm/858a527ea77981ed6b9d0352b66aee61 to your computer and use it in GitHub Desktop.
Save yusufhm/858a527ea77981ed6b9d0352b66aee61 to your computer and use it in GitHub Desktop.
composer use local directory

Add the following snippet to ~/.composer/config.json:

{
  "repositories": [
        {
            "type": "path",
            "url": "/path/to/package",
            "options": {
                "versions": {
                    "owner/repo": "3.1.10"
                },
                "symlink": false
            }
        }
    ]
}

versions is optional and can be used to replace a specific package version when required. symlink can be set to true or false depending on what's required when developing.

References:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment