opened
MidnightDesign
username_0
The `{"autoload": {"psr-0|psr-4": {"MyNamespace": ["src", "lib"]}}}` format doesn't work at the moment.

This tries to fix that, but the tests are still failing at the moment and I can't figure out why.

Also, I'm not sure if the `array_reduce()` method is the clearest way to write this, but I tried to follow the functional style of the existing code.

Can someone figure out what's wrong?
Handle composer autoload directories as arrays correctly
issue
created
MidnightDesign
username_0
Updated. Still don't know why it's failing though.
comment
created
maglnet
username_1
Well, it seems `iterator_to_array` doesn't work as expected here (is it a php bug?)
https://github.com/username_1/ComposerRequireChecker/blob/ea32abab6c7d441a1b2638d33c0c8bdbc28b78df/test/ComposerRequireCheckerTest/FileLocator/LocateComposerPackageSourceFilesTest.php#L93

After I changed this to a simple foreach 
```php
        $files = [];
        $filesGenerator = ($this->locator)($composerJson);
        foreach($filesGenerator as $file) {
            $files[] = $file;
        }
        return $files;
```

the assertCount worked as expected, but there were other tests that failed... could be my windows machine, so it's another problem.
I'll dig into this later.
comment
created
heiglandreas
username_2
There was something with ```iterator_to_array``` yesterday on twitter: https://twitter.com/lsmith/status/824210249548791808
comment
created
maglnet
username_1
thanks @username_2 this could be a similar problem...
comment
created
MidnightDesign
username_0
Thanks @username_1! That fixes it.
comment
created
Ocramius
username_3
LGTM! 👍
comment