PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Testing » PHPUnit2 » Bug #6081

phpunit fails: Cannot redeclare class Config in pear/config.php on line 43

Details

Submitted2005-11-26 18:36 UTC
Fromtobias_demuth at web dot de
StatusBogus
PackagePHPUnit2
PHP Version5.0.5
OSWindows XP
Roadmaps(Not assigned)

Comments

[2005-11-26 18:36 UTC] tobias_demuth at web dot de

Description:
------------
Regardless to what I'm typing on the command-prompt - "just "phpunit", "phpunit --help" or "phpunit --skeleton sample" - phpUnit2 will always fail with "Cannot redleclare class config in pear/config/Config.php on line 43".

Looks like a inclusion without "_once".

Test script:
---------------
phpunit sample

Expected result:
----------------
Run of Tests in sample.php

Actual result:
--------------
Fatal error: Cannot redeclare class Config in pear/config/Config.php on line 43!

[2005-12-19 05:49 UTC] sebastian at php dot net

Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. Because of this, we hope you add your comments
to the existing bug instead.

Thank you for your interest in PEAR.

This is basically the same problem as in bugs #3402 and #5720 and will hopefully go away with the new mechanism for loading PHPUnit's classes in PHPUnit 2.4.

The underlying issue is that PHP has problems with loading classes that have circular dependencies.