From 5ae722f2ef3307dfc370b296586a51f7cab79150 Mon Sep 17 00:00:00 2001 From: Goatform <8354705+Goatform@users.noreply.github.com> Date: Thu, 21 Sep 2023 10:55:50 +0200 Subject: [PATCH] Added test structure for this project --- composer.json | 2 +- config/goatform_api_tracker.yaml | 3 +++ src/ApiTrackerBundle.php | 38 ++++++++++++++++++++++++++++++++ 3 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 config/goatform_api_tracker.yaml create mode 100644 src/ApiTrackerBundle.php diff --git a/composer.json b/composer.json index 218c97b..c0b4509 100644 --- a/composer.json +++ b/composer.json @@ -24,7 +24,7 @@ "prefer-stable": true, "autoload": { "psr-4": { - "Goatform\\ApiTracker\\Bundle\\": "src/" + "Goatform\\ApiTrackerBundle\\": "src/" } } } diff --git a/config/goatform_api_tracker.yaml b/config/goatform_api_tracker.yaml new file mode 100644 index 0000000..00b971d --- /dev/null +++ b/config/goatform_api_tracker.yaml @@ -0,0 +1,3 @@ +# config/packages/goatform_api_tracker.yaml +parameters: + goatform_api_tracker.api_url: "https://api.publicapis.org/entries" diff --git a/src/ApiTrackerBundle.php b/src/ApiTrackerBundle.php new file mode 100644 index 0000000..7c9ce10 --- /dev/null +++ b/src/ApiTrackerBundle.php @@ -0,0 +1,38 @@ +import('../config/goatform_api_tracker.yaml'); + + $definition->rootNode() + ->children() + ->scalarNode('api_url')->end() + ->end(); + } + + public function loadExtension(array $config, ContainerConfigurator $container, ContainerBuilder $builder): void + { + $container->import('../config/goatform_api_tracker.yaml'); + } +} \ No newline at end of file