File tree Expand file tree Collapse file tree
src/Resolver/TemplateChain/DataObject Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -114,12 +114,22 @@ private function findChildInsertPosition(TemplateTypeInterface $parent): int
114114
115115 private function findIndexByFullyQualifiedName (string $ fullyQualifiedName ): ?int
116116 {
117- return array_find_key ($ this ->chain , static fn ($ item ) => $ item ->getFullyQualifiedName () === $ fullyQualifiedName );
117+ foreach ($ this ->chain as $ key => $ templateType ) {
118+ if ($ templateType ->getFullyQualifiedName () === $ fullyQualifiedName ) {
119+ return $ key ;
120+ }
121+ }
122+ return null ;
118123 }
119124
120125 private function findIndexByModuleId (string $ moduleId ): ?int
121126 {
122- return array_find_key ($ this ->chain , static fn ($ item ) => $ item ->getNamespace () === $ moduleId );
127+ foreach ($ this ->chain as $ key => $ templateType ) {
128+ if ($ templateType ->getNamespace () === $ moduleId ) {
129+ return $ key ;
130+ }
131+ }
132+ return null ;
123133 }
124134
125135 private function findByModuleIdInternal (string $ moduleId ): ?TemplateTypeInterface
You can’t perform that action at this time.
0 commit comments