Skip to content

Commit

Permalink
Merge pull request #6 from msmakouz/remove-unused-packages
Browse files Browse the repository at this point in the history
Removing unused packages
  • Loading branch information
butschster authored Nov 10, 2023
2 parents 1486651 + 5893d4e commit db7d36f
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 31 deletions.
10 changes: 4 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,14 @@
"php": "^8.1",
"spiral/events": "^3.2",
"spiral/boot": "^3.2",
"spiral/console": "^3.2",
"spiral/telemetry": "^3.3",
"open-telemetry/sdk": "^0.0.17",
"php-http/guzzle7-adapter": "~1"
"open-telemetry/sdk": "^0.0.17"
},
"require-dev": {
"mockery/mockery": "^1.5",
"phpunit/phpunit": "^9.5",
"spiral/testing": "^2.0",
"vimeo/psalm": "^4.9"
"phpunit/phpunit": "^10.2",
"spiral/testing": "^2.3",
"vimeo/psalm": "^5.13"
},
"autoload": {
"psr-4": {
Expand Down
36 changes: 15 additions & 21 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,32 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
backupGlobals="false"
backupStaticAttributes="false"
bootstrap="vendor/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
executionOrder="random"
failOnWarning="true"
failOnRisky="true"
failOnEmptyTestSuite="true"
beStrictAboutOutputDuringTests="true"
verbose="true"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
bootstrap="vendor/autoload.php"
colors="true"
executionOrder="random"
failOnWarning="true"
failOnRisky="true"
failOnEmptyTestSuite="true"
beStrictAboutOutputDuringTests="true"
>
<testsuites>
<testsuite name="Scheduler Test Suite">
<testsuite name="OpenTelemetry Bridge">
<directory>tests</directory>
</testsuite>
</testsuites>
<coverage>
<include>
<directory suffix=".php">./src</directory>
</include>
<report>
<html outputDirectory="build/coverage"/>
<text outputFile="build/coverage.txt"/>
Expand All @@ -36,4 +25,9 @@
<logging>
<junit outputFile="build/report.junit.xml"/>
</logging>
<source>
<include>
<directory suffix=".php">./src</directory>
</include>
</source>
</phpunit>
2 changes: 2 additions & 0 deletions psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
findUnusedCode="false"
findUnusedBaselineEntry="true"
>
<projectFiles>
<directory name="src" />
Expand Down
7 changes: 3 additions & 4 deletions tests/src/Trace/DeferredSpanExporterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use OpenTelemetry\SDK\Common\Future\FutureInterface;
use OpenTelemetry\SDK\Trace\ExporterFactory;
use OpenTelemetry\SDK\Trace\SpanExporterInterface;
use PHPUnit\Framework\Attributes\DataProvider;
use Spiral\OpenTelemetry\Tests\TestCase;
use Spiral\OpenTelemetry\Trace\DeferredSpanExporter;
use Mockery as m;
Expand Down Expand Up @@ -56,9 +57,7 @@ public function testFromConnectionString(): void
$exporter::fromConnectionString('https://test.com', 'foo', 'bar');
}

/**
* @dataProvider provideData
*/
#[DataProvider('provideData')]
public function testOtherMethods(string $method, $cancellation): void
{
$exporter = new DeferredSpanExporter($factory = m::mock(ExporterFactory::class));
Expand All @@ -72,7 +71,7 @@ public function testOtherMethods(string $method, $cancellation): void
$this->assertSame(true, $cancellation ? $exporter->$method($cancellation) : $exporter->$method());
}

public function provideData(): array
public static function provideData(): array
{
return [
[
Expand Down

0 comments on commit db7d36f

Please sign in to comment.