DDC-3327: [GH-1149] Update Composite.php for HHVM compatibility #4113

Closed
opened 2026-01-22 14:35:24 +01:00 by admin · 4 comments
Owner

Originally created by @doctrinebot on GitHub (Sep 26, 2014).

Originally assigned to: @Ocramius on GitHub.

Jira issue originally created by user @doctrinebot:

This issue is created automatically through a Github pull request on behalf of zhil:

Url: https://github.com/doctrine/doctrine2/pull/1149

Message:

Not sure, why this issue is not founded in unittests, but I got HHVM crushed with message

Fatal error: Stack overflow in ...../vendor/doctrine/orm/lib/Doctrine/ORM/Query/Expr/Composite.php on line 58

The same issue is being reported here
https://github.com/facebook/hhvm/issues/1747

@LinuxDoku proposed quick patch, which works great for me and its in this PR.

Just in case, if you wonder what trigger this error - here is my repository function, which trigger it

    public function findOpenTeamTimeEntry($user)
    {
        $r = $this->createQueryBuilder("t")
            ->join("t.owner","u")
            ->where("t.dateEnd IS NULL")
            ->andWhere("u.id = :user_id")
             ->setParameter(":user_id",$user->getId())
            ->getQuery()
            ->getResult();
        if(is_array($r) && count($r)) {
            return $r[0];
        } else {
            return false;
        }
    }
Originally created by @doctrinebot on GitHub (Sep 26, 2014). Originally assigned to: @Ocramius on GitHub. Jira issue originally created by user @doctrinebot: This issue is created automatically through a Github pull request on behalf of zhil: Url: https://github.com/doctrine/doctrine2/pull/1149 Message: Not sure, why this issue is not founded in unittests, but I got HHVM crushed with message ``` Fatal error: Stack overflow in ...../vendor/doctrine/orm/lib/Doctrine/ORM/Query/Expr/Composite.php on line 58 ``` The same issue is being reported here https://github.com/facebook/hhvm/issues/1747 @LinuxDoku proposed quick patch, which works great for me and its in this PR. Just in case, if you wonder what trigger this error - here is my repository function, which trigger it ``` public function findOpenTeamTimeEntry($user) { $r = $this->createQueryBuilder("t") ->join("t.owner","u") ->where("t.dateEnd IS NULL") ->andWhere("u.id = :user_id") ->setParameter(":user_id",$user->getId()) ->getQuery() ->getResult(); if(is_array($r) && count($r)) { return $r[0]; } else { return false; } } ```
admin added the Bug label 2026-01-22 14:35:24 +01:00
admin closed this issue 2026-01-22 14:35:24 +01:00
Author
Owner

@doctrinebot commented on GitHub (Jan 13, 2015):

Comment created by @doctrinebot:

A related Github Pull-Request [GH-1149] was assigned:
https://github.com/doctrine/doctrine2/pull/1149

@doctrinebot commented on GitHub (Jan 13, 2015): Comment created by @doctrinebot: A related Github Pull-Request [GH-1149] was assigned: https://github.com/doctrine/doctrine2/pull/1149
Author
Owner

@doctrinebot commented on GitHub (Jan 13, 2015):

Comment created by @doctrinebot:

A related Github Pull-Request [GH-1149] was closed:
https://github.com/doctrine/doctrine2/pull/1149

@doctrinebot commented on GitHub (Jan 13, 2015): Comment created by @doctrinebot: A related Github Pull-Request [GH-1149] was closed: https://github.com/doctrine/doctrine2/pull/1149
Author
Owner

@doctrinebot commented on GitHub (Jan 13, 2015):

Comment created by @ocramius:

Assigning an object to itself can obviously cause infinite recursion: checking for infinite recursion loops throughout the project is not feasible and unpractical.

This is more an abuse of the API rather than an actual bug.

@doctrinebot commented on GitHub (Jan 13, 2015): Comment created by @ocramius: Assigning an object to itself can obviously cause infinite recursion: checking for infinite recursion loops throughout the project is not feasible and unpractical. This is more an abuse of the API rather than an actual bug.
Author
Owner

@doctrinebot commented on GitHub (Jan 13, 2015):

Issue was closed with resolution "Won't Fix"

@doctrinebot commented on GitHub (Jan 13, 2015): Issue was closed with resolution "Won't Fix"
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#4113