Skip to content

Commit 3dd3c23

Browse files
authored
Merge pull request #12 from websupport-sk/updateOpenTracing
Updated open tracing to stable, updated phpunit
2 parents cd1753c + f27a94b commit 3dd3c23

File tree

6 files changed

+16
-12
lines changed

6 files changed

+16
-12
lines changed

.travis.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
language: php
22

33
php:
4-
- '7.0'
5-
- '7.1'
64
- '7.2'
75
- '7.3'
6+
- '7.4'
87

98
before_install:
109
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
@@ -17,7 +16,7 @@ before_script:
1716
- ./cc-test-reporter before-build
1817

1918
script:
20-
- ./vendor/bin/phpunit --coverage-clover clover.xml
19+
- XDEBUG_MODE=coverage ./vendor/bin/phpunit --coverage-clover clover.xml
2120

2221
after_script:
2322
- ./cc-test-reporter after-build --coverage-input-type clover --exit-code $TRAVIS_TEST_RESULT

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
],
1313
"license": "BSD-3-Clause",
1414
"require": {
15-
"php": ">=7.0",
16-
"opentracing/opentracing": "^1.0.0@dev",
15+
"php": ">=7.2",
16+
"opentracing/opentracing": "^1.0.0",
1717
"ralouphie/getallheaders": "^2.0 || ^3.0",
1818
"yiisoft/yii": "^1.1.18"
1919
},
@@ -22,7 +22,7 @@
2222
},
2323
"require-dev": {
2424
"jonahgeorge/jaeger-client-php": "dev-master",
25-
"phpunit/phpunit": "^6.5.14",
25+
"phpunit/phpunit": "^8.5.0",
2626
"roave/security-advisories": "dev-master"
2727
},
2828
"suggest": {

src/OpenTracing.php

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
namespace Websupport\OpenTracing;
44

5-
use OpenTracing\Exceptions\UnsupportedFormat;
65
use OpenTracing\Formats;
76
use OpenTracing\GlobalTracer;
87
use OpenTracing\NoopTracer;
98
use OpenTracing\Scope;
109
use OpenTracing\Span;
1110
use OpenTracing\Tracer;
11+
use OpenTracing\UnsupportedFormatException;
1212
use Yii;
1313

1414
class OpenTracing extends \CApplicationComponent
@@ -48,7 +48,7 @@ public function init()
4848
*/
4949
protected function initTracer()
5050
{
51-
$this->setTracer(NoopTracer::create());
51+
$this->setTracer(new NoopTracer());
5252
}
5353

5454
/**
@@ -72,6 +72,7 @@ public function getTracer()
7272

7373
/**
7474
* @param Tracer $tracer
75+
*
7576
* @return $this
7677
*/
7778
public function setTracer(Tracer $tracer)
@@ -85,6 +86,7 @@ public function setTracer(Tracer $tracer)
8586
/**
8687
* @param string $operationName
8788
* @param array $options
89+
*
8890
* @return Scope
8991
*/
9092
public function startActiveSpan(string $operationName, array $options = [])
@@ -99,7 +101,8 @@ public function startActiveSpan(string $operationName, array $options = [])
99101
/**
100102
* @param string $format
101103
* @param mixed $carrier
102-
* @throws UnsupportedFormat
104+
*
105+
* @throws UnsupportedFormatException
103106
*/
104107
public function injectActiveSpan(string $format, &$carrier)
105108
{
@@ -196,6 +199,7 @@ private function setSentryTag(Span $span)
196199

197200
/**
198201
* @param \CEvent $event
202+
*
199203
* @return string
200204
*/
201205
private function operationNameFromBeginRequestEvent(\CEvent $event)
@@ -216,6 +220,7 @@ private function operationNameFromBeginRequestEvent(\CEvent $event)
216220

217221
/**
218222
* @param \CEvent $event
223+
*
219224
* @return array
220225
*/
221226
private function spanOptionsFromBeginRequestEvent(\CEvent $event)

tests/ActiveRecordBehaviorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public function testTraceDelete()
7474
$activeRecord->delete();
7575
}
7676

77-
protected function setUp()
77+
protected function setUp(): void
7878
{
7979
parent::setUp();
8080

tests/Support/TestCase/DatabaseIntegrationTestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
abstract class DatabaseIntegrationTestCase extends TestCase
88
{
9-
protected function setUp()
9+
protected function setUp():void
1010
{
1111
parent::setUp();
1212

tests/Support/TestCase/TestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
abstract class TestCase extends \PHPUnit\Framework\TestCase
88
{
9-
protected function tearDown()
9+
protected function tearDown(): void
1010
{
1111
$this->destroyApplication();
1212

0 commit comments

Comments
 (0)