phpunit icon indicating copy to clipboard operation
phpunit copied to clipboard

Failing to load autoload.php

Open titolendable opened this issue 11 years ago • 2 comments

On version 4.6.4, when I try to run phpunit, I get the message "You need to set up the project dependencies using the following commands" but composer is installed and vendor is up to date. If I add the vendor folder to the path on the phpunit script on the foreach loop, everything works fine. At the moment, it is:

foreach (array(__DIR__ . '/../../autoload.php', __DIR__ . '/../vendor/autoload.php', __DIR__ . '/vendor/autoload.php') as $file) {

Adding vendor to the first element of the array solves the problem, line 16

foreach (array(__DIR__ . '/../../vendor/autoload.php', __DIR__ . '/../vendor/autoload.php', __DIR__ . '/vendor/autoload.php') as $file) {

I am running phpunit from inside the vendor folder, executing php vendor/bin/phpunit

titolendable avatar Apr 17 '15 17:04 titolendable

I am also seeing this with 4.6.4, I don't see how this could ever work when installed with composer.

jimbojsb avatar Apr 28 '15 14:04 jimbojsb

Actually cancel that. There was some issue with the way the files were being moved around, but updating to the latest composer and re-installing makes 4.6.4 work for me.

jimbojsb avatar Apr 28 '15 14:04 jimbojsb