File tree Expand file tree Collapse file tree 3 files changed +16
-16
lines changed
Expand file tree Collapse file tree 3 files changed +16
-16
lines changed Original file line number Diff line number Diff line change 1+ services :
2+ metadrop.grumphp_php_compatibility :
3+ class : Metadrop\PhpCompatibilityTask\PhpCompatibilityTask
4+ arguments :
5+ - ' @process_builder'
6+ - ' @formatter.raw_process'
7+ tags :
8+ - { name: grumphp.task, task: php_compatibility }
Original file line number Diff line number Diff line change 1313 */
1414class ExtensionLoader implements ExtensionInterface
1515{
16+
1617 /**
17- * @param ContainerBuilder $container
18- *
19- * @return \Symfony\Component\DependencyInjection\Definition
20- * @throws \Exception
21- * @throws \Symfony\Component\DependencyInjection\Exception\BadMethodCallException
22- * @throws \Symfony\Component\DependencyInjection\Exception\InvalidArgumentException
23- * @throws \Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException
24- * @throws \Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException
18+ * {@inheritdoc}
2519 */
26- public function load (ContainerBuilder $ container ) : void
27- {
28- $ container ->register ('task.php_compatibility ' , PhpCompatibilityTask::class)
29- ->addArgument (new Reference ('process_builder ' ))
30- ->addArgument (new Reference ('formatter.raw_process ' ))
31- ->addTag ('grumphp.task ' , ['task ' => 'php_compatibility ' ]);
20+ public function imports (): iterable {
21+ yield dirname (__DIR__ ) . '/config/extension.yml ' ;
3222 }
23+
3324}
Original file line number Diff line number Diff line change 77use GrumPHP \Collection \ProcessArgumentsCollection ;
88use GrumPHP \Runner \TaskResult ;
99use GrumPHP \Runner \TaskResultInterface ;
10+ use GrumPHP \Task \Config \ConfigOptionsResolver ;
1011use GrumPHP \Task \Context \ContextInterface ;
1112use GrumPHP \Task \Context \GitPreCommitContext ;
1213use GrumPHP \Task \Context \RunContext ;
@@ -20,7 +21,7 @@ public function getName(): string
2021 return 'php_compatibility ' ;
2122 }
2223
23- public static function getConfigurableOptions (): OptionsResolver
24+ public static function getConfigurableOptions (): ConfigOptionsResolver
2425 {
2526 $ resolver = new OptionsResolver ();
2627 $ resolver ->setDefaults (
@@ -37,7 +38,7 @@ public static function getConfigurableOptions(): OptionsResolver
3738 $ resolver ->addAllowedTypes ('report_width ' , ['null ' , 'int ' ]);
3839 $ resolver ->addAllowedTypes ('ignore_patterns ' , ['array ' ]);
3940 $ resolver ->addAllowedTypes ('codebase_path ' , 'string ' );
40- return $ resolver ;
41+ return ConfigOptionsResolver:: fromOptionsResolver ( $ resolver) ;
4142 }
4243
4344 public function canRunInContext (ContextInterface $ context ): bool
You can’t perform that action at this time.
0 commit comments