Skip to content

Commit

Permalink
Merge pull request #10 from PUGX/fix-depr
Browse files Browse the repository at this point in the history
fix deprecated
  • Loading branch information
garak authored Jun 7, 2024
2 parents 3d3c8e4 + 05a04f8 commit c83fb84
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class FooController extends AbstractController

```twig
{# this will display your form. Use '_pugx_filter_b4.html.twig' or '_pugx_filter_b5.html.twig' for Bootstrap 4 / 5 #}
{% include '_pugx_filter.html.twig' with {name: 'foo'} %}
{{ include('_pugx_filter.html.twig' with {name: 'foo'}) }}
{% for foo in foos %}
{# here you can display your list of filtered items, as long as you did your homework #}
Expand Down Expand Up @@ -108,7 +108,7 @@ Example of template:
{% from '_pugx_sort.html.twig' import sort -%}
{% block body %}
{% include '_pugx_filter.html.twig' with {name: 'foo'} %}
{{ include('_pugx_filter.html.twig' with {name: 'foo'}) }}
<table class="table">
<thead>
<tr>
Expand Down
5 changes: 1 addition & 4 deletions src/DependencyInjection/FilterExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,12 @@

use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Extension\Extension;
use Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface;
use Symfony\Component\DependencyInjection\Loader;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;

final class FilterExtension extends Extension implements PrependExtensionInterface
{
/**
* @param array<string, mixed> $configs
*/
public function load(array $configs, ContainerBuilder $container): void
{
$loader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__.'/../../config'));
Expand Down

0 comments on commit c83fb84

Please sign in to comment.