Documentation suggestion
robteifi opened this issue · comments
I was struggling to get this working with phpdbg on a project with a moderately large number of tests ( > 1400 phpspec examples), no code coverage was being generated. Eventually I noticed that I was getting an exit code of 255.
The problem was the memory_limit in phpdbg's php.ini
- it would probably help others to add a note to the readme to suggest that the memory_limit there should be set to -1.
Hi @robteifi,
Thank you for feesback, this is worth considering. Could I ask you what distribution (OS) and environment you run the tests with? From my personal experience most distributions (i.e. Debian, Ubuntu, Arch Linux and the like) usually have memory_limit
set to -1
when PHP is executed via commandline (like in most cases when running PhpSpec).
For example, debian has this defined in /etc/php/7.0/cli/php.ini
.
This is not to say that it isn't worth updating documentation so this is mentioned, I am just curious regarding the setup.
This is on Ubuntu 16.04 installing PHP from the ppa:ondrej/php repository.
As you say the standard cli/php.ini does have memory_limit set to -1, but the phpdbg/php.ini doesn't.
Ubuntu or debian packages that come from official ubuntu or debian repositories do not even have phpdbg specific php.ini
file as that would not be necessary:
- https://packages.ubuntu.com/xenial/amd64/php7.0-phpdbg/filelist
- https://packages.debian.org/sid/alpha/php7.2-phpdbg/filelist
phpdbg should just rely on the standard php.ini
for PHP CLI. However, custom ppas come with customisations like that which can get in the way.
I have added a mention regarding memory_limit
in the README of the project.
Thank you for feedback. Closing.