Skip to content

Conversation

@soyuka
Copy link
Member

@soyuka soyuka commented Jun 30, 2025

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
Copy link
Contributor

norkunas commented Jul 1, 2025

@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
Copy link
Member Author

soyuka commented Jul 1, 2025

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

@norkunas
Copy link
Contributor

norkunas commented Jul 1, 2025

@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
Copy link
Contributor

norkunas commented Jul 1, 2025

everything green for me :)

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

soyuka commented Jul 1, 2025

thanks @norkunas !!

@norkunas
Copy link
Contributor

norkunas commented Jul 1, 2025

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