ekino/php-metric — pull request #1 by elazar (2012-11-03 15:24:37+00:00)
Title: Attempting to correct a Composer autoloading issue

It's possible that this is simply ignorance of how Composer works on my part, but here's my situation. I set this repo as a Composer dependency of my project like so:

```JSON
{
"require": {
"ekino/metric": "dev-master"
}
}
```

Running `php composer.phar install` causes the repo to be installed to this path relative to the project root: `vendor/ekino/metric/Ekino/Metric/lib`. The `Ekino/Metric` segment seems to come from its `target-dir` setting value and the `lib` segment comes from its `autoload` configuration.

My issue is that the Composer autoloader is looking at `vendor/ekino/metric/lib` instead of `vendor/ekino/metric/Ekino/Metric/lib`, which prevents it from finding anything. If I change my local project's `composer.json` to use my fork of this repo on github where I've removed the `target-dir` setting from the repo's `composer.json`, delete the local `vendor` directory, and run `php composer.phar install` again, the autoloader then looks in `vendor/ekino/metric/lib` and is able to autoload code successfully.

As such, I think the `target-dir` setting in `composer.json` must be removed for any other projects using this repo to have autoloading function as intended.