Skip to content

Commit de4eba7

Browse files
author
Jeremiah VALERIE
committed
Fix interface implementaion when interface is extends.
1 parent 327cc52 commit de4eba7

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/Type/Definition/InterfaceType.php

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,9 @@ class InterfaceType extends Type implements AbstractType, OutputType, CompositeT
4949
public static function addImplementationToInterfaces(ObjectType $impl)
5050
{
5151
self::$_lazyLoadImplementations[] = function() use ($impl) {
52+
/** @var self $interface */
5253
foreach ($impl->getInterfaces() as $interface) {
53-
$interface->_implementations[] = $impl;
54+
$interface->addImplementation($impl);
5455
}
5556
};
5657
}
@@ -66,6 +67,16 @@ public static function loadImplementationToInterfaces()
6667
self::$_lazyLoadImplementations = [];
6768
}
6869

70+
/**
71+
* Add a implemented object type to interface
72+
*
73+
* @param ObjectType $impl
74+
*/
75+
protected function addImplementation(ObjectType $impl)
76+
{
77+
$this->_implementations[] = $impl;
78+
}
79+
6980
/**
7081
* InterfaceType constructor.
7182
* @param array $config

0 commit comments

Comments
 (0)