Skip to content
This repository has been archived by the owner on Oct 6, 2021. It is now read-only.

Commit

Permalink
Symfony BC (#44)
Browse files Browse the repository at this point in the history
* Add BC to DI Configuration

* Change 'spaceless' to 'apply spaceless' for future versions of Twig

* Manual space removing suggestion
  • Loading branch information
kyrylich authored Mar 16, 2020
1 parent d3d5b0c commit 199136c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
10 changes: 8 additions & 2 deletions src/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,14 @@ class Configuration implements ConfigurationInterface
*/
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('m6web_cassandra');
$treeBuilder = new TreeBuilder('m6web_cassandra');

if (method_exists($treeBuilder, 'getRootNode')) {
$rootNode = $treeBuilder->getRootNode();
} else {
// BC layer for symfony/config 4.1 and older
$rootNode = $treeBuilder->root('m6web_cassandra');
}

$rootNode
->children()
Expand Down
4 changes: 1 addition & 3 deletions src/Resources/views/Collector/cassandra.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@

{% block menu %}
<span class="label">
<span class="icon">{% spaceless %}
<img alt="Cassandra" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAACAElEQVRIie3VS4hOYRzH8c+8YkjGYDAbFpoZJJcJC6XYzM6lLCTZka2NsnBJKZKQS1IWKErJwqWk3FbCwmVBCSmSxkKjRCSvxfmfnDnzvued90WzmV+dnvP8L8/36f+c/3MY1hBpLDbhBM5gNxb/D9BmvMIVrENHwFswDz1Yhgl/C2rHGzzCxEHEd2JaZj45Ny/UDJRxso4NZkHwMNaoqeYIvNAADGbGeC8DHKOgSrfxsoK9hEO4LynzNSzJxfQE5B364v1ZjOcqweaHc1XOvhw/wvcWz+O9jFOZuDZswd2M/wX2Ym4l4OPYWVatkfgJ3Tnf+fBtz9n3hP0XnlQCQVPAjubsaUlaquRdD39rzNOy3sB6A6vQT2VsyG3iK/ZVS8BozMbImI/CQcmZwwFVPpgpBp7fiLCtLgAWqVTkbI/F12RsTWFb2yBwXJEzXXxrztaHiwV5XXgdY17TawE/407Ofik2srJKXtpvzRV8Ne/XtL/yge/xE6clZ12SlPlDxOfbheT8x9cCLo0Fzubsk3DLn2ZOny8GXhKpttWCpXoQi1W6GbqwA/v1/7jyWihpj0GpLYDfVG/2InVIrrK6tCig37GgjrwVOF4vLFWn5IzKuIk5BbHdeIqNjcKy2oneAH+U9ORhHJH8onpxGVP/BSyrWdgl6curOCYp4bCGXr8BrHF1XeEAlBEAAAAASUVORK5CYII=" />
{% endspaceless %}</span>
<span class="icon"><img alt="Cassandra" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAACAElEQVRIie3VS4hOYRzH8c+8YkjGYDAbFpoZJJcJC6XYzM6lLCTZka2NsnBJKZKQS1IWKErJwqWk3FbCwmVBCSmSxkKjRCSvxfmfnDnzvued90WzmV+dnvP8L8/36f+c/3MY1hBpLDbhBM5gNxb/D9BmvMIVrENHwFswDz1Yhgl/C2rHGzzCxEHEd2JaZj45Ny/UDJRxso4NZkHwMNaoqeYIvNAADGbGeC8DHKOgSrfxsoK9hEO4LynzNSzJxfQE5B364v1ZjOcqweaHc1XOvhw/wvcWz+O9jFOZuDZswd2M/wX2Ym4l4OPYWVatkfgJ3Tnf+fBtz9n3hP0XnlQCQVPAjubsaUlaquRdD39rzNOy3sB6A6vQT2VsyG3iK/ZVS8BozMbImI/CQcmZwwFVPpgpBp7fiLCtLgAWqVTkbI/F12RsTWFb2yBwXJEzXXxrztaHiwV5XXgdY17TawE/407Ofik2srJKXtpvzRV8Ne/XtL/yge/xE6clZ12SlPlDxOfbheT8x9cCLo0Fzubsk3DLn2ZOny8GXhKpttWCpXoQi1W6GbqwA/v1/7jyWihpj0GpLYDfVG/2InVIrrK6tCig37GgjrwVOF4vLFWn5IzKuIk5BbHdeIqNjcKy2oneAH+U9ORhHJH8onpxGVP/BSyrWdgl6curOCYp4bCGXr8BrHF1XeEAlBEAAAAASUVORK5CYII="/></span>
<strong>Cassandra</strong>
<span class="count">
<span>{{ collector.commands|length }}</span>
Expand Down

0 comments on commit 199136c

Please sign in to comment.