Skip to content

Commit dc4cf79

Browse files
committed
Enhanced the plugins handling
1 parent 178f799 commit dc4cf79

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "php-etl/sql-plugin",
33
"description": "This plugin allows you to perform SQL queries in the ETL pipelines",
4-
"type": "satellite-plugin",
4+
"type": "gyroscops-plugin",
55
"license": "MIT",
66
"authors": [
77
{
@@ -41,8 +41,8 @@
4141
"branch-alias": {
4242
"dev-master": "0.2.x-dev"
4343
},
44-
"satellite": {
45-
"class": "Kiboko\\Plugin\\SQL\\Service"
44+
"gyroscops": {
45+
"plugins": ["Kiboko\\Plugin\\SQL\\Service"]
4646
}
4747
},
4848
"config": {

composer.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Service.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
use Kiboko\Contract\Configurator;
66
use Kiboko\Plugin\SQL\Factory\Connection;
7-
use Symfony\Component\Config\Definition\ConfigurationInterface;
87
use Symfony\Component\Config\Definition\Processor;
98
use Symfony\Component\ExpressionLanguage\ExpressionLanguage;
109
use Symfony\Component\Config\Definition\Exception as Symfony;
@@ -20,10 +19,10 @@
2019
"loader" => "loader",
2120
],
2221
)]
23-
final class Service implements Configurator\FactoryInterface
22+
final class Service implements Configurator\PipelinePluginInterface
2423
{
2524
private Processor $processor;
26-
private ConfigurationInterface $configuration;
25+
private Configurator\PluginConfigurationInterface $configuration;
2726
private ExpressionLanguage $interpreter;
2827

2928
public function __construct(?ExpressionLanguage $interpreter = null)
@@ -33,7 +32,12 @@ public function __construct(?ExpressionLanguage $interpreter = null)
3332
$this->interpreter = $interpreter ?? new ExpressionLanguage();
3433
}
3534

36-
public function configuration(): ConfigurationInterface
35+
public function interpreter(): ExpressionLanguage
36+
{
37+
return $this->interpreter;
38+
}
39+
40+
public function configuration(): Configurator\PluginConfigurationInterface
3741
{
3842
return $this->configuration;
3943
}

0 commit comments

Comments
 (0)