-
-
Notifications
You must be signed in to change notification settings - Fork 893
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix issues with extending {XML,Yaml} -> {XML,Yaml} resources #5956
base: 3.2
Are you sure you want to change the base?
Fix issues with extending {XML,Yaml} -> {XML,Yaml} resources #5956
Conversation
cbae89d
to
9773872
Compare
9773872
to
aea2f42
Compare
I see one build run has been cancelled - the red one. Could you rerun it? 🙏 |
@@ -75,14 +75,15 @@ private function buildResources(array $resourcesYaml, string $path): void | |||
$resourceYaml = [$resourceYaml]; | |||
} | |||
|
|||
$resourcesCount = isset($this->resources[$resourceName]) ? \count($this->resources[$resourceName]) : 0; | |||
foreach ($resourceYaml as $key => $resourceYamlDatum) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is key always an int @vincentchalamon ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm not sure that it's always an int, cf. https://github.com/api-platform/core/blob/main/src/Metadata/Tests/Extractor/yaml/valid.yaml
To be sure, it would be better to rely on an int variable declared out of this foreach and incremented accordingly.
this looks nice, can you target 3.1? We should add a test somehow |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Hi, to be honest I'm not so familiar with API Platform dev structure, so I think I'm not able to add tests here. But in a free time I'll check whether the index is always integer - as it was discussed above and refactor this. |
Hi all! :) I was testing a feature of extending resources by multiple XML/Yaml resource files for the same resource. For XMLs it works from scratch, but there is two issues:
It looks for me as a bug, because as you can see, there is too little changes from me to solve it.
Please let me know, what is your opinion regarding to this topic 🖖