Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

Commit bc09e87

Browse files
committed
Fixed FormAnnotationBuilderFactory::injectFactory() for zend-servicemanager v2
The patch introduced for 2.7.11 was incorrect in that it was passing the `$container` argument, and not the `$formElementManager` argument, to `$formElementManager->injectFactory()`. This patch updates it to use the correct value, and fixes the related test expectation as well.
1 parent 1095058 commit bc09e87

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Service/FormAnnotationBuilderFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ private function injectFactory(
9696
AnnotationBuilder $annotationBuilder
9797
) {
9898
if ($formElementManager instanceof FormElementManagerV2Polyfill) {
99-
$formElementManager->injectFactory($annotationBuilder, $container);
99+
$formElementManager->injectFactory($annotationBuilder, $formElementManager);
100100
return;
101101
}
102102

test/Service/FormAnnotationBuilderFactoryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public function testInjectFactoryInCorrectOrderV2()
6262
->method('injectFactory')
6363
->with($this->callback(function ($annotationBuilder) {
6464
return $annotationBuilder instanceof AnnotationBuilder;
65-
}), $serviceLocator);
65+
}), $mockElementManager);
6666

6767
$sut = new FormAnnotationBuilderFactory();
6868
$sut->createService($serviceLocator);

0 commit comments

Comments
 (0)