private function getFragmentTags(ContainerBuilder $container, string $tag): array
    {
        $result = [];

        foreach ($this->findAndSortTaggedServices($tag, $container) as $priority => $reference) {
            $definition = $container->findDefinition($reference);

            foreach ($definition->getTag($tag) as $attributes) {
                if (!isset($attributes['category'])) {
                    throw new InvalidConfigurationException(
                        sprintf('Missing category for "%s" fragment on service ID "%s"', $tag, (string) $reference)
                    );
                }

                if (!isset($attributes['type'])) {
                    throw new InvalidConfigurationException(
                        sprintf('Missing type for "%s" fragment on service ID "%s"', $tag, (string) $reference)
                    );
                }

                $result[] = $attributes;
            }
        }

        return $result;
    }
private function getFragmentTags(ContainerBuilder $container, string $tag): array
    {
        $result = [];

        foreach ($this->findAndSortTaggedServices($tag, $container) as $priority => $reference) {
            $definition = $container->findDefinition($reference);

            foreach ($definition->getTag($tag) as $attributes) {
                if (!isset($attributes['category'])) {
                    throw new InvalidConfigurationException(
                        sprintf('Missing category for "%s" fragment on service ID "%s"', $tag, (string) $reference)
                    );
                }

                if (!isset($attributes['type'])) {
                    throw new InvalidConfigurationException(
                        sprintf('Missing type for "%s" fragment on service ID "%s"', $tag, (string) $reference)
                    );
                }

                $result[] = $attributes;
            }
        }

        return $result;
    }
@throws InvalidConfigurationException

@return string[]