leanphp / phpspec-code-coverage

Generate Code Coverage reports for PhpSpec tests

Home Page:https://packagist.org/packages/leanphp/phpspec-code-coverage

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

commented

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.

commented

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:

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.