1

I have this in my composer.json file:

"require": {
    "phpmd/phpmd:": "1.4.0"
}

When I do:

php composer.phar update

I get:

Problem 1 - The requested package phpmd/phpmd: 1.4.0 could not be found.

In the documentation they say it can be isntalled through composer with the line I used - "phpmd/phpmd:": "1.4.0".

But it's not working.

http://phpmd.org/download/index.html

Why?

Jurian Sluiman
  • 13,498
  • 3
  • 67
  • 99
Richard Knop
  • 81,041
  • 149
  • 392
  • 552

1 Answers1

0

The phpmd/phpmd package is at packagist (https://packagist.org/packages/phpmd/phpmd), the default repository for composer to search for packages. Not being able to locate phpmd sounds like you either have an offline system, a problem with your network or packagist.org had a timeout.

/edit:

I see you have a typo. Don't write phpmd/phpmd: but phpmd/phpmd (without the trailing colon).

Jurian Sluiman
  • 13,498
  • 3
  • 67
  • 99
  • No, I can install any other library with composer (phpcs, phpunit, doctrine, symfony, zend framework 2). Only phpmd fails. – Richard Knop Nov 22 '12 at 15:59
  • Before I wrote this down I tested it (and now I write this comment, I did it again). Both times I installed phpmd without any problem. The exact line I require is `"phpmd/phpmd": "1.4.0"` – Jurian Sluiman Nov 22 '12 at 16:07
  • 2
    I added some check so that next time you'll see: The requested package phpmd/phpmd: could not be found, it looks like its name is invalid, ":" is not allowed in package names. – Seldaek Nov 22 '12 at 19:03