Skip to content

Commit c83fb84

Browse files
authored
Merge pull request #10 from PUGX/fix-depr
fix deprecated
2 parents 3d3c8e4 + 05a04f8 commit c83fb84

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class FooController extends AbstractController
6161

6262
```twig
6363
{# this will display your form. Use '_pugx_filter_b4.html.twig' or '_pugx_filter_b5.html.twig' for Bootstrap 4 / 5 #}
64-
{% include '_pugx_filter.html.twig' with {name: 'foo'} %}
64+
{{ include('_pugx_filter.html.twig' with {name: 'foo'}) }}
6565
6666
{% for foo in foos %}
6767
{# here you can display your list of filtered items, as long as you did your homework #}
@@ -108,7 +108,7 @@ Example of template:
108108
{% from '_pugx_sort.html.twig' import sort -%}
109109
110110
{% block body %}
111-
{% include '_pugx_filter.html.twig' with {name: 'foo'} %}
111+
{{ include('_pugx_filter.html.twig' with {name: 'foo'}) }}
112112
<table class="table">
113113
<thead>
114114
<tr>

src/DependencyInjection/FilterExtension.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,12 @@
44

55
use Symfony\Component\Config\FileLocator;
66
use Symfony\Component\DependencyInjection\ContainerBuilder;
7+
use Symfony\Component\DependencyInjection\Extension\Extension;
78
use Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface;
89
use Symfony\Component\DependencyInjection\Loader;
9-
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
1010

1111
final class FilterExtension extends Extension implements PrependExtensionInterface
1212
{
13-
/**
14-
* @param array<string, mixed> $configs
15-
*/
1613
public function load(array $configs, ContainerBuilder $container): void
1714
{
1815
$loader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__.'/../../config'));

0 commit comments

Comments
 (0)