2

I am trying to install gitlist from github. In the doc, I am told to install as dependencies : some packages as phpcpd, phploc. So I installed composer and I added in the composer.json the folowing entries "phpcpd/phpcpd": "1.4.", "phploc/phploc": "1.7.". When I try o build the project with ant, I have the following message :

Your requirements could not be resolved to an installable set of packages. [exec] [exec] Problem 1 [exec] - The requested package phpcpd/phpcpd * could not be found. [exec] Problem 2 [exec] - The requested package phploc/phploc * could not be found. 

So I downloaded the phpcpd.phar and phploc.phar files but I don't know what I can do with it. Can I directly extract the files from the archive and put it in the vendor folder? By the way, why the packages are not found by composer

2
  • It probably can't find those packages because it doesn't have the correct repository URL for those packages. In your composer.json file, do you have something like "repositories": [ { "type": "composer", "url": "http://packages.somesite.com/" } ], THis would tell it where to find those packages. Commented Oct 21, 2012 at 21:44
  • @drew010, no I don't have any informations as such. I know I can download phpcpd running wget pear.phpunit.de/get/phpcpd.phar. This is the url I should add ? Commented Oct 21, 2012 at 21:52

3 Answers 3

2

I don't think either of those tools are composer packages yet. Did you just guess?

The github page for phpcpd does not have a composer.json, and on packagist the package cannot be found.

Sign up to request clarification or add additional context in comments.

1 Comment

It already has composer.json in there since 27.02.2017 and can be installed using composer require --dev sebastian/phpcpd.
2

Composer has a PEAR type repository you need to use to install packages from PEAR.

{ "repositories": [ { "type": "pear", "url": "http://pear2.php.net" } ], "require": { "pear-pear2.php.net/PEAR2_Text_Markdown": "*", "pear-pear2/PEAR2_HTTP_Request": "*" } } 

From: http://getcomposer.org/doc/05-repositories.md#pear

Comments

0

For the googlers like me ...

"repositories": [ { "type": "pear", "url": "http://pear.phpunit.de" } ], "require-dev": { "pear-pear.phpunit.de/phpcpd": "*", "pear-pear.phpunit.de/phploc": "*", "pear-pear.phpunit.de/PHP_CodeBrowser": "*" } 

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.