Skip to content

Commit

Permalink
Merge pull request #136 from michnovka/2.x-fix-refresh-stub
Browse files Browse the repository at this point in the history
Fix new EntityManager#refresh in Doctrine ORM 2.14
  • Loading branch information
orklah committed Jan 17, 2023
2 parents 9ce1b84 + 4a048d1 commit 4f62e33
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
10 changes: 10 additions & 0 deletions stubs/EntityManager.phpstub
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,14 @@ class EntityManager implements EntityManagerInterface
public function getReference($entityName, $id)
{
}

/**
* @param object $entity
* @param null|int $lockMode
*
* @return void
*/
public function refresh($entity, $lockMode = null)
{
}
}
7 changes: 7 additions & 0 deletions stubs/EntityManagerInterface.phpstub
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,11 @@ interface EntityManagerInterface extends ObjectManager
* @template T
*/
public function getReference(string $entityName, $id);

/**
* @param object $entity
*
* @return void
*/
public function refresh($entity, ?int $lockMode = null);
}

0 comments on commit 4f62e33

Please sign in to comment.