Simplified how the custom slugs are processed, allowing more characters in the process

This commit is contained in:
Alejandro Celaya
2022-01-09 21:02:23 +01:00
parent d2fef20239
commit e47c90c645
5 changed files with 18 additions and 33 deletions

View File

@@ -1,22 +0,0 @@
<?php
declare(strict_types=1);
namespace Shlinkio\Shlink\Core\Util;
use Cocur\Slugify\SlugifyInterface;
use Symfony\Component\String\AbstractUnicodeString;
use Symfony\Component\String\Slugger\SluggerInterface;
use Symfony\Component\String\UnicodeString;
class CocurSymfonySluggerBridge implements SluggerInterface
{
public function __construct(private SlugifyInterface $slugger)
{
}
public function slug(string $string, string $separator = '-', ?string $locale = null): AbstractUnicodeString
{
return new UnicodeString($this->slugger->slugify($string, $separator));
}
}