Skip to content

Commit 15d61c4

Browse files
authored
fix: using parameters in fromClass and toClass uriVariables' options (#6663)
1 parent b93ee46 commit 15d61c4

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/Metadata/Extractor/XmlResourceExtractor.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,10 +271,10 @@ private function buildUriVariables(\SimpleXMLElement $resource): ?array
271271
if ($toProperty = $this->phpize($data, 'toProperty', 'string')) {
272272
$uriVariables[$parameterName]['to_property'] = $toProperty;
273273
}
274-
if ($fromClass = $this->phpize($data, 'fromClass', 'string')) {
274+
if ($fromClass = $this->resolve($this->phpize($data, 'fromClass', 'string'))) {
275275
$uriVariables[$parameterName]['from_class'] = $fromClass;
276276
}
277-
if ($toClass = $this->phpize($data, 'toClass', 'string')) {
277+
if ($toClass = $this->resolve($this->phpize($data, 'toClass', 'string'))) {
278278
$uriVariables[$parameterName]['to_class'] = $toClass;
279279
}
280280
if (isset($data->identifiers->values)) {

src/Metadata/Extractor/YamlResourceExtractor.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,13 +193,13 @@ private function buildUriVariables(array $resource): ?array
193193
unset($data[0], $data[1]);
194194
}
195195
if (isset($data['fromClass'])) {
196-
$uriVariables[$parameterName]['from_class'] = $data['fromClass'];
196+
$uriVariables[$parameterName]['from_class'] = $this->resolve($data['fromClass']);
197197
}
198198
if (isset($data['fromProperty'])) {
199199
$uriVariables[$parameterName]['from_property'] = $data['fromProperty'];
200200
}
201201
if (isset($data['toClass'])) {
202-
$uriVariables[$parameterName]['to_class'] = $data['toClass'];
202+
$uriVariables[$parameterName]['to_class'] = $this->resolve($data['toClass']);
203203
}
204204
if (isset($data['toProperty'])) {
205205
$uriVariables[$parameterName]['to_property'] = $data['toProperty'];

0 commit comments

Comments
 (0)