reverted #1405 because it spawned 1451

Revert fix for #1405 because it caused unexpected behaviour like #1451 when there is a composer.json but no (or empty) vendor dir present.