sebastianbergmann/php-code-coverage — Issue #76: PHPUnit 3.6.2 / PHP_CodeCoverage 1.1.1: PHP warnings/notices with <logging>
Author: tehhahn
Created: 2011-11-08 21:57:32+00:00
State: open

**Description of the problem**
PHPUnit 3.6.2 / PHP_CodeCoverage 1.1.1 causes PHP warnings and notices by using the newly introduced logger types. One new logger type does not work at all.

**How to reproduce the probem**
Create a `phpunit.xml` file with the following content (notice the three comments in the `` child element :

```

```

Run PHPUnit with `phpunit .` in the same folder as the above `phpunit.xml` (with at least one valid test case file) will lead to the following output (abstract):

```shell
Notice: Undefined index: coverageTextShowUncoveredFiles in C:\Program Files\PEAR\pear\PHPUnit\TextUI\TestRunner.php on l
ine 404

Call Stack:
0.0007 322640 1. {main}() C:\Program Files\PEAR\phpunit:0
0.0096 717952 2. PHPUnit_TextUI_Command::main() C:\Program Files\PEAR\phpunit:46
0.0096 718304 3. PHPUnit_TextUI_Command->run() C:\Program Files\PEAR\pear\PHPUnit\TextUI\Command.php:126
0.0711 3339336 4. PHPUnit_TextUI_TestRunner->doRun() C:\Program Files\PEAR\pear\PHPUnit\TextUI\Command.php:188

Warning: mkdir() [.phpfunction.mkdir]: Invalid argument in C:\Program Files\PEAR\pear\PHP\CodeCoverage\Report\Clover.php on line 345

Call Stack:
0.0008 322672 1. {main}() C:\Program Files\PEAR\phpunit:0
0.0103 717984 2. PHPUnit_TextUI_Command::main() C:\Program Files\PEAR\phpunit:46
0.0103 718336 3. PHPUnit_TextUI_Command->run() C:\Program Files\PEAR\pear\PHPUnit\TextUI\Command.php:126
0.0684 3263288 4. PHPUnit_TextUI_TestRunner->doRun() C:\Program Files\PEAR\pear\PHPUnit\TextUI\Command.php:188
0.2368 4800256 5. PHP_CodeCoverage_Report_Clover->process() C:\Program Files\PEAR\pear\PHPUnit\TextUI\TestRunner.php:347
0.2570 5783160 6. mkdir() C:\Program Files\PEAR\pear\PHP\CodeCoverage\Report\Clover.php:345
```

**Possible fix for issue 2 (``)**
Replace with ``

**Possible fix for issue 3 (``)**
1. Open `[PEAR]\pear\PHP\CodeCoverage\Report\Clover.php`
2. Edit line 344 and replace its content with `if ('php://stdout' !== $target && !is_dir(dirname($target))) {`

The `coverage.serialized`file is not generated, but no notice/warning/error message is printed out.