Skip to content
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

Generated OpenApi Docs are different depending if metadata cache exists or not #6731

Open
ostrolucky opened this issue Oct 16, 2024 · 2 comments
Labels

Comments

@ostrolucky
Copy link
Contributor

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
image

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],
    []
)];
@soyuka
Copy link
Member

soyuka commented Oct 17, 2024

Not sure why OpenAPIFactory doesn't generate the full cache though

Copy link

stale bot commented Dec 18, 2024

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.

@stale stale bot added the stale label Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants