carno-php /
hrpcc
| 1 | <?php |
||
| 2 | /** |
||
| 3 | * Tracing injector |
||
| 4 | * User: moyo |
||
| 5 | * Date: 2018/9/5 |
||
| 6 | * Time: 5:00 PM |
||
| 7 | */ |
||
| 8 | |||
| 9 | namespace Carno\HRPC\Client\Components; |
||
| 10 | |||
| 11 | use Carno\Console\Component; |
||
| 12 | use Carno\Console\Contracts\Application; |
||
| 13 | use Carno\Console\Contracts\Bootable; |
||
| 14 | use Carno\Container\DI; |
||
| 15 | use Carno\HRPC\Client\Handlers\TracedRequesting; |
||
| 16 | use Carno\HRPC\Client\Selector; |
||
| 17 | use Carno\RPC\Client; |
||
| 18 | use Carno\Traced\Contracts\Observer; |
||
|
0 ignored issues
–
show
|
|||
| 19 | |||
| 20 | class Tracing extends Component implements Bootable |
||
| 21 | { |
||
| 22 | /** |
||
| 23 | * @var int |
||
| 24 | */ |
||
| 25 | protected $priority = 51; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @var array |
||
| 29 | */ |
||
| 30 | protected $dependencies = [Observer::class]; |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @param Application $app |
||
| 34 | */ |
||
| 35 | public function starting(Application $app) : void |
||
| 36 | { |
||
| 37 | /** |
||
| 38 | * @var Observer $platform |
||
| 39 | */ |
||
| 40 | |||
| 41 | $platform = DI::get(Observer::class); |
||
| 42 | |||
| 43 | $platform->transportable(static function () { |
||
| 44 | Client::layers()->has(TracedRequesting::class) |
||
| 45 | || Client::layers()->append(Selector::class, DI::object(TracedRequesting::class)); |
||
| 46 | }, static function () { |
||
| 47 | Client::layers()->remove(TracedRequesting::class); |
||
| 48 | }); |
||
| 49 | } |
||
| 50 | } |
||
| 51 |
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