core
core copied to clipboard
Generated OpenApi Docs are different depending if metadata cache exists or not
API Platform version(s) affected: 3.4.3
Description
I was banging my head against the wall trying to figure out why locally running test passes, but on CI it fails. Then I found it fails locally as well when my cache needs to be generated. Finally, I compared before & after running tests and only significant difference is that var/cache/test/pools have now new metadata cache files
Here is the diff
Example file
root@c49b853ae106:/srv/api# cat var/cache/test/pools/system/8s0Py00TIs/+/A/5k95jvAy2d87QtUsL8OQ
<?php //property_name_collection_a5b6522759cfc7a5bb8956432b324254
return [PHP_INT_MAX, static fn () => \Symfony\Component\VarExporter\Internal\Hydrator::hydrate(
$o = [
clone (\Symfony\Component\VarExporter\Internal\Registry::$prototypes['ApiPlatform\\Metadata\\Property\\PropertyNameCollection'] ?? \Symfony\Component\VarExporter\Internal\Registry::p('ApiPlatform\\Metadata\\Property\\PropertyNameCollection')),
],
null,
[
'ApiPlatform\\Metadata\\Property\\PropertyNameCollection' => [
'properties' => [
[
'id',
],
],
],
],
$o[0],
[]
)];
Not sure why OpenAPIFactory doesn't generate the full cache though
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.