Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions src/Symfony/Component/Cache/Traits/Relay/RelayCluster20Trait.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<?php

/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Symfony\Component\Cache\Traits\Relay;

if (version_compare(phpversion('relay'), '0.20.0', '>=')) {
/**
* @internal
*/
trait RelayCluster20Trait
{
public function _digest($value): string
{
return $this->initializeLazyObject()->_digest(...\func_get_args());
}

public function delex($key, $options = null): \Relay\Cluster|false|int
{
return $this->initializeLazyObject()->delex(...\func_get_args());
}

public function digest($key): \Relay\Cluster|false|null|string
{
return $this->initializeLazyObject()->digest(...\func_get_args());
}

public function wait($key_or_address, $replicas, $timeout): \Relay\Cluster|false|int
{
return $this->initializeLazyObject()->digest(...\func_get_args());
}
}
} else {
/**
* @internal
*/
trait RelayCluster20Trait

Check failure on line 44 in src/Symfony/Component/Cache/Traits/Relay/RelayCluster20Trait.php

View workflow job for this annotation

GitHub Actions / Psalm

DuplicateClass

src/Symfony/Component/Cache/Traits/Relay/RelayCluster20Trait.php:44:11: DuplicateClass: Class Symfony\Component\Cache\Traits\Relay\RelayCluster20Trait has already been defined in /home/runner/work/symfony/symfony/src/Symfony/Component/Cache/Traits/Relay/RelayCluster20Trait.php (see https://psalm.dev/071)

Check failure on line 44 in src/Symfony/Component/Cache/Traits/Relay/RelayCluster20Trait.php

View workflow job for this annotation

GitHub Actions / Psalm

DuplicateClass

src/Symfony/Component/Cache/Traits/Relay/RelayCluster20Trait.php:44:11: DuplicateClass: Class Symfony\Component\Cache\Traits\Relay\RelayCluster20Trait has already been defined in /home/runner/work/symfony/symfony/src/Symfony/Component/Cache/Traits/Relay/RelayCluster20Trait.php (see https://psalm.dev/071)
{
}
}
2 changes: 2 additions & 0 deletions src/Symfony/Component/Cache/Traits/RelayClusterProxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
use Symfony\Component\Cache\Traits\Relay\RelayCluster11Trait;
use Symfony\Component\Cache\Traits\Relay\RelayCluster121Trait;
use Symfony\Component\Cache\Traits\Relay\RelayCluster12Trait;
use Symfony\Component\Cache\Traits\Relay\RelayCluster20Trait;
use Symfony\Component\VarExporter\LazyObjectInterface;
use Symfony\Contracts\Service\ResetInterface;

Expand All @@ -35,6 +36,7 @@ class RelayClusterProxy extends Cluster implements ResetInterface, LazyObjectInt
use RelayCluster11Trait;
use RelayCluster121Trait;
use RelayCluster12Trait;
use RelayCluster20Trait;

public function __construct(
?string $name,
Expand Down
Loading