[MODM-142] DocumentRepository::findBy() not compatible with interface Created: 07/May/11  Updated: 07/May/11

Status: Open
Project: Doctrine MongoDB ODM
Component/s: Document Repositories
Affects Version/s: 1.0.0BETA3
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Jan Pieper Assignee: Jonathan H. Wage
Resolution: Unresolved Votes: 0
Labels: None


 Description   

I want to get a document repository for my Document\Event document class but instead i get a fatal error.

Pseudo
<?php

use Doctrine\MongoDB\Connection;
use Doctrine\ODM\MongoDB\DocumentManager;
use Doctrine\ODM\MongoDB\Configuration;
use Documents\Event;

$manager = new DocumentManager(
    new Connection(...),
    new Configuration(...)
);

$manager->getRepository('Documents\Event');

Fatal error: Declaration of Doctrine\ODM\MongoDB\DocumentRepository::findBy() must be compatible with that of Doctrine\Common\Persistence\ObjectRepository::findBy() in /home/jpieper/Workspace/Jersey/vendor/doctrine-common/lib/Doctrine/ODM/MongoDB/DocumentRepository.php on line 39

DoctrineCommonPersistenceObjectRepository.php (github@5a285537)
public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null);
DoctrineODMMongoDBDocumentRepository.php (github@8d02e843)
public function findBy(array $criteria) { ... }

See https://github.com/doctrine/common/commit/5a2855372834cf37e0408e80dcb9a9c97ec1d352#lib/Doctrine/Common/Persistence






Generated at Thu Nov 27 05:45:15 UTC 2014 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.