Skip to content

Commit

Permalink
Drop support for Symfony unmaintained versions
Browse files Browse the repository at this point in the history
  • Loading branch information
franmomu committed Dec 2, 2019
1 parent 968975c commit 2b47339
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@
"phpunit/phpunit": "~6.5",
"pimple/pimple": "~1.1",
"plumphp/plum": "~0.1",
"symfony/config": "~2.4 || ~3.0 || ~4.0",
"symfony/dependency-injection": "~2.4 || ~3.0 || ~4.0",
"symfony/http-kernel": "~2.4 || ~3.0 || ~4.0",
"symfony/config": "^3.4 || ^4.3 || ^5.0",
"symfony/dependency-injection": "^3.4 || ^4.3 || ^5.0",
"symfony/http-kernel": "^3.4 || ^4.3 || ^5.0",
"twig/twig": "^1.38.1 || ^2.12.1 || ~3.0",
"zendframework/zend-modulemanager": "~2.2",
"zendframework/zend-servicemanager": "~2.2",
Expand Down
6 changes: 1 addition & 5 deletions src/Bridge/Symfony/CocurSlugifyExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,6 @@ public function load(array $configs, ContainerBuilder $container)
->addTag('twig.extension')
->setPublic(false);
$container->setAlias('slugify', 'cocur_slugify');

// for symfony versions >= 3.3
if (Kernel::VERSION_ID >= 30300) {
$container->setAlias('Cocur\Slugify\SlugifyInterface', 'cocur_slugify');
}
$container->setAlias('Cocur\Slugify\SlugifyInterface', 'cocur_slugify');
}
}
4 changes: 4 additions & 0 deletions tests/Bridge/Symfony/CocurSlugifyExtensionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ public function testLoad()
->shouldReceive('setAlias')
->with('slugify', 'cocur_slugify')
->once();
$container
->shouldReceive('setAlias')
->with('Cocur\Slugify\SlugifyInterface', 'cocur_slugify')
->once();

$this->extension->load([], $container);
}
Expand Down

0 comments on commit 2b47339

Please sign in to comment.