Skip to content

Conversation

@soyuka
Copy link
Member

@soyuka soyuka commented Nov 13, 2025

fixes #7504

@soyuka soyuka merged commit 98fc352 into api-platform:4.2 Nov 13, 2025
111 of 130 checks passed
@soyuka soyuka deleted the object-mapper-bc branch November 13, 2025 10:48
@rvanlaak
Copy link
Contributor

rvanlaak commented Nov 13, 2025

symfony/http-kernel[v7.3.0, ..., v7.3.7] require symfony/http-foundation ^7.3 -> found symfony/http-foundation[v7.3.0, ..., v7.3.7] but these were not loaded, because they are affected by security advisories. To ignore the advisories, add ("PKSA-365x-2zjk-pt47") to the audit "ignore" config. To turn the feature off entirely, you can set "block-insecure" to false in your "audit" config.

What about adding the infected symfony/http-foundation to the conflicts as well in another PR?

Or disabling / soft failing on it given this is a library.

@soyuka
Copy link
Member Author

soyuka commented Nov 13, 2025

#7532 for that :)

@rvanlaak
Copy link
Contributor

rvanlaak commented Nov 14, 2025

Weird. This PR according to Github's PR page wasn't included in the 4.2.4 tag, where #7532 for instance does. When looking at the commits this PR is listed though: https://github.com/api-platform/core/commits/v4.2.4/

Our Renovate CI runs start throwing exceptions on the latest tag, so the fix possibly isn't sufficient? Or does Renovate by default not combine all APIP package updates together that are needed for this fix to come through?

Symfony\Component\ErrorHandler\Error\ClassNotFoundError {#609
  #message: """
    Attempted to load interface "ObjectMapperAwareInterface" from namespace "Symfony\Component\ObjectMapper".\n
    Did you forget a "use" statement for another namespace?
    """
  #code: 0
  #file: "/app/vendor/api-platform/state/ObjectMapper/ObjectMapper.php"
  #line: 33
  trace: {
    /app/vendor/api-platform/state/ObjectMapper/ObjectMapper.php:33 { …}
    /app/vendor/composer/ClassLoader.php:576 { …}
    /app/vendor/composer/ClassLoader.php:427 { …}
    /app/vendor/symfony/error-handler/DebugClassLoader.php:310 { …}
    /app/var/cache/test/ContainerGxGHNUn/App_KernelTestDebugContainer.php:2642 {
      ContainerGxGHNUn\App_KernelTestDebugContainer::getApiPlatform_ObjectMapper_RelationService($container)
      › {
      ›     return $container->privates['api_platform.object_mapper.relation'] = new \ApiPlatform\State\ObjectMapper\ObjectMapper(($container->privates['api_platform.object_mapper.relation.inner'] ?? self::getApiPlatform_ObjectMapper_Relation_InnerService($container)));
      › }
      arguments: {
        $class: "ApiPlatform\State\ObjectMapper\ObjectMapper"
      }
    }
    /app/var/cache/test/ContainerGxGHNUn/App_KernelTestDebugContainer.php:2845 { …}
    /app/var/cache/test/ContainerGxGHNUn/App_KernelTestDebugContainer.php:2931 { …}
    /app/var/cache/test/ContainerGxGHNUn/App_KernelTestDebugContainer.php:1796 { …}
    /app/var/cache/test/ContainerGxGHNUn/App_KernelTestDebugContainer.php:1236 { …}
    /app/var/cache/test/ContainerGxGHNUn/App_KernelTestDebugContainer.php:4790 { …}
    /app/var/cache/test/ContainerGxGHNUn/getEncryptedIntegrationConfigurationRepositoryService.php:32 { …}
    /app/var/cache/test/ContainerGxGHNUn/App_KernelTestDebugContainer.php:684 { …}
    /app/var/cache/test/ContainerGxGHNUn/getIntegrationClientPoolService.php:23 { …}
    /app/var/cache/test/ContainerGxGHNUn/App_KernelTestDebugContainer.php:684 { …}
    /app/var/cache/test/ContainerGxGHNUn/getBrewwImporterService.php:24 { …}
    /app/var/cache/test/ContainerGxGHNUn/App_KernelTestDebugContainer.php:684 { …}
    /app/var/cache/test/ContainerGxGHNUn/getBrewwSnapshotDemoDataFixtureService.php:29 { …}
    /app/var/cache/test/ContainerGxGHNUn/App_KernelTestDebugContainer.php:684 { …}
    /app/var/cache/test/ContainerGxGHNUn/getDoctrine_Fixtures_LoaderService.php:39 { …}
    /app/var/cache/test/ContainerGxGHNUn/App_KernelTestDebugContainer.php:684 { …}
    /app/var/cache/test/ContainerGxGHNUn/getDoctrine_FixturesLoadCommandService.php:28 { …}
    /app/var/cache/test/ContainerGxGHNUn/App_KernelTestDebugContainer.php:684 { …}
    /app/vendor/symfony/dependency-injection/Container.php:399 { …}
    /app/vendor/symfony/dependency-injection/Argument/ServiceLocator.php:36 { …}
    /app/vendor/symfony/console/CommandLoader/ContainerCommandLoader.php:40 { …}
    /app/vendor/symfony/console/Application.php:622 { …}
    /app/vendor/symfony/console/Application.php:707 { …}
    /app/vendor/symfony/framework-bundle/Console/Application.php:140 { …}
    /app/vendor/symfony/console/Application.php:298 { …}
    /app/vendor/symfony/framework-bundle/Console/Application.php:77 { …}
    /app/vendor/symfony/console/Application.php:195 { …}
    /app/vendor/symfony/runtime/Runner/Symfony/ConsoleApplicationRunner.php:49 { …}
    /app/vendor/autoload_runtime.php:29 { …}
    /app/bin/console:15 { …}
  }
}

final class ObjectMapper implements ObjectMapperInterface
{
public function __construct(private ObjectMapperInterface $decorated)
if (class_exists(ObjectMapperAwareInterface::class)) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the if should be the other way around. The way it is right now you're including ObjectMapperAwareInterface if it doesn't exist and not if it does, which obviously doesn't make sense.

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.

3 participants