Open exeba opened 4 years ago
https://github.com/sebastianbergmann/exporter/pull/35 will make tests pass
Even with https://github.com/sebastianbergmann/exporter/pull/35, I do not understand what it is you are trying to report.
class Base
{
private $privateField;
public function __construct($value)
{
$this->privateField = $value;
}
}
class Derived extends Base
{
private $privateField;
public function __construct($value, $parentValue)
{
parent::__consturct($parentValue);
$this->privateField = $value;
}
}
$object1 = new Derived(10, 200);
$object2 = new Derived(100, 200);
The two objects should be considered different, but since Derived
declares a private field that already exists in Base
, the field by field comparison considers only the $privateField
in the Base class, ingoring the one in Derived
.
When a derived class redeclares a private member of the base class, the "Exporter" class fails to recognize that.