Closed chriskl closed 9 years ago
Zend/Test/PHPUnit/Constraint/DomQuery.php:
if (version_compare(PHPUnit_Runner_Version::id(), '3.5', '>=')) {
include(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'DomQuery37.php');
} else {
include(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'DomQuery34.php');
}
The same for Zend_Test_PHPUnit_Constraint_Redirect
and Zend_Test_PHPUnit_Constraint_ResponseHeader
.
@chriskl We do have these classes defined twice, but it's on purpose. The reason is that we want to use a single class name, but have the behavior change based on the PHPUnit version used, due to differences in behavior between 3.4 and 3.7. We currently do this via a conditional include, as we cannot use class aliasing due to ZF1 supporting 5.2. We also cannot put in rules in the composer.json
due to the fact that we cannot know what version of PHPUnit you will actually use when running tests.
Interestingly, I cannot actually recreate the error you're seeing with the most recent version of Composer (I'm on "14f35e812cd41746c4a4a7a2dec2b2365c8cdc61 2014-04-14 12:11:15"); running dump-autoload
with or without the --optimize
switch from the ZF1 repo generates no errors for me.
Also works for me with latest composer version. I think that this can be closed and eventually reopened if @chriskl can provide composer.json which can be used to reproduce the issue.
Here you go...
On 20 June 2014 02:23, Martin Hujer notifications@github.com wrote:
Also works for me with latest composer version. I think that this can be closed and eventually reopened if @chriskl https://github.com/chriskl can provide composer.json which can be used to reproduce the issue.
— Reply to this email directly or view it on GitHub https://github.com/zendframework/zf1/issues/328#issuecomment-46597777.
Can't see it?
Closed due inactivity.
Hi Guys,
With 1.12.5 I get the following warning when using 'composer dump-autoload --optimize':
(This is a Jenkins build output)
It appears to mean that you have the same class definition twice in the code somehow.