Get Composer Packages
The typical way of getting a Composer package is referencing it using the composer
tool.
Open the root directory of the project where you want to add a package reference. Note that the project must have the
composer.json
file.Configure connection to the Composer repository. For example:
composer config repositories.mycomposerrepo composer https://composer.pkg.jetbrains.space/mycompany/p/projectKey/mycomposerrepo
Optionally, if you want
composer
to look for packages only in Space Composer repository, you can disable the Packagist repository:composer config repositories.packagist.org false
Provide
composer
the token and your Space username. For example:composer config --global --auth http-basic.composer.pkg.jetbrains.space username here-goes-token
In Space, open Packages and find the desired Composer package.
Open the package properties page.
In the snippets field, select your tool and copy the snippet code. For example:
composer require mypackage:dev
Run the snippet on your local machine.
Thanks for your feedback!
Was this page helpful?