Question

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?

Was it helpful?

Solution

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).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top