I got this function in my ProductsRepository:
/**
* @param int $ProductId
* @return \Foo\Bar\Domain\Model\Products
*/
public function getProductById(int $ProductId) {
$query = $this->createQuery();
$query->matching(
$query->equals('productId', $ProductId)
);
$query->setLimit(1);
return $query->execute()->getFirst();
}
which I call like this:
$product = $this->productsRepository->getProductById($ProductId);
In Typo3 6.2.6 with PHP 5.6.3 this worked fine, but in Typo3 6.2.12 with PHP 5.6.12 it says the following in my error.log:
[Wed Sep 09 15:59:32.922153 2015] [:error] [pid 26601] [client 192.168.113.4:58686] PHP Catchable fatal error: Argument 1 passed to Foo\Bar\Domain\Repository\ProductsRepository::getProductById() must be an instance of Foo\Bar\Domain\Repository\int, integer given
Do you know why my repository wants Foo\Bar\Domain\Repository\int
instead of int
?