R
R
RaDir2019-10-05 23:26:42
Composer
RaDir, 2019-10-05 23:26:42

Why composerer does not connect the branch I need from the repository?

Hello!
There is a repository on bitbucket, I try to connect this repository to the project:
composer require test/lib:dev-master,
in response I get:

[InvalidArgumentException]
  Could not find package test/lib in a version matching dev-master
.
There are 3 branches in turnip: master, develop and release-1.0.1. This is how composer require test/libthe release-1.0.1 branch is connected. How to connect the branch I need?
Branches:
5d9906c36c8ed003386342.jpeg
Off.doc:
https://getcomposer.org/doc/03-cli.md#require
Additional attempts:
composer require test/lib:develop
composer require test/lib:master
[UnexpectedValueException]
  Could not parse version constraint develop: Invalid version string "develop"

[InvalidArgumentException]
  Could not find package test/lib in a version matching master

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
alhimik1986, 2020-07-02
@alhimik1986

Try adding -devat the end of the branch you need:
composer require test/lib:master-dev
composer require test/lib:release-1.0.1-dev
If it says that it cannot find the specified package test/lib, then it is not on packagist.org (composer looks for packages there by default), therefore, you need to write the package address in composer.json:

"repositories": [
    {
      "type": "git",
      "url": "[email protected]:test/lib.git"
    },
 ]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question