Skip to content

fix(jsonld): reset gen_id configuration#7264

Merged
soyuka merged 2 commits into
api-platform:4.1from
soyuka:fix/genid
Jul 1, 2025
Merged

fix(jsonld): reset gen_id configuration#7264
soyuka merged 2 commits into
api-platform:4.1from
soyuka:fix/genid

Conversation

@soyuka

@soyuka soyuka commented Jun 30, 2025

Copy link
Copy Markdown
Member
Q A
Branch? 4.1
Tickets Closes #7258 #7261
License MIT

I failed reproducing the users bc breaks, I think I isolated the behavior though, @norkunas @GSadee may you please check this patch and tell me if it solves your issues? Also would it be possible to have a look at my test fixtures and let me know how your configuration differs from my test?

@norkunas

norkunas commented Jul 1, 2025

Copy link
Copy Markdown
Contributor

@soyuka 🙂

207 tests triggered 1 PHP warning:

  1. /var/www/html/vendor/api-platform/jsonld/Serializer/ItemNormalizer.php:127
    Undefined variable $operation

Setting $operation = $context['operation'] ?? $this->resourceMetadataCollectionFactory->create($resourceClass)->getOperation(); before that line does not help, tests fails as previously

@soyuka

soyuka commented Jul 1, 2025

Copy link
Copy Markdown
Member Author

indeed anyways not sure the problem comes from there :/ any leads on how my test differs from your use case?

@norkunas

norkunas commented Jul 1, 2025

Copy link
Copy Markdown
Contributor

@soyuka something has changed, but not as expected:

--- Expected
+++ Actual
@@ @@
     'locations' => Array (
         0 => Array (
-            '@type' => 'CompanyLocation'
             '@id' => '/api/company-locations/0192f5...ab9c7b'
             ...
@@ @@
         )
     )
     'logo' => Array (
-        '@type' => 'MediaObject'
         '@id' => '/api/media-objects/9d882cae-f...cf582a'
         ...
@@ @@
     'seniorDeveloperRate' => 30.3
     'leadPmRate' => 40.4
     'industry' => Array (
-        '@type' => 'Industry'
         '@id' => '/api/industries/01936891-9d65...2386a9'
        ...

many tests are now missing @type.

aye CI also caught that

@norkunas

norkunas commented Jul 1, 2025

Copy link
Copy Markdown
Contributor

everything green for me :)

@soyuka soyuka merged commit f46c0a3 into api-platform:4.1 Jul 1, 2025
107 of 111 checks passed
@soyuka

soyuka commented Jul 1, 2025

Copy link
Copy Markdown
Member Author

thanks @norkunas !!

@norkunas

norkunas commented Jul 1, 2025

Copy link
Copy Markdown
Contributor

Thank you for quick fix:)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants