25
25
use Enqueue \Rpc \Promise ;
26
26
use Enqueue \Rpc \RpcFactory ;
27
27
use Enqueue \Symfony \DependencyInjection \TransportFactory ;
28
- use Interop \Queue \PsrProcessor ;
28
+ use Interop \Queue \Processor ;
29
29
use Symfony \Component \Config \Definition \Builder \TreeBuilder ;
30
30
use Symfony \Component \Config \Definition \NodeInterface ;
31
- use Symfony \Component \Config \Definition \Processor ;
31
+ use Symfony \Component \Config \Definition \Processor as ConfigProcessor ;
32
32
33
33
final class SimpleClient
34
34
{
@@ -110,16 +110,16 @@ public function __construct($config)
110
110
}
111
111
112
112
/**
113
- * @param callable|PsrProcessor $processor
113
+ * @param callable|Processor $processor
114
114
*/
115
115
public function bindTopic (string $ topic , $ processor , string $ processorName = null ): void
116
116
{
117
117
if (is_callable ($ processor )) {
118
118
$ processor = new CallbackProcessor ($ processor );
119
119
}
120
120
121
- if (false == $ processor instanceof PsrProcessor ) {
122
- throw new \LogicException ('The processor must be either callable or instance of PsrProcessor ' );
121
+ if (false == $ processor instanceof Processor ) {
122
+ throw new \LogicException ('The processor must be either callable or instance of Processor ' );
123
123
}
124
124
125
125
$ processorName = $ processorName ?: uniqid (get_class ($ processor ));
@@ -129,16 +129,16 @@ public function bindTopic(string $topic, $processor, string $processorName = nul
129
129
}
130
130
131
131
/**
132
- * @param callable|PsrProcessor $processor
132
+ * @param callable|Processor $processor
133
133
*/
134
134
public function bindCommand (string $ command , $ processor , string $ processorName = null ): void
135
135
{
136
136
if (is_callable ($ processor )) {
137
137
$ processor = new CallbackProcessor ($ processor );
138
138
}
139
139
140
- if (false == $ processor instanceof PsrProcessor ) {
141
- throw new \LogicException ('The processor must be either callable or instance of PsrProcessor ' );
140
+ if (false == $ processor instanceof Processor ) {
141
+ throw new \LogicException ('The processor must be either callable or instance of Processor ' );
142
142
}
143
143
144
144
$ processorName = $ processorName ?: uniqid (get_class ($ processor ));
@@ -211,7 +211,7 @@ public function setupBroker(): void
211
211
212
212
public function build (array $ configs ): void
213
213
{
214
- $ configProcessor = new Processor ();
214
+ $ configProcessor = new ConfigProcessor ();
215
215
$ simpleClientConfig = $ configProcessor ->process ($ this ->createConfiguration (), $ configs );
216
216
217
217
if (isset ($ simpleClientConfig ['transport ' ]['factory_service ' ])) {
0 commit comments