+2 votes
8 views

I updated Doctrine 2.5 to 2.6 in my project and phpspec is broken.

The function getEntityChangeSet() is now returned by reference. It seems not to be supported by phpspec.

$unitOfWork
    ->getEntityChangeSet($site)
    ->willReturn(['_dataParent' => [0 => 2, 1 => 3]]);

The response is returning by reference not supported

the underlying function (doctrine) is

public function & getEntityChangeSet($entity)
{
    $oid  = spl_object_hash($entity);
    $data = [];

    if (!isset($this->entityChangeSets[$oid])) {
        return $data;
    }

    return $this->entityChangeSets[$oid];
}

Do you know if it’s possible to bypass this or change test for make it work?

by (2.5k points)   | 8 views

Please log in or register to answer this question.

Related questions

+3 votes
1 answer
asked Apr 12 by athar (2.5k points) | 31 views
+1 vote
1 answer
asked Jun 13 by noor (1.1k points) | 11 views
+1 vote
0 answers
+3 votes
0 answers
+2 votes
1 answer
+2 votes
1 answer
asked Jun 11 by noor (1.1k points) | 8 views
+1 vote
1 answer
asked Jun 11 by noor (1.1k points) | 8 views
0 votes
0 answers
+2 votes
0 answers




Welcome to Meansflow - Where Developers and Students Learn, Share, & Build Careers, where you can ask questions and receive answers from other members of the community.
106 questions
75 answers
36 comments
93 users