require_once problem
| From: | Sebastian Bergmann | Date: | Wed, 09 Feb 2005 07:41:20 +0000 |
| Subject: | require_once problem | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-36083@lists.php.net to get a copy of this message | ||
Bug #3402 [1] took me a while to figure out but now I tracked it down
to a problem with require_once that I would like to share with you in
hope for a general solution.
In the following diagram "a -> b" means that there is a require_once
call for the sourcefile of class b in the sourcefile of class a:
TestCase -> TestResult -> TestSuite -> Warning -> TestCase
By the time Warning requires TestCase the TestCase class has not been
declared but its sourcefile has been loaded and require_once treats it
(correctly) as included.
Any idea on how to elegantly solve this would be appreciated,
Sebastian
--
[1] http://pear.php.net/bugs/bug.php?id=3402
--
Sebastian Bergmann http://www.sebastian-bergmann.de/
GnuPG Key: 0xB85B5D69 / 27A7 2B14 09E4 98CD 6277 0E5B 6867 C514 B85B 5D69