Add generic to DeepCopy::copy method#205
Conversation
This makes it possible for PHPStan to understand the return type.
|
Thanks! |
|
I think this breaks backward compatibility. Before this change, the With this change, I get this when running PHPStan for PHPUnit's code: This is the line of code referenced above: https://github.com/sebastianbergmann/phpunit/blob/5984c2c0052a917262cb8df09c02804eb8e4e5b3/src/Framework/TestCase.php#L1813 |
|
I think we should remove the "of object" on the template. That would make it mixed again. Would that help? If so, I can make the PR. |
|
@sebastianbergmann created this as a possible solution: #206 |
This makes it possible for PHPStan to understand the return type.