Fix issue where none root composer.json could be used by ArtifactRepository http://www.php.net/manual/en/ziparchive.locatename.php#85512
Improved variable name.
Moved tests that are expected to work into their own directory.
Added test for composer.json in incorrect directory.
Moved file back to correct location. (+1 squashed commit)
Squashed commits:
[eec32aa] Updated detection to only allow composer.josn in root or first level dir.
Added comment for generating files.
Added explanation of why loop continues.
Merge pull request #2188 from Danack/GetRootComposerJson

Find root composer.json in zip artifact more reliably.
Whitelist packages with names matching those specified before generating rules

Addresses #2690 doesn't do any performance optimisations yet which we
could do now
Add tests for the changes in #2690
Properly limit to name matches only if necessary
Resolve job packages after whitelist generation
Merge pull request #2733 from naderman/limit-replace-provide

Whitelist packages with names matching those specified before generating rules
Remove superfluous string casts
Handle array candidates in whatProvides