I wish to install a PEAR package (specifically, the mongodb from pecl.php.net) with Composer.
I can install a package from the main 'pear' channel with the following composer.json:
{ "repositories": [{
"type": "pear",
"url": "https://pear.php.net"
}],
"require": { "pear-pear/http": "*" }
}
(note: an original example from https://getcomposer.org/doc/05-repositories.md#pear is not working)
But I'm getting:
The requested package pear-pecl/mongodb could not be found in any version, there may be a typo in the package name
...when I try to set 'pecl' channel:
"require": { "pear-pecl/mongodb": "*" }
I can see the pecl channel with pear list-channels:
$ pear list-channels
Registered Channels:
====================
Channel Alias Summary
doc.php.net phpdocs PHP Documentation team
pear.php.net pear PHP Extension and Application
Repository
pecl.php.net pecl PHP Extension Community Library
I can install the same package with pear install pecl/mongodb.