I can't install https://packagist.org/packages/fpoirotte/cryptal . Per packagist.org I should be able to do composer require fpoirotte/cryptal
via the CLI but whenever I try to do so I get the following error:
[InvalidArgumentException]
Could not find package fpoirotte/cryptal.
Did you mean one of these?
fpoirotte/cryptal
fpoirotte/cryptal-hash
fpoirotte/cryptal-sodium
fpoirotte/cryptal-mcrypt
fpoirotte/cryptal-openssl
require [--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-suggest] [--no-update] [--no-scripts] [--update-no-dev] [--update-with-dependencies] [--update-with-all-dependencies] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--] [<packages>]...
I'm able to install other composer packages without issue. It's just this one that's having issues..
The default minimum stability for composer is "stable".
From the docs :
"minimum-stability" (root-only): This defines the default behavior for filtering packages by stability. This defaults to stable, so if you rely on a dev package, you should specify it in your file to avoid surprises.
And on the other hand, the package you are trying to install only has a "master" branch and no version tags, so it is considered a "dev" dependency.
You have to options to install this package:
"minimum-stability": "dev",
Although this changes your minimum stability requirements for the whole project, so it may not be ideal.
If you do composer require fpoirotte/cryptal:master-dev
you'll be able to install this package keeping your minimum-stability settings to stable
.
I do not know what version of composer you are running, but it may be worth to update it. The error I get with my version is much more explicit:
[InvalidArgumentException]
Could not find a version of package fpoirotte/cryptal matching your minimum-stability (stable). Require it with an explicit version constraint allowing its desired stability.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.