PrimeIntellect/SWE-rebench-V2 huggingface dataset:
Repository: twigphp/Twig (php)

Issue:
twig/extra-bundle 3.3.5: Warning: Undefined array key 1 when clearing cache
I've just upgraded to twig/extra-bundle 3.3.5 and I get this error message:

> In XmlDumper.php line 178:
>                                   
>   Warning: Undefined array key 1  

Content of `$callable` (from [here](https://github.com/symfony/dependency-injection/blob/ba94559be9738d77cd29e24b5d81cf3b89b7d628/Dumper/XmlDumper.php#L178)) is:

```
array:1 [
  0 => Symfony\Component\DependencyInjection\Reference {#12667
    -id: "twig.markdown.league_common_mark_converter_factory"
    -invalidBehavior: 1
  }
]

```

I'm using CommonMark in my project (without using `markdown-extra`). I think #3559 is related.

Pull request:
Fix Commonmark factory definition
_Really_ fixes #3620.

I had an invalid service factory definition.

Patch:
diff --git a/extra/twig-extra-bundle/Resources/config/markdown_league.php b/extra/twig-extra-bundle/Resources/config/markdown_league.php
index e4af03ae..266f5977 100644
--- a/extra/twig-extra-bundle/Resources/config/markdown_league.php
+++ b/extra/twig-extra-bundle/Resources/config/markdown_league.php
@@ -23,7 +23,7 @@ return static function (ContainerConfigurator $container) {
         ->args([new TaggedIteratorArgument('twig.markdown.league_extension')])
 
         ->set('twig.markdown.league_common_mark_converter', CommonMarkConverter::class)
-        ->factory([$service('twig.markdown.league_common_mark_converter_factory')])
+        ->factory($service('twig.markdown.league_common_mark_converter_factory'))
 
         ->set('twig.markdown.default', LeagueMarkdown::class)
         ->args([$service('twig.markdown.league_common_mark_converter')])


Test patch:
diff --git a/extra/twig-extra-bundle/Tests/DependencyInjection/TwigExtraExtensionTest.php b/extra/twig-extra-bundle/Tests/DependencyInjection/TwigExtraExtensionTest.php
index 05174582..355b794d 100644
--- a/extra/twig-extra-bundle/Tests/DependencyInjection/TwigExtraExtensionTest.php
+++ b/extra/twig-extra-bundle/Tests/DependencyInjection/TwigExtraExtensionTest.php
@@ -37,5 +37,10 @@ class TwigExtraExtensionTest extends TestCase
         }
 
         $this->assertSame(LeagueMarkdown::class, $container->getDefinition('twig.markdown.default')->getClass());
+
+        $commonmarkConverterFactory = $container->getDefinition('twig.markdown.league_common_mark_converter')->getFactory();
+
+        $this->assertSame('twig.markdown.league_common_mark_converter_factory', (string) $commonmarkConverterFactory[0]);
+        $this->assertSame('__invoke', $commonmarkConverterFactory[1]);
     }
 }