Skip to content

Commit dc7973d

Browse files
committed
Fixing tests + one missing return
1 parent c3ccf5f commit dc7973d

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

src/Maker/MakeEntity.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -551,6 +551,8 @@ function ($name) use ($targetClass) {
551551
$askInverseSide = function (EntityRelation $relation) use ($io) {
552552
if ($this->isClassInVendor($relation->getInverseClass())) {
553553
$relation->setMapInverseRelation(false);
554+
555+
return;
554556
}
555557

556558
// recommend an inverse side, except for OneToOne, where it's inefficient

tests/Doctrine/fixtures/expected_xml/src/Repository/UserRepository.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@
66
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
77
use Symfony\Bridge\Doctrine\RegistryInterface;
88

9+
/**
10+
* @method User|null find($id, $lockMode = null, $lockVersion = null)
11+
* @method User|null findOneBy(array $criteria, array $orderBy = null)
12+
* @method User[] findAll()
13+
* @method User[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
14+
*/
915
class UserRepository extends ServiceEntityRepository
1016
{
1117
public function __construct(RegistryInterface $registry)

tests/Maker/FunctionalTest.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -258,8 +258,6 @@ public function getCommandTests()
258258
'UserAvatarPhoto',
259259
// relation type
260260
'OneToMany',
261-
// inverse side?
262-
'y',
263261
// field name on opposite side - use default 'user'
264262
'',
265263
// nullable
@@ -337,8 +335,6 @@ public function getCommandTests()
337335
'ManyToOne',
338336
// the target entity
339337
'Some\Vendor\Group',
340-
// nullable
341-
'n',
342338
/*
343339
* normally, we ask for the field on the *other* side, but we
344340
* do not here, since the other side won't be mapped.

0 commit comments

Comments
 (0)