Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

phpunit with composer not working

Background: i am on a windows host and sshing into a vagrant LAMP setup (ubuntu 13.04).

I have installed phpunit with composer using the following line in my composer.json:

"require-dev": {
        "phpunit/phpunit": "3.7.*"
}

I have then run composer update which installed phpunit. I can now navigate to /vendor/bin and see phpunit binary.

However if i type phpunit from within that directory (or anywhere elese for that matter) I get the error "phpunit is not installed"

Any suggestions as to where I go next with this - there are so few steps involved in this setup I really cant see where I could have gone wrong

like image 695
SwiftD Avatar asked Jan 12 '23 19:01

SwiftD


2 Answers

So I had this issue too, for me the fix was to change in my vagrant file:

config.vm.synced_folder "C:/dev/vm/share", "/var/www/", mount_options: ['dmode=777','fmode=666']

to

config.vm.synced_folder "C:/dev/vm/share", "/var/www/", mount_options: ['dmode=777','fmode=777']

There is a lot of advise saying 666 is permissive enough, but in my case it was not and as this is only a development machine the security implications are not too important.

like image 181
jzahedieh Avatar answered Jan 15 '23 09:01

jzahedieh


./phpunit from the bin directory.

It's just not in your path.

like image 23
Stop Slandering Monica Cellio Avatar answered Jan 15 '23 08:01

Stop Slandering Monica Cellio