1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/** |
4
|
|
|
* This file is part of the sj-i/php-profiler package. |
5
|
|
|
* |
6
|
|
|
* (c) sji <[email protected]> |
7
|
|
|
* |
8
|
|
|
* For the full copyright and license information, please view the LICENSE |
9
|
|
|
* file that was distributed with this source code. |
10
|
|
|
*/ |
11
|
|
|
|
12
|
|
|
declare(strict_types=1); |
13
|
|
|
|
14
|
|
|
namespace PhpProfiler\Inspector\Daemon\Reader\Worker; |
15
|
|
|
|
16
|
|
|
use Amp\Parallel\Sync\Channel; |
|
|
|
|
17
|
|
|
use Amp\Promise; |
|
|
|
|
18
|
|
|
use PhpProfiler\Inspector\Daemon\Reader\Protocol\Message\AttachMessage; |
19
|
|
|
use PhpProfiler\Inspector\Daemon\Reader\Protocol\Message\DetachWorkerMessage; |
20
|
|
|
use PhpProfiler\Inspector\Daemon\Reader\Protocol\Message\SetSettingsMessage; |
21
|
|
|
use PhpProfiler\Inspector\Daemon\Reader\Protocol\Message\TraceMessage; |
22
|
|
|
use PhpProfiler\Inspector\Daemon\Reader\Protocol\PhpReaderWorkerProtocolInterface; |
23
|
|
|
|
24
|
|
|
final class PhpReaderWorkerProtocol implements PhpReaderWorkerProtocolInterface |
25
|
|
|
{ |
26
|
|
|
private Channel $channel; |
27
|
|
|
|
28
|
|
|
public function __construct(Channel $channel) |
29
|
|
|
{ |
30
|
|
|
$this->channel = $channel; |
31
|
|
|
} |
32
|
|
|
|
33
|
|
|
public static function createFromChannel(Channel $channel): self |
34
|
|
|
{ |
35
|
|
|
return new self($channel); |
36
|
|
|
} |
37
|
|
|
|
38
|
|
|
public function receiveSettings(): Promise |
39
|
|
|
{ |
40
|
|
|
/** @var Promise<SetSettingsMessage> */ |
41
|
|
|
return $this->channel->receive(); |
42
|
|
|
} |
43
|
|
|
|
44
|
|
|
public function receiveAttach(): Promise |
45
|
|
|
{ |
46
|
|
|
/** @var Promise<AttachMessage> */ |
47
|
|
|
return $this->channel->receive(); |
48
|
|
|
} |
49
|
|
|
|
50
|
|
|
public function sendTrace(TraceMessage $message): Promise |
51
|
|
|
{ |
52
|
|
|
return $this->channel->send($message); |
53
|
|
|
} |
54
|
|
|
|
55
|
|
|
public function sendDetachWorker(DetachWorkerMessage $message): Promise |
56
|
|
|
{ |
57
|
|
|
return $this->channel->send($message); |
58
|
|
|
} |
59
|
|
|
} |
60
|
|
|
|
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths