diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 0000000..ee965d5
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,21 @@
+name: CI
+
+on: [push]
+
+jobs:
+ build-test:
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v2
+
+ - uses: php-actions/composer@v5
+
+ - name: PHPUnit Tests
+ uses: php-actions/phpunit@v9
+ env:
+ TEST_NAME: PHPUNIT
+ with:
+ bootstrap: vendor/autoload.php
+ configuration: phpunit.xml
+ args: --coverage-text
diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml
new file mode 100644
index 0000000..066ac59
--- /dev/null
+++ b/.github/workflows/php.yml
@@ -0,0 +1,36 @@
+name: PHP Composer
+
+on:
+ push:
+ branches: [ master ]
+ pull_request:
+ branches: [ master ]
+
+jobs:
+ build:
+
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v2
+
+ - name: Validate composer.json and composer.lock
+ run: composer validate --strict
+
+ - name: Cache Composer packages
+ id: composer-cache
+ uses: actions/cache@v2
+ with:
+ path: vendor
+ key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
+ restore-keys: |
+ ${{ runner.os }}-php-
+
+ - name: Install dependencies
+ run: composer install --prefer-dist --no-progress
+
+ # Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
+ # Docs: https://getcomposer.org/doc/articles/scripts.md
+
+ - name: Run test suite
+ run: composer run-script test
diff --git a/DependencyInjection/Configuration.php b/DependencyInjection/Configuration.php
index 90bbdfa..3d5900a 100644
--- a/DependencyInjection/Configuration.php
+++ b/DependencyInjection/Configuration.php
@@ -12,11 +12,10 @@ class Configuration implements ConfigurationInterface
*
* @return TreeBuilder
*/
- public function getConfigTreeBuilder()
+ public function getConfigTreeBuilder(): TreeBuilder
{
$treeBuilder = new TreeBuilder('knp_markdown');
- // BC layer for symfony/config < 4.2
- $rootNode = method_exists($treeBuilder, 'getRootNode') ? $treeBuilder->getRootNode() : $treeBuilder->root('knp_markdown');
+ $rootNode = $treeBuilder->getRootNode();
$rootNode
->addDefaultsIfNotSet()
@@ -27,37 +26,6 @@ class Configuration implements ConfigurationInterface
->scalarNode('service')->cannotBeEmpty()->defaultValue('markdown.parser.max')->end()
->end()
->end()
- ->arrayNode('sundown')
- ->addDefaultsIfNotSet()
- ->children()
- ->arrayNode('extensions')
- ->addDefaultsIfNotSet()
- ->children()
- ->booleanNode('fenced_code_blocks')->defaultFalse()->end()
- ->booleanNode('no_intra_emphasis')->defaultFalse()->end()
- ->booleanNode('tables')->defaultFalse()->end()
- ->booleanNode('autolink')->defaultFalse()->end()
- ->booleanNode('strikethrough')->defaultFalse()->end()
- ->booleanNode('lax_html_blocks')->defaultFalse()->end()
- ->booleanNode('space_after_headers')->defaultFalse()->end()
- ->booleanNode('superscript')->defaultFalse()->end()
- ->end()
- ->end()
- ->arrayNode('render_flags')
- ->addDefaultsIfNotSet()
- ->children()
- ->booleanNode('filter_html')->defaultFalse()->end()
- ->booleanNode('no_images')->defaultFalse()->end()
- ->booleanNode('no_links')->defaultFalse()->end()
- ->booleanNode('no_styles')->defaultFalse()->end()
- ->booleanNode('safe_links_only')->defaultFalse()->end()
- ->booleanNode('with_toc_data')->defaultFalse()->end()
- ->booleanNode('hard_wrap')->defaultFalse()->end()
- ->booleanNode('xhtml')->defaultFalse()->end()
- ->end()
- ->end()
- ->end()
- ->end()
->end()
->end();
diff --git a/Parser/SundownParser.php b/Parser/SundownParser.php
deleted file mode 100644
index 572bc7d..0000000
--- a/Parser/SundownParser.php
+++ /dev/null
@@ -1,30 +0,0 @@
-parser = $parser;
- }
-
- /**
- * {@inheritdoc}
- */
- public function transformMarkdown($text)
- {
- return $this->parser->render($text);
- }
-}
diff --git a/README.markdown b/README.markdown
index 715d6ad..398d3a7 100644
--- a/README.markdown
+++ b/README.markdown
@@ -2,6 +2,9 @@ Provide markdown conversion (based on [Michel Fortin work](https://github.com/mi
[![Build Status](https://secure.travis-ci.org/KnpLabs/KnpMarkdownBundle.svg)](http://travis-ci.org/KnpLabs/KnpMarkdownBundle)
+![ci.yml](https://github.com/tacman/KnpMarkdownBundle/actions/workflows/ci.yml/badge.svg)
+![php.yml](https://github.com/tacman/KnpMarkdownBundle/actions/workflows/php.yml/badge.svg)
+
## INSTALLATION
Add KnpMarkdownBundle to your project via [Composer](https://getcomposer.org/):
diff --git a/Resources/config/sundown.xml b/Resources/config/sundown.xml
deleted file mode 100644
index ea1f81d..0000000
--- a/Resources/config/sundown.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
That\'s some text with a footnote.assertContains(' And that\'s the footnote. assertStringContainsString(' That\'s some text with a footnote.assertStringContainsString('