+2 votes
18 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 (3.3k points)   | 18 views

Please log in or register to answer this question.

Related questions

+3 votes
1 answer
asked Apr 12, 2020 by athar (3.3k points) | 60 views
+1 vote
1 answer
asked Jun 13, 2020 by noor (1.1k points) | 20 views
+1 vote
0 answers
+1 vote
0 answers
+3 votes
0 answers
+1 vote
1 answer
+2 votes
1 answer
+2 votes
1 answer
asked Jun 11, 2020 by noor (1.1k points) | 25 views
+1 vote
1 answer
asked Jun 11, 2020 by noor (1.1k points) | 21 views
+1 vote
1 answer
asked Oct 4, 2020 by toheed (1.4k points) | 46 views




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.
122 questions
92 answers
43 comments
124 users