Skip to content

Commit edccec5

Browse files
committed
Enhanced the plugins handling
1 parent d2d977d commit edccec5

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-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/fast-map-plugin",
33
"description": "Adapters for the Fast Map mapping library",
4-
"type": "satellite-plugin",
4+
"type": "gyroscops-plugin",
55
"license": "MIT",
66
"authors": [
77
{
@@ -46,8 +46,8 @@
4646
"branch-alias": {
4747
"dev-master": "0.6.x-dev"
4848
},
49-
"satellite": {
50-
"class": "Kiboko\\Plugin\\FastMap\\Service"
49+
"gyroscops": {
50+
"plugins": ["Kiboko\\Plugin\\FastMap\\Service"]
5151
}
5252
},
5353
"config": {

src/Service.php

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
use Kiboko\Plugin\FastMap\Factory;
77
use Kiboko\Contract\Configurator\InvalidConfigurationException;
88
use Kiboko\Contract\Configurator\ConfigurationExceptionInterface;
9-
use Kiboko\Contract\Configurator\FactoryInterface;
10-
use Symfony\Component\Config\Definition\ConfigurationInterface;
119
use Symfony\Component\Config\Definition\Exception as Symfony;
1210
use Symfony\Component\Config\Definition\Processor;
1311
use Symfony\Component\ExpressionLanguage\ExpressionLanguage;
@@ -23,10 +21,10 @@
2321
null => "transformer",
2422
],
2523
)]
26-
final class Service implements FactoryInterface
24+
final class Service implements Configurator\PipelinePluginInterface
2725
{
2826
private Processor $processor;
29-
private ConfigurationInterface $configuration;
27+
private Configurator\PluginConfigurationInterface $configuration;
3028
private ExpressionLanguage $interpreter;
3129

3230
public function __construct(
@@ -38,7 +36,12 @@ public function __construct(
3836
$this->interpreter = $interpreter ?? new ExpressionLanguage();
3937
}
4038

41-
public function configuration(): ConfigurationInterface
39+
public function interpreter(): ExpressionLanguage
40+
{
41+
return $this->interpreter;
42+
}
43+
44+
public function configuration(): Configurator\PluginConfigurationInterface
4245
{
4346
return $this->configuration;
4447
}

0 commit comments

Comments
 (0)