-
-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace queue factory with queue providers (#222)
* Remove `@internal` from `QueueInterface` * queue provider * improve * `QueueProviderInterfaceProxy` * remove exceptions * config * Remove factory * fix tests * test `PrototypeQueueProvider` * test `FactoryQueueProvider` * test `CompositeQueueProvider` * Apply fixes from StyleCI * Improve `QueueFactoryQueueProvider` * Add `AdapterFactoryQueueProvider` * improve tests * Rename "channel-definitions" to "channels" * stubs phpdoc * phpdoc * Apply fixes from StyleCI * readme * fix cs * Update src/Command/ListenAllCommand.php Co-authored-by: Viktor Babanov <[email protected]> * Move `DEFAULT_CHANNEL_NAME` to `QueueInterface` * Apply fixes from StyleCI * Extract stubs to separate namespace * Fix `Queue` * fix exception * fix * Remove QueueFactoryQueueProvider * Fix docs * Fix config * Bugfixes * Apply fixes from StyleCI --------- Co-authored-by: StyleCI Bot <[email protected]> Co-authored-by: Viktor Babanov <[email protected]>
- Loading branch information
1 parent
af0fb00
commit 3dd8a7b
Showing
42 changed files
with
838 additions
and
654 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Yiisoft\Queue\Debug; | ||
|
||
use Yiisoft\Queue\Provider\QueueProviderInterface; | ||
use Yiisoft\Queue\QueueInterface; | ||
|
||
final class QueueProviderInterfaceProxy implements QueueProviderInterface | ||
{ | ||
public function __construct( | ||
private readonly QueueProviderInterface $queueProvider, | ||
private readonly QueueCollector $collector, | ||
) { | ||
} | ||
|
||
public function get(string $channel): QueueInterface | ||
{ | ||
$queue = $this->queueProvider->get($channel); | ||
return new QueueDecorator($queue, $this->collector); | ||
} | ||
|
||
public function has(string $channel): bool | ||
{ | ||
return $this->queueProvider->has($channel); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.