Skip to content

Commit 63de1b2

Browse files
authored
Merge pull request #1593 from soyuka/fix-1592
Fix 1592
2 parents f039498 + ae31398 commit 63de1b2

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

features/bootstrap/FeatureContext.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,7 @@ public function thereIsACompositeIdentifierObject()
338338
$item = new CompositeItem();
339339
$item->setField1('foobar');
340340
$this->manager->persist($item);
341+
$this->manager->flush();
341342

342343
for ($i = 0; $i < 4; ++$i) {
343344
$label = new CompositeLabel();
@@ -349,6 +350,8 @@ public function thereIsACompositeIdentifierObject()
349350
$rel->setValue('somefoobardummy');
350351

351352
$this->manager->persist($label);
353+
// since doctrine 2.6 we need existing identifiers on relations
354+
$this->manager->flush();
352355
$this->manager->persist($rel);
353356
}
354357

@@ -401,12 +404,16 @@ public function thereIsARelatedDummyWithFriends(int $nb)
401404
$relatedDummy = new RelatedDummy();
402405
$relatedDummy->setName('RelatedDummy with friends');
403406
$this->manager->persist($relatedDummy);
407+
$this->manager->flush();
404408

405409
for ($i = 1; $i <= $nb; ++$i) {
406410
$friend = new DummyFriend();
407411
$friend->setName('Friend-'.$i);
408412

409413
$this->manager->persist($friend);
414+
// since doctrine 2.6 we need existing identifiers on relations
415+
// See https://github.com/doctrine/doctrine2/pull/6701
416+
$this->manager->flush();
410417

411418
$relation = new RelatedToDummyFriend();
412419
$relation->setName('Relation-'.$i);

phpstan.neon

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,5 @@ parameters:
1010
- '#Call to an undefined method PHPUnit_Framework_MockObject_MockObject::[a-zA-Z0-9_]+\(\)#'
1111

1212
# False positives
13-
- '#Parameter \#2 \$dqlPart of method Doctrine\\ORM\\QueryBuilder::add\(\) expects Doctrine\\ORM\\Query\\Expr\\Base, Doctrine\\ORM\\Query\\Expr\\Join\[\] given#' # Fixed in Doctrine's master
1413
- '#Call to an undefined method Doctrine\\Common\\Persistence\\ObjectManager::getConnection\(\)#'
1514
- '#Class Symfony\\Component\\ExpressionLanguage\\ExpressionLanguage not found and could not be autoloaded#'

src/EventListener/EventPriorities.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,17 @@
2020
*/
2121
final class EventPriorities
2222
{
23+
// kernel.request
2324
const PRE_READ = 5;
2425
const POST_READ = 3;
2526
const PRE_DESERIALIZE = 3;
2627
const POST_DESERIALIZE = 1;
28+
// kernel.view
2729
const PRE_VALIDATE = 65;
2830
const POST_VALIDATE = 63;
2931
const PRE_WRITE = 33;
3032
const POST_WRITE = 31;
3133
const PRE_RESPOND = 9;
34+
// kernel.response
3235
const POST_RESPOND = 0;
3336
}

0 commit comments

Comments
 (0)