File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 7070 symfony : " ~8.0.0"
7171 - php-version : " 8.3"
7272 symfony : " ~8.0.0"
73- - php-version : " 8.4"
74- symfony : " ~8.0.0"
7573
7674 steps :
7775 - name : " Checkout"
@@ -120,8 +118,6 @@ jobs:
120118 symfony : " ~8.0.0"
121119 - php-version : " 8.3"
122120 symfony : " ~8.0.0"
123- - php-version : " 8.4"
124- symfony : " ~8.0.0"
125121
126122 steps :
127123 - name : " Checkout"
@@ -171,8 +167,6 @@ jobs:
171167 symfony : " ~8.0.0"
172168 - php-version : " 8.3"
173169 symfony : " ~8.0.0"
174- - php-version : " 8.4"
175- symfony : " ~8.0.0"
176170
177171 steps :
178172 - name : " Checkout"
@@ -229,7 +223,7 @@ jobs:
229223 run : " vendor/bin/phpunit --coverage-clover=.build/logs/clover.xml"
230224
231225 - name : " Send code coverage report to Codecov.io"
232- uses : " codecov/codecov-action@v5 "
226+ uses : " codecov/codecov-action@v6 "
233227 with :
234228 files : " .build/logs/clover.xml"
235229 token : " ${{ secrets.CODECOV_TOKEN }}"
Original file line number Diff line number Diff line change 1919 "twig/twig" : " ^3.5"
2020 },
2121 "require-dev" : {
22+ "ergebnis/composer-normalize" : " ^2.50" ,
23+ "infection/infection" : " ^0.29.14 || ^0.30.3 || ^0.31.9 || ^0.32.7" ,
24+ "jangregor/phpstan-prophecy" : " ^2.3" ,
2225 "matthiasnoback/symfony-config-test" : " ^4.3 || ^5.2 || ^6.2" ,
2326 "matthiasnoback/symfony-dependency-injection-test" : " ^4.3 || ^5.1 || ^6.3" ,
2427 "nyholm/symfony-bundle-test" : " ^2.0 || ^3.0" ,
28+ "phpspec/prophecy-phpunit" : " ^2.5" ,
29+ "phpstan/extension-installer" : " ^1.4.3" ,
30+ "phpstan/phpstan" : " ^2.1.46" ,
31+ "phpstan/phpstan-phpunit" : " ^2.0.16" ,
32+ "phpstan/phpstan-strict-rules" : " ^2.0.10" ,
2533 "phpstan/phpstan-symfony" : " ^2.0" ,
26- "setono/code-quality-pack" : " ^3.3"
34+ "phpstan/phpstan-webmozart-assert" : " ^2.0" ,
35+ "phpunit/phpunit" : " ^11.5.55" ,
36+ "rector/rector" : " ^2.4.1" ,
37+ "shipmonk/composer-dependency-analyser" : " ^1.8.4" ,
38+ "sylius-labs/coding-standard" : " ^4.5"
2739 },
2840 "prefer-stable" : true ,
2941 "autoload" : {
Original file line number Diff line number Diff line change 77use Symfony \Component \Config \FileLocator ;
88use Symfony \Component \DependencyInjection \ContainerBuilder ;
99use Symfony \Component \DependencyInjection \Extension \Extension ;
10- use Symfony \Component \DependencyInjection \Loader \XmlFileLoader ;
10+ use Symfony \Component \DependencyInjection \Loader \PhpFileLoader ;
1111
1212final class SetonoHtmlElementExtension extends Extension
1313{
1414 public function load (array $ configs , ContainerBuilder $ container ): void
1515 {
1616 /** @var array{elements: array<mixed>} $config */
1717 $ config = $ this ->processConfiguration ($ this ->getConfiguration ([], $ container ), $ configs );
18- $ loader = new XmlFileLoader ($ container , new FileLocator (__DIR__ . '/../Resources/config ' ));
18+ $ loader = new PhpFileLoader ($ container , new FileLocator (__DIR__ . '/../Resources/config ' ));
1919
2020 $ container ->setParameter ('setono_html_element.elements ' , $ config ['elements ' ]);
2121
22- $ loader ->load ('services.xml ' );
22+ $ loader ->load ('services.php ' );
2323 }
2424}
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ declare (strict_types=1 );
4+
5+ namespace Symfony \Component \DependencyInjection \Loader \Configurator ;
6+
7+ use Setono \HtmlElementBundle \Config \ElementCollection ;
8+ use Setono \HtmlElementBundle \Factory \HtmlElementFactory ;
9+ use Setono \HtmlElementBundle \Factory \HtmlElementFactoryInterface ;
10+ use Setono \HtmlElementBundle \Twig \Extension ;
11+ use Setono \HtmlElementBundle \Twig \Runtime ;
12+
13+ return static function (ContainerConfigurator $ container ): void {
14+ $ services = $ container ->services ();
15+
16+ $ services ->set ('setono_html_element.config.element_collection ' , ElementCollection::class)
17+ ->factory ([ElementCollection::class, 'fromArray ' ])
18+ ->args (['%setono_html_element.elements% ' ])
19+ ;
20+
21+ $ services ->set ('setono_html_element.factory.html_element ' , HtmlElementFactory::class)
22+ ->args ([service ('setono_html_element.config.element_collection ' )])
23+ ;
24+ $ services ->alias (HtmlElementFactoryInterface::class, 'setono_html_element.factory.html_element ' );
25+
26+ $ services ->set ('setono_html_element.twig.extension ' , Extension::class)
27+ ->tag ('twig.extension ' )
28+ ;
29+
30+ $ services ->set ('setono_html_element.twig.runtime ' , Runtime::class)
31+ ->args ([service ('setono_html_element.factory.html_element ' )])
32+ ->tag ('twig.runtime ' )
33+ ;
34+ };
Load diff This file was deleted.
You can’t perform that action at this time.
0 commit comments