Skip to content

Commit fbfebde

Browse files
authored
Merge branch '3.0.x' into latest-thrift
2 parents c09414c + 6128d16 commit fbfebde

File tree

4 files changed

+30
-7
lines changed

4 files changed

+30
-7
lines changed

README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,23 @@
1-
21
# PHP OpenTracing API using Jaeger
32

4-
53
## Installation
64

7-
```
5+
```bash
86
composer require code-tool/jaeger-client-php
97
```
108

119
## Getting Started
1210

13-
It is strictly advised to use any form of DI container (e.g. [Symfony](https://github.com/code-tool/jaeger-client-symfony-bridge)).
14-
```$xslt
11+
It is strictly advised to use any form of DI container (e.g. [Symfony Bundle](https://github.com/code-tool/jaeger-client-symfony-bridge)).
12+
13+
```php
1514
<?php
1615

16+
use Jaeger\Tag\StringTag;
17+
use Jaeger\Tracer\TracerInterface;
18+
19+
/** @var TracerInterface $tracer */
20+
1721
$span = $tracer->start('Parent Operation Name', [new StringTag('test.tag', 'Hello world in parent')]);
1822
$childSpan = $tracer->start('Child Operation Name', [new StringTag('test.tag', 'Hello world in child')]);
1923
$tracer->finish($childSpan);

composer.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99
"require": {
1010
"php": ">=7.1",
1111
"ext-sockets": "*",
12-
"apache/thrift": ">=0.11, <0.16",
13-
"psr/log": "^1.0.2"
12+
"apache/thrift": ">=0.11, <0.16"
1413
},
1514
"require-dev": {
1615
"phpunit/phpunit": "@stable"

src/Codec/CodecRegistry.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,19 @@ class CodecRegistry implements \ArrayAccess
77
{
88
private $codecs = [];
99

10+
/**
11+
* @return bool
12+
*/
13+
#[\ReturnTypeWillChange]
1014
public function offsetExists($offset)
1115
{
1216
return array_key_exists($offset, $this->codecs);
1317
}
1418

19+
/**
20+
* @return mixed
21+
*/
22+
#[\ReturnTypeWillChange]
1523
public function offsetGet($offset)
1624
{
1725
if (false === array_key_exists($offset, $this->codecs)) {
@@ -21,13 +29,21 @@ public function offsetGet($offset)
2129
return $this->codecs[$offset];
2230
}
2331

32+
/**
33+
* @return $this
34+
*/
35+
#[\ReturnTypeWillChange]
2436
public function offsetSet($offset, $value)
2537
{
2638
$this->codecs[$offset] = $value;
2739

2840
return $this;
2941
}
3042

43+
/**
44+
* @return $this
45+
*/
46+
#[\ReturnTypeWillChange]
3147
public function offsetUnset($offset)
3248
{
3349
if (false === array_key_exists($offset, $this->codecs)) {

src/Span/Context/SpanContext.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ public function getBaggage(): array
6464
return $this->baggage;
6565
}
6666

67+
/**
68+
* @return \Traversable
69+
*/
70+
#[\ReturnTypeWillChange]
6771
public function getIterator()
6872
{
6973
return new \ArrayIterator($this->baggage);

0 commit comments

Comments
 (0)