File tree Expand file tree Collapse file tree 3 files changed +6
-0
lines changed Expand file tree Collapse file tree 3 files changed +6
-0
lines changed Original file line number Diff line number Diff line change 1111class CompletionProvider
1212{
1313 /**
14+ * @param class-string<CompletionProviderInterface>|null $providerClass
1415 * @param class-string<CompletionProviderInterface>|CompletionProviderInterface|null $provider If a class-string, it will be resolved from the container at the point of use.
1516 */
1617 public function __construct (
18+ public ?string $ providerClass = null ,
1719 public string |CompletionProviderInterface |null $ provider = null ,
1820 public ?array $ values = null ,
1921 public ?string $ enum = null ,
Original file line number Diff line number Diff line change @@ -511,6 +511,8 @@ private function getCompletionProviders(\ReflectionMethod|\ReflectionFunction $r
511511
512512 if ($ attributeInstance ->provider ) {
513513 $ completionProviders [$ param ->getName ()] = $ attributeInstance ->provider ;
514+ } elseif ($ attributeInstance ->providerClass ) {
515+ $ completionProviders [$ param ->getName ()] = $ attributeInstance ->providerClass ;
514516 } elseif ($ attributeInstance ->values ) {
515517 $ completionProviders [$ param ->getName ()] = new ListCompletionProvider ($ attributeInstance ->values );
516518 } elseif ($ attributeInstance ->enum ) {
Original file line number Diff line number Diff line change @@ -268,6 +268,8 @@ private function getCompletionProviders(\ReflectionMethod $reflectionMethod): ar
268268
269269 if ($ attributeInstance ->provider ) {
270270 $ completionProviders [$ param ->getName ()] = $ attributeInstance ->provider ;
271+ } elseif ($ attributeInstance ->providerClass ) {
272+ $ completionProviders [$ param ->getName ()] = $ attributeInstance ->provider ;
271273 } elseif ($ attributeInstance ->values ) {
272274 $ completionProviders [$ param ->getName ()] = new ListCompletionProvider ($ attributeInstance ->values );
273275 } elseif ($ attributeInstance ->enum ) {
You can’t perform that action at this time.
0 commit comments