composer/composer — pull request #1106 by adrienbrault (2012-09-14 09:25:02+00:00)
Title: ComposerAutoloaderInitXXX::getLoader behaves like a ClassLoader singleton

Calling ComposerAutoloaderInit::getLoader twice when a package requires a .php file containing functions, lead to the functions to be declared twice, and cause an error.

In my case, using behat + symfony2extension + assetic@master, the error that occured:

```
PHP Fatal error: Cannot redeclare assetic_init() (previously declared in vendor/kriswallsmith/assetic/src/functions.php:20) in /vendor/kriswallsmith/assetic/src/functions.php on line 26

Fatal error: Cannot redeclare assetic_init() (previously declared in /vendor/kriswallsmith/assetic/src/functions.php:20) in /vendor/kriswallsmith/assetic/src/functions.php on line 26
```

I've sent a PR to assetic https://github.com/kriswallsmith/assetic/pull/302 , but IMHO, this would be easier if composer solved this.

This PR is a quick fix I found, not sure if this is the way to go ?