Dont make new version if content didnt change

This commit is contained in:
Tim
2023-12-24 01:06:30 +01:00
parent 6f64f29177
commit b2bc519e26
4 changed files with 14 additions and 11 deletions

View File

@ -4,12 +4,12 @@ namespace App\Service\SnipParser\Stages;
use League\Pipeline\StageInterface;
class ReplaceStage implements StageInterface
readonly class ReplaceStage implements StageInterface
{
// replaces a string with another string
public function __construct(
public readonly string $search,
public readonly string $replace,
public string $search,
public string $replace,
) {}
public function __invoke(mixed $payload): string

View File

@ -9,12 +9,12 @@ use Symfony\Bundle\SecurityBundle\Security;
use Symfony\Component\DependencyInjection\Attribute\Autowire;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
class UrlReferenceStage implements StageInterface
readonly class UrlReferenceStage implements StageInterface
{
public function __construct(
#[Autowire(lazy: true)] private readonly UrlGeneratorInterface $router,
#[Autowire(lazy: true)] private readonly Security $security,
#[Autowire(lazy: true)] private readonly SnipRepository $snipRepository,
#[Autowire(lazy: true)] private UrlGeneratorInterface $router,
#[Autowire(lazy: true)] private Security $security,
#[Autowire(lazy: true)] private SnipRepository $snipRepository,
) {}
public function __invoke(mixed $payload): string