src/Serializer/AbstractItemNormalizer.php
protected function getFactoryOptions(array $context): array
    {
        $options = [];

        if (isset($context[self::GROUPS])) {
            $options['serializer_groups'] = $context[self::GROUPS];
        }

        if (isset($context['collection_operation_name'])) {
            $options['collection_operation_name'] = $context['collection_operation_name'];
        }

        if (isset($context['item_operation_name'])) {
            $options['item_operation_name'] = $context['item_operation_name'];
        }

        return $options;
    }
protected function getFactoryOptions(array $context): array
    {
        $options = [];

        if (isset($context[self::GROUPS])) {
            $options['serializer_groups'] = $context[self::GROUPS];
        }

        if (isset($context['collection_operation_name'])) {
            $options['collection_operation_name'] = $context['collection_operation_name'];
        }

        if (isset($context['item_operation_name'])) {
            $options['item_operation_name'] = $context['item_operation_name'];
        }

        return $options;
    }
protected function getFactoryOptions ( array $ context ) : array { $ options = [ ] ; if ( isset ( $ context [ self :: GROUPS ] ) ) { $ options [ 'serializer_groups' ] = $ context [ self :: GROUPS ] ; } if ( isset ( $ context [ 'collection_operation_name' ] ) ) { $ options [ 'collection_operation_name' ] = $ context [ 'collection_operation_name' ] ; } if ( isset ( $ context [ 'item_operation_name' ] ) ) { $ options [ 'item_operation_name' ] = $ context [ 'item_operation_name' ] ; } return $ options ; }
Gets a valid context for property metadata factories.

@see https://github.com/symfony/symfony/blob/master/src/Symfony/Component/PropertyInfo/Extractor/SerializerExtractor.php
Gets a valid context for property metadata factories .