8

I know you can install packages from any pear channel, and I have this working on a basic pear package

...
"repositories": [
    {
        "type": "pear",
        "url": "http://pear.php.net"
    }
],
"require-dev": {
    "pear-pear/Mail": "*"
}
...

What I'm trying to do is install a dependency for testing from a different channel.

sudo pear channel-discover phpseclib.sourceforge.net
sudo pear install phpseclib/Net_SSH2

I've tried just about every config combination that I can think of in my composer.json to get this package to install, but it never seems to find anything or work.

What is the correct way/configuration, in my composer.json, to get this package to install?

neubert
  • 15,947
  • 24
  • 120
  • 212
veilig
  • 5,085
  • 10
  • 48
  • 86

1 Answers1

15

Not sure if this is the correct way, but I got it working w/ the following config.

...
"repositories": [
    {
        "type": "pear",
        "url": "http://pear.php.net"
    },
    {
        "type": "pear",
        "url": "http://phpseclib.sourceforge.net",
        "vendor-alias": "phpseclib"
    }
],
"require-dev": {
    "pear-pear/Mail": "*",
    "phpseclib/Net_SSH2": "*"
}
...
veilig
  • 5,085
  • 10
  • 48
  • 86
  • 5
    I didn't know you could install PEAR packages via composer lol. That said you shouldn't need to with phpseclib as phpseclib has an entry at packagist.org. – neubert Feb 03 '14 at 18:08