Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

bradbird's avatar

PHPUnit will not run after virtual box, php and vagrant upgrades

I posted this on Stack Overflow just now. Thought I would ask here too... http://bit.ly/2lnpXce

I took this morning to upgrade some libraries I use for work. My Mac OSX is now using PHP 7.1 and also upgraded my virtual box to 5.1 and vagrant to 1.9.1. My single-project is also using PHP 7.1.2 and I am using PHPUnit 6.0 for the project.

Everything seems to be working fine except PHPUnit. When I run:

bash vendor/bin/phpunit

I get the following output:

vendor/bin/phpunit:2: no such file or directory: ?php
vendor/bin/phpunit:3: permission denied: /Applications
vendor/bin/phpunit:4: command not found: Homestead.yaml
vendor/bin/phpunit:5: command not found: Homestead.yaml
vendor/bin/phpunit:7: parse error near `\n'

Looked on Google and couldn't find anything and have hit a brick wall. Any ideas?

0 likes
3 replies
Lars-Janssen's avatar
Level 33

Why bash? Should be just vendor/bin/phpunit.

2 likes
bradbird's avatar

Someone just answered this already on Stack Overflow. Such a silly mistake! I saw #!/usr/bin/env php at the top of the phpunit file so for some reason my brain made the link that I had to run it in bash. So embarrassed.

1 like

Please or to participate in this conversation.