Support the ongoing development of Laravel.io →
Configuration Packages Testing

I have a Homestead vm running a nearly fresh install of Laravel 5.0 (dev-develop). I globally installed phpunit ~4.3 through composer and added composer global vendor bin to $PATH.

When I try to run phpunit on my project folder, it doesn't work, due to something related to a global install of illuminate/support.

My first thought was about permissions, but I started all over with a superuser and got the same results. My composer is updated, and also my project dependencies.

I don't know exactly what's going on, but the strange thing is: it runs with no problems outside the vm, on my machine.

Can somebody help me?

Thanks!

Here's some debug info:

~/.composer/composer.json

{
    "require": {
        "laravel/envoy": "~1.0",
        "phpunit/phpunit": "~4.3"
    }
}

~/code/project/composer.json

...
"require": {
	"laravel/framework": "~5.0",
	"illuminate/html": "5.0.*@dev",
	"barryvdh/laravel-ide-helper": "~1.11@dev"
},
"require-dev": {
	"phpunit/phpunit": "~4.3"
},
...

php - v

PHP 5.6.0-1+deb.sury.org~trusty+1 (cli) (built: Aug 28 2014 14:55:42) 
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2014 Zend Technologies
    with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2014, by Zend Technologies
    with Xdebug v2.2.5, Copyright (c) 2002-2014, by Derick Rethans

Error:

vagrant@homestead:~/code/project$ phpunit
PHPUnit 4.5-dev by Sebastian Bergmann.

Configuration read from /home/vagrant/code/project/phpunit.xml

PHP Fatal error:  Call to a member function make() on null in /home/vagrant/.composer/vendor/illuminate/support/Illuminate/Support/helpers.php on line 33
PHP Stack trace:
PHP   1. {main}() /home/vagrant/.composer/vendor/phpunit/phpunit/phpunit:0
PHP   2. PHPUnit_TextUI_Command::main() /home/vagrant/.composer/vendor/phpunit/phpunit/phpunit:56
PHP   3. PHPUnit_TextUI_Command->run() /home/vagrant/.composer/vendor/phpunit/phpunit/src/TextUI/Command.php:138
PHP   4. PHPUnit_TextUI_TestRunner->doRun() /home/vagrant/.composer/vendor/phpunit/phpunit/src/TextUI/Command.php:186
PHP   5. PHPUnit_Framework_TestSuite->run() /home/vagrant/code/project/vendor/phpunit/phpunit/src/TextUI/TestRunner.php:425
PHP   6. PHPUnit_Framework_TestSuite->run() /home/vagrant/code/project/vendor/phpunit/phpunit/src/Framework/TestSuite.php:751
PHP   7. PHPUnit_Framework_TestCase->run() /home/vagrant/code/project/vendor/phpunit/phpunit/src/Framework/TestSuite.php:751
PHP   8. PHPUnit_Framework_TestResult->run() /home/vagrant/code/project/vendor/phpunit/phpunit/src/Framework/TestCase.php:729
PHP   9. PHPUnit_Framework_TestCase->runBare() /home/vagrant/code/project/vendor/phpunit/phpunit/src/Framework/TestResult.php:643
PHP  10. PHPUnit_Framework_TestCase->runTest() /home/vagrant/code/project/vendor/phpunit/phpunit/src/Framework/TestCase.php:773
PHP  11. ReflectionMethod->invokeArgs() /home/vagrant/code/project/vendor/phpunit/phpunit/src/Framework/TestCase.php:896
PHP  12. ExampleTest->testBasicExample() /home/vagrant/code/project/vendor/phpunit/phpunit/src/Framework/TestCase.php:896
PHP  13. Illuminate\Foundation\Testing\TestCase->call() /home/vagrant/code/project/tests/ExampleTest.php:12
PHP  14. CRM\Http\Kernel->handle() /home/vagrant/code/project/vendor/laravel/framework/src/Illuminate/Foundation/Testing/ApplicationTrait.php:43
PHP  15. Illuminate\Foundation\Http\Kernel->handle() /home/vagrant/code/project/app/Http/Kernel.php:33
PHP  16. Illuminate\Foundation\Http\Kernel->bootstrap() /home/vagrant/code/project/storage/framework/compiled.php:1214
PHP  17. Illuminate\Foundation\Application->bootstrapWith() /home/vagrant/code/project/storage/framework/compiled.php:1229
PHP  18. Illuminate\Foundation\Bootstrap\LoadConfiguration->bootstrap() /home/vagrant/code/project/storage/framework/compiled.php:726
PHP  19. Illuminate\Config\Repository->offsetGet() /home/vagrant/code/project/storage/framework/compiled.php:1173
PHP  20. Illuminate\Config\Repository->get() /home/vagrant/code/project/storage/framework/compiled.php:4910
PHP  21. Illuminate\Config\Repository->load() /home/vagrant/code/project/storage/framework/compiled.php:4802
PHP  22. Illuminate\Config\FileLoader->load() /home/vagrant/code/project/storage/framework/compiled.php:4822
PHP  23. Illuminate\Filesystem\Filesystem->getRequire() /home/vagrant/code/project/storage/framework/compiled.php:4984
PHP  24. require() /home/vagrant/code/project/storage/framework/compiled.php:5082
PHP  25. storage_path() /home/vagrant/code/project/config/app.php:158
PHP  26. app() /home/vagrant/.composer/vendor/illuminate/support/Illuminate/Support/helpers.php:777

Fatal error: Call to a member function make() on null in /home/vagrant/.composer/vendor/illuminate/support/Illuminate/Support/helpers.php on line 33

Call Stack:
    0.0002     224800   1. {main}() /home/vagrant/.composer/vendor/phpunit/phpunit/phpunit:0
    0.0036     654976   2. PHPUnit_TextUI_Command::main() /home/vagrant/.composer/vendor/phpunit/phpunit/phpunit:56
    0.0036     655600   3. PHPUnit_TextUI_Command->run() /home/vagrant/.composer/vendor/phpunit/phpunit/src/TextUI/Command.php:138
    0.1535    9463616   4. PHPUnit_TextUI_TestRunner->doRun() /home/vagrant/.composer/vendor/phpunit/phpunit/src/TextUI/Command.php:186
    0.1716    9834320   5. PHPUnit_Framework_TestSuite->run() /home/vagrant/code/project/vendor/phpunit/phpunit/src/TextUI/TestRunner.php:425
    0.1733    9850632   6. PHPUnit_Framework_TestSuite->run() /home/vagrant/code/project/vendor/phpunit/phpunit/src/Framework/TestSuite.php:751
    0.1743    9854816   7. PHPUnit_Framework_TestCase->run() /home/vagrant/code/project/vendor/phpunit/phpunit/src/Framework/TestSuite.php:751
    0.1743    9856360   8. PHPUnit_Framework_TestResult->run() /home/vagrant/code/project/vendor/phpunit/phpunit/src/Framework/TestCase.php:729
    0.1927    9941072   9. PHPUnit_Framework_TestCase->runBare() /home/vagrant/code/project/vendor/phpunit/phpunit/src/Framework/TestResult.php:643
    0.1946    9987032  10. PHPUnit_Framework_TestCase->runTest() /home/vagrant/code/project/vendor/phpunit/phpunit/src/Framework/TestCase.php:773
    0.1946    9987800  11. ReflectionMethod->invokeArgs() /home/vagrant/code/project/vendor/phpunit/phpunit/src/Framework/TestCase.php:896
    0.1946    9987896  12. ExampleTest->testBasicExample() /home/vagrant/code/project/vendor/phpunit/phpunit/src/Framework/TestCase.php:896
    0.1946    9988072  13. Illuminate\Foundation\Testing\TestCase->call() /home/vagrant/code/project/tests/ExampleTest.php:12
    0.1964   10008104  14. CRM\Http\Kernel->handle() /home/vagrant/code/project/vendor/laravel/framework/src/Illuminate/Foundation/Testing/ApplicationTrait.php:43
    0.1964   10008272  15. Illuminate\Foundation\Http\Kernel->handle() /home/vagrant/code/project/app/Http/Kernel.php:33
    0.1964   10008456  16. Illuminate\Foundation\Http\Kernel->bootstrap() /home/vagrant/code/project/storage/framework/compiled.php:1214
    0.1964   10008592  17. Illuminate\Foundation\Application->bootstrapWith() /home/vagrant/code/project/storage/framework/compiled.php:1229
    0.1968   10011648  18. Illuminate\Foundation\Bootstrap\LoadConfiguration->bootstrap() /home/vagrant/code/project/storage/framework/compiled.php:726
    0.1968   10012520  19. Illuminate\Config\Repository->offsetGet() /home/vagrant/code/project/storage/framework/compiled.php:1173
    0.1968   10012608  20. Illuminate\Config\Repository->get() /home/vagrant/code/project/storage/framework/compiled.php:4910
    0.1968   10014104  21. Illuminate\Config\Repository->load() /home/vagrant/code/project/storage/framework/compiled.php:4802
    0.1968   10014256  22. Illuminate\Config\FileLoader->load() /home/vagrant/code/project/storage/framework/compiled.php:4822
    0.1970   10014640  23. Illuminate\Filesystem\Filesystem->getRequire() /home/vagrant/code/project/storage/framework/compiled.php:4984
    0.1987   10024944  24. require('/home/vagrant/code/project/config/app.php') /home/vagrant/code/project/storage/framework/compiled.php:5082
    0.1987   10030488  25. storage_path() /home/vagrant/code/project/config/app.php:158
    0.1987   10030648  26. app() /home/vagrant/.composer/vendor/illuminate/support/Illuminate/Support/helpers.php:777
Last updated 3 years ago.
0

run, "composer global update"

Last updated 3 years ago.
0

Anyone fixed this yet? cuz I have the same problem.

0

Try to run the following command from the root of the project

vendor/phpunit/phpunit/phpunit

PS: I assume you have installed development dependecies ( composer update --dev )

Last updated 10 years ago.
0

that command worked, thanks.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

rscafi rscafi Joined 21 Oct 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.