Skip to content

Commit 4b0cd43

Browse files
authored
Preparing repo for package split + housekeeping (#39)
* Allow composer/package-versions-deprecated plugin * Add integration test suite * Update sdk-bundle to opentelemetry-php 0.0.5 * Add conflict configuration for open-telemetry/opentelemetry 0.0.5 to composer.json * Add composer.json and basic Readme for AWS package * Add PHP version to codecoverage report * Fix autoloading * Update composer.json
1 parent 3a3015a commit 4b0cd43

File tree

7 files changed

+64
-14
lines changed

7 files changed

+64
-14
lines changed

.github/workflows/php.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,11 @@ jobs:
6060
- name: Run Phpstan
6161
run: vendor/bin/phpstan analyse --error-format=github
6262

63-
- name: Run Unit Tests
64-
run: vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover
63+
- name: Run PHPUnit (unit tests)
64+
run: vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover --testsuite unit
6565

66-
- name: Run Integration tests
67-
run: vendor/bin/phpunit --coverage-text tests/Integration
66+
- name: Run PHPUnit (integration tests)
67+
run: vendor/bin/phpunit --testsuite integration
6868

6969
- name: Code Coverage
70-
run: bash <(curl -s https://codecov.io/bash)
70+
run: bash <(curl -s https://codecov.io/bash) -F ${{ matrix.php-version }}

Makefile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,13 @@ install:
66
$(DC_RUN_PHP) env XDEBUG_MODE=off composer install
77
update:
88
$(DC_RUN_PHP) env XDEBUG_MODE=off composer update
9-
test:
10-
$(DC_RUN_PHP) env XDEBUG_MODE=coverage vendor/bin/phpunit --colors=always --coverage-text --testdox --coverage-clover coverage.clover
9+
test: test-unit test-integration
10+
test-unit:
11+
$(DC_RUN_PHP) env XDEBUG_MODE=coverage vendor/bin/phpunit --testsuite unit --colors=always --coverage-text --testdox --coverage-clover coverage.clover --coverage-html=tests/coverage/html
12+
test-integration:
13+
$(DC_RUN_PHP) env XDEBUG_MODE=off vendor/bin/phpunit --testsuite integration --coverage-text --testdox --colors=always
1114
test-coverage:
12-
$(DC_RUN_PHP) env XDEBUG_MODE=coverage vendor/bin/phpunit --colors=always --testdox --coverage-html=tests/coverage/html
15+
$(DC_RUN_PHP) env XDEBUG_MODE=coverage vendor/bin/phpunit --testsuite unit --coverage-html=tests/coverage/html
1316
phan:
1417
$(DC_RUN_PHP) env XDEBUG_MODE=off env PHAN_DISABLE_XDEBUG_WARN=1 vendor/bin/phan
1518
psalm:

composer.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"open-telemetry/otel-sdk-bundle": "self.version"
2323
},
2424
"conflict": {
25-
"open-telemetry/opentelemetry": "<=0.0.3"
25+
"open-telemetry/opentelemetry": "<=0.0.3|0.0.5"
2626
},
2727
"autoload": {
2828
"psr-4": {
@@ -71,6 +71,9 @@
7171
]
7272
},
7373
"config": {
74-
"sort-packages": true
74+
"sort-packages": true,
75+
"allow-plugins": {
76+
"composer/package-versions-deprecated": true
77+
}
7578
}
7679
}

phpunit.xml.dist

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,12 @@
4040
</php>
4141

4242
<testsuites>
43-
<testsuite name="Unit Tests">
43+
<testsuite name="unit">
4444
<directory>tests/Unit</directory>
4545
</testsuite>
46+
<testsuite name="integration">
47+
<directory>tests/Integration</directory>
48+
</testsuite>
4649
</testsuites>
4750

4851
</phpunit>

src/Aws/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Readme for opentelemetry-php-contrib AWS package (temporary file)

src/Aws/composer.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"name": "open-telemetry/contrib-aws",
3+
"description": "The Aws package for opentelemetry-php",
4+
"keywords": ["opentelemetry", "otel", "aws", "tracing", "detector", "propagator"],
5+
"type": "library",
6+
"license": "Apache-2.0",
7+
"authors": [
8+
{
9+
"name": "opentelemetry-php-contrib contributors",
10+
"homepage": "https://github.com/open-telemetry/opentelemetry-php-contrib/graphs/contributors"
11+
}
12+
],
13+
"minimum-stability": "dev",
14+
"prefer-stable": true,
15+
"require": {
16+
"php": "^7.4 || ^8.0",
17+
"open-telemetry/opentelemetry": "^0.0.4"
18+
},
19+
"conflict": {
20+
"open-telemetry/opentelemetry": "<=0.0.3|0.0.5"
21+
},
22+
"autoload": {
23+
"psr-4": {
24+
"OpenTelemetry\\Aws\\": "."
25+
}
26+
},
27+
"config": {
28+
"sort-packages": true,
29+
"allow-plugins": {
30+
"composer/package-versions-deprecated": true
31+
}
32+
}
33+
}

src/Symfony/OtelSdkBundle/composer.json

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,20 @@
11
{
2-
"name": "open-telemetry/otel-sdk-bundle",
2+
"name": "open-telemetry/contrib-sdk-bundle",
33
"description": "Symfony bundle for easily integrating OpenTelemetry PHP SDk into symfony projects.",
4+
"keywords": ["opentelemetry", "otel", "symfony", "bundle", "tracing", "logging", "apm", "sdk"],
45
"type": "symfony-bundle",
56
"license": "Apache-2.0",
7+
"authors": [
8+
{
9+
"name": "opentelemetry-php-contrib contributors",
10+
"homepage": "https://github.com/open-telemetry/opentelemetry-php-contrib/graphs/contributors"
11+
}
12+
],
613
"minimum-stability": "dev",
714
"prefer-stable": true,
815
"require": {
916
"php": "^7.4 || ^8.0",
10-
"open-telemetry/opentelemetry": "dev-main",
17+
"open-telemetry/opentelemetry": "^0.0.5",
1118
"php-http/message": "^1.12",
1219
"php-http/discovery": "^1.14",
1320
"symfony/config": "^4.4|^5.3|^6.0",
@@ -20,7 +27,7 @@
2027
},
2128
"autoload": {
2229
"psr-4": {
23-
"OpenTelemetry\\Symfony\\OtelSdkBundle\\": "src/"
30+
"OpenTelemetry\\Symfony\\OtelSdkBundle\\": "."
2431
}
2532
},
2633
"scripts": {

0 commit comments

Comments
 (0)