From 9ac6466cd68bbc4f59e51410594aa0bb82bacbe5 Mon Sep 17 00:00:00 2001 From: Nyholm Date: Fri, 10 Jun 2022 20:33:45 +0200 Subject: [PATCH 1/2] Enable XML and run code examples --- composer.json | 6 +++++- src/Service/CodeRunner/ConfigurationRunner.php | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 0bac3b1..fccc045 100644 --- a/composer.json +++ b/composer.json @@ -46,7 +46,11 @@ "preferred-install": { "*": "dist" }, - "sort-packages": true + "sort-packages": true, + "allow-plugins": { + "bamarni/composer-bin-plugin": true, + "symfony/flex": true + } }, "extra": { "symfony": { diff --git a/src/Service/CodeRunner/ConfigurationRunner.php b/src/Service/CodeRunner/ConfigurationRunner.php index 3bd2e1e..e2a9f84 100644 --- a/src/Service/CodeRunner/ConfigurationRunner.php +++ b/src/Service/CodeRunner/ConfigurationRunner.php @@ -13,7 +13,7 @@ * * @author Tobias Nyholm */ -class ConfigurationRunner +class ConfigurationRunner implements Runner { /** * @param list $nodes @@ -77,7 +77,7 @@ private function getFile(CodeNode $node, array $contents): string $regex = match ($node->getLanguage()) { 'php' => '|^// ?([a-z1-9A-Z_\-/]+\.php)$|', 'yaml' => '|^# ?([a-z1-9A-Z_\-/]+\.yaml)$|', - //'xml' => '|^$|', + 'xml' => '|^$|', default => null, }; From ec133f9f1df1904ecf96ce387d4aeabf65a38f6b Mon Sep 17 00:00:00 2001 From: Nyholm Date: Fri, 10 Jun 2022 20:49:47 +0200 Subject: [PATCH 2/2] normalize --- composer.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.json b/composer.json index fccc045..b74c72d 100644 --- a/composer.json +++ b/composer.json @@ -42,15 +42,15 @@ } }, "config": { + "allow-plugins": { + "bamarni/composer-bin-plugin": true, + "symfony/flex": true + }, "optimize-autoloader": true, "preferred-install": { "*": "dist" }, - "sort-packages": true, - "allow-plugins": { - "bamarni/composer-bin-plugin": true, - "symfony/flex": true - } + "sort-packages": true }, "extra": { "symfony": {