Skip to content

Commit e7bca1c

Browse files
Fix
1 parent a609735 commit e7bca1c

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/Doctrine/Odm/Metadata/Resource/DoctrineMongoDbOdmResourceCollectionMetadataFactory.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,16 +89,16 @@ private function addDefaults(Operation $operation): Operation
8989

9090
if (null === $operation->getProvider()) {
9191
$operation = $operation->withProvider($this->getProvider($operation));
92+
93+
if ($operation instanceof HttpOperation) {
94+
$operation = $operation->withRequirements($this->getRequirements($operation));
95+
}
9296
}
9397

9498
if (null === $operation->getProcessor()) {
9599
$operation = $operation->withProcessor($this->getProcessor($operation));
96100
}
97101

98-
if ($operation instanceof HttpOperation) {
99-
$operation = $operation->withRequirements($this->getRequirements($operation));
100-
}
101-
102102
return $operation;
103103
}
104104

src/Doctrine/Orm/Metadata/Resource/DoctrineOrmResourceCollectionMetadataFactory.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,10 @@ private function addDefaults(Operation $operation): Operation
8787
{
8888
if (null === $operation->getProvider()) {
8989
$operation = $operation->withProvider($this->getProvider($operation));
90+
91+
if ($operation instanceof HttpOperation) {
92+
$operation = $operation->withRequirements($this->getRequirements($operation));
93+
}
9094
}
9195

9296
$options = $operation->getStateOptions() ?: new Options();
@@ -99,10 +103,6 @@ private function addDefaults(Operation $operation): Operation
99103
$operation = $operation->withProcessor($this->getProcessor($operation));
100104
}
101105

102-
if ($operation instanceof HttpOperation) {
103-
$operation = $operation->withRequirements($this->getRequirements($operation));
104-
}
105-
106106
return $operation;
107107
}
108108

0 commit comments

Comments
 (0)