55use Symfony \Component \Config \FileLocator ;
66use Symfony \Component \DependencyInjection \ContainerBuilder ;
77use Symfony \Component \DependencyInjection \Definition ;
8- use Symfony \Component \DependencyInjection \Extension \ExtensionInterface ;
9- use Symfony \Component \DependencyInjection \Loader \XmlFileLoader ;
8+ use Symfony \Component \DependencyInjection \Extension \Extension ;
9+ use Symfony \Component \DependencyInjection \Loader \PhpFileLoader ;
1010use Symfony \Component \DependencyInjection \Reference ;
1111
12- class MatthiasDependencyInjectionTestExtension implements ExtensionInterface
12+ class MatthiasDependencyInjectionTestExtension extends Extension
1313{
14- public function load (array $ config , ContainerBuilder $ container ): void
14+ public function load (array $ configs , ContainerBuilder $ container ): void
1515 {
1616 // load some service definitions
17- $ loader = new XmlFileLoader ($ container , new FileLocator (__DIR__ ));
18- $ loader ->load ('services.xml ' );
17+ $ loader = new PhpFileLoader ($ container , new FileLocator (__DIR__ ));
18+ $ loader ->load ('services.php ' );
1919
2020 // set a parameter manually
2121 $ container ->setParameter ('manual_parameter ' , 'parameter value ' );
@@ -41,16 +41,8 @@ public function load(array $config, ContainerBuilder $container): void
4141 $ container ->setDefinition ('manual_with_reference ' , $ definition );
4242 }
4343
44- public function getAlias ()
44+ public function getAlias (): string
4545 {
4646 return 'matthias_dependency_injection_test ' ;
4747 }
48-
49- public function getNamespace (): void
50- {
51- }
52-
53- public function getXsdValidationBasePath (): void
54- {
55- }
5648}
0 commit comments