mirror of
https://github.com/ramsey/uuid.git
synced 2026-06-25 17:45:35 +03:00
Allow iterable<T> where ramsey/collection would be used, deprecate collection classes
This patch is based on https://github.com/ramsey/uuid/pull/405 As discussed in https://github.com/ramsey/uuid/pull/405#discussion_r832095457, the `ramsey/collection` dependency can be phased out. Doing so via direct removal is not feasible without a clear BC break, so this change only deprecates: * `Ramsey\Uuid\Builder\BuilderCollection` * `Ramsey\Uuid\Provider\Node\NodeProviderCollection` These classes will then be removed in `5.0.0`, along with the `ramsey/collection` dependency.
This commit is contained in:
@@ -25,14 +25,14 @@ use Ramsey\Uuid\Type\Hexadecimal;
|
||||
class FallbackNodeProvider implements NodeProviderInterface
|
||||
{
|
||||
/**
|
||||
* @var NodeProviderCollection
|
||||
* @var iterable<NodeProviderInterface>
|
||||
*/
|
||||
private $nodeProviders;
|
||||
|
||||
/**
|
||||
* @param NodeProviderCollection $providers Array of node providers
|
||||
* @param iterable<NodeProviderInterface> $providers Array of node providers
|
||||
*/
|
||||
public function __construct(NodeProviderCollection $providers)
|
||||
public function __construct(iterable $providers)
|
||||
{
|
||||
$this->nodeProviders = $providers;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user