Select Page

Failed opening required PHPUnit/TextUI/TestRunner.php in Maven For PHP

Failed opening required PHPUnit/TextUI/TestRunner.php in Maven For PHP

This issue has turn me upside down a long time. In fact in the official Google Group I was not the only one to have this issue.

I did try the following, and it is always good to check first

  • Checking PHP version,
  • Starting #Maven with -X for having more debug information
  • Testing it in Eclipse + M2Eclipse on windows, was working there,
  • Comparing calculated PHP include path on Windows and #Linux: they were identical in this case

Only my #Linux box was not working. . .(

After that I did materialize the eclipse project of #maven-php-plugin and even built a custom version that I’ve deployed without any effort to my Artifactory (

And what is the solution?

it my server configuration and paranoia 🙂

open your php.ini, ideally the right one, don’t put your server at risks: You may have many under #Linux, especially if you use plesk or cpanel 

  • cli at /etc/php5/cli/php.ini
  • apache2, /etc/php5/apache2/php.ini
  • fastcgi at /etc/php5/fastcgi/php.ini

location most of the time


and add the directory where your build server make a checkout…

; open_basedir, if set, limits all file operations to the defined directory 
; and below.  This directive makes most sense if used in a per-directory 
; or per-virtualhost web server configuration file. This directive is 
; *NOT* affected by whether Safe Mode is turned On or Off. 
open_basedir = /www/vhosts:/tmp:/xxxx/yyyy/ 

Next step is to put #Joomla! 1.6 and all their PHPUnit tests a run along with Selenium. May also need to  patch #Maven for PHP to better support Tests reporting like Surefire.

About The Author

Cédric Walter

I worked with various Insurances companies across Switzerland on online applications handling billion premium volumes. I love to continuously spark my creativity in many different and challenging open-source projects fueled by my great passion for innovation and blockchain technology.In my technical role as a senior software engineer and Blockchain consultant, I help to define and implement innovative solutions in the scope of both blockchain and traditional products, solutions, and services. I can support the full spectrum of software development activities, starting from analyzing ideas and business cases and up to the production deployment of the solutions.I'm the Founder and CEO of Disruptr GmbH.