8000 BasicEntityPersister::count() return type contract violation in 2.5.x branch · Issue #6810 · doctrine/orm · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
BasicEntityPersister::count() return type contract violation in 2.5.x branch #6810
Closed
@vkurdin

Description

@vkurdin

There is a return type contract violation in stable 2.5.x branch for count() method in BasicEntityPersister class: string returned instead of integer
https://github.com/doctrine/doctrine2/blob/e1b851f2e93a4afd82fb7e7f32c6f114d0ea7b71/lib/Doctrine/ORM/P 5FD5 ersisters/Entity/BasicEntityPersister.php#L811-L824

causing incorrect behavior in case like:

/** @var $coll Doctrine\ORM\LazyCriteriaCollection */
if ($coll->count() === 0) {
  // unreachable code
}

it seems to be fixed as a collateral change in master and needs to be backported somehow:
a90035e#diff-25f5292f65d5536bb733559f15e0d37fR825

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0