File tree Expand file tree Collapse file tree 3 files changed +23
-21
lines changed
Expand file tree Collapse file tree 3 files changed +23
-21
lines changed Original file line number Diff line number Diff line change 55use Symfony \Component \Config \FileLocator ;
66use Symfony \Component \DependencyInjection \ContainerBuilder ;
77use Symfony \Component \DependencyInjection \Extension \Extension ;
8- use Symfony \Component \DependencyInjection \Loader \XmlFileLoader ;
8+ use Symfony \Component \DependencyInjection \Loader \PhpFileLoader ;
99
1010class WebfactoryPiwikExtension extends Extension
1111{
1212 public function load (array $ configs , ContainerBuilder $ container ): void
1313 {
1414 $ locator = new FileLocator (__DIR__ .'/../Resources/config ' );
15- $ loader = new XmlFileLoader ($ container , $ locator );
16- $ loader ->load ('services.xml ' );
15+ $ loader = new PhpFileLoader ($ container , $ locator );
16+ $ loader ->load ('services.php ' );
1717
1818 $ configuration = new Configuration ();
1919 $ config = $ this ->processConfiguration ($ configuration , $ configs );
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace Symfony \Component \DependencyInjection \Loader \Configurator ;
4+
5+ return static function (ContainerConfigurator $ container ) {
6+ $ services = $ container ->services ();
7+ $ parameters = $ container ->parameters ();
8+
9+ $ services ->set (\Webfactory \Bundle \PiwikBundle \Twig \Extension::class)
10+ ->public ()
11+ ->args ([
12+ '%webfactory_piwik.disabled% ' ,
13+ '%webfactory_piwik.site_id% ' ,
14+ '%webfactory_piwik.piwik_host% ' ,
15+ '%webfactory_piwik.tracker_path% ' ,
16+ '%webfactory_piwik.disable_cookies% ' ,
17+ '%webfactory_piwik.enable_do_not_track% ' ,
18+ ])
19+ ->tag ('twig.extension ' );
20+ };
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments