Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: PHP QA

on:
push:
branches: [ main ]
branches: [ main, 1.x, 2.x ]
pull_request:
branches: [ main ]
branches: [ main, 1.x, 2.x ]

jobs:
php:
Expand All @@ -13,7 +13,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php-version: ['8.1', '8.2', '8.3']
php-version: ['8.2', '8.3']
experimental: [false]
composer_args: [""]
include:
Expand Down Expand Up @@ -154,5 +154,5 @@ jobs:
needs: php
with:
matrix_extension: '["ast, json, grpc"]'
matrix_php_version: '["8.1", "8.2", "8.3"]'
matrix_php_version: '["8.2", "8.3", "8.4"]'
install_directory: '~/.test/.packages'
4 changes: 2 additions & 2 deletions .github/workflows/shellcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Shellcheck

on:
push:
branches: [ main ]
branches: [ main, 1.x, 2.x ]
pull_request:
branches: [ main ]
branches: [ main, 1.x, 2.x ]

jobs:
shellcheck:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/split-monorepo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ on:
branches:
- main
- split
release:
types: [published]
- 1.x
- 2.x
create:
workflow_dispatch:

Expand Down
1 change: 1 addition & 0 deletions .gitsplit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,4 @@ splits:
origins:
- ^main$
- ^split$
- ^2.x^
6 changes: 3 additions & 3 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,12 @@ This does the following things:
### Other PHP versions

We aim to support officially supported PHP versions, according to https://www.php.net/supported-versions.php. The
developer image `ghcr.io/open-telemetry/opentelemetry-php/opentelemetry-php-base` is tagged as `8.1`, `8.2` and `8.3`
respectively, with `8.1` being the default. You can execute the test suite against other PHP versions by running the
developer image `ghcr.io/open-telemetry/opentelemetry-php/opentelemetry-php-base` is tagged as `8.2`, `8.3` and `8.4`
respectively, with `8.2` being the default. You can execute the test suite against other PHP versions by running the
following command:

```bash
PHP_VERSION=8.1 make all
PHP_VERSION=8.2 make all
#or
PHP_VERSION=8.3 make all
```
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
include .env

PHP_VERSION ?= 8.1
PHP_VERSION ?= 8.2
DOCKER_COMPOSE ?= docker compose
DC_RUN_PHP = $(DOCKER_COMPOSE) run --rm php

Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@
"phpstan/phpstan": "^1.10.13",
"phpstan/phpstan-mockery": "^1.1",
"phpstan/phpstan-phpunit": "^1.3",
"phpunit/phpunit": "^10 || ^11",
"sebastian/exporter": "<= 6.0.1 || >= 6.1.3",
"phpunit/phpunit": "^11",
"sebastian/exporter": "^6.3",
"symfony/http-client": "^5.2",
"symfony/var-exporter": "^5.4 || ^6.4 || ^7.0",
"symfony/yaml": "^5.4 || ^6.4 || ^7.0"
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
php:
image: ghcr.io/open-telemetry/opentelemetry-php/opentelemetry-php-base:${PHP_VERSION:-8.1}
image: ghcr.io/open-telemetry/opentelemetry-php/opentelemetry-php-base:${PHP_VERSION:-8.2}
volumes:
- ./:/usr/src/myapp
user: "${PHP_USER}:root"
Expand Down
16 changes: 4 additions & 12 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,42 +2,34 @@

declare(strict_types=1);

use Rector\CodeQuality\Rector\Array_\CallableThisArrayToAnonymousFunctionRector;
use Rector\CodeQuality\Rector\ClassMethod\LocallyCalledStaticMethodToNonStaticRector;
use Rector\CodeQuality\Rector\Identical\FlipTypeControlToUseExclusiveTypeRector;
use Rector\CodeQuality\Rector\If_\ExplicitBoolCompareRector;
use Rector\Config\RectorConfig;
use Rector\Php81\Rector\ClassMethod\NewInInitializerRector;
use Rector\Php81\Rector\Property\ReadOnlyPropertyRector;
use Rector\Php82\Rector\Class_\ReadOnlyClassRector;
use Rector\PHPUnit\Set\PHPUnitSetList;
use Rector\Strict\Rector\Empty_\DisallowedEmptyRuleFixerRector;
use Rector\ValueObject\PhpVersion;
use Rector\Set\ValueObject\SetList;

return static function (RectorConfig $rectorConfig): void {
$rectorConfig->phpVersion(PhpVersion::PHP_81);
$rectorConfig->phpVersion(PhpVersion::PHP_82);

$rectorConfig->paths([
__DIR__ . '/src',
__DIR__ . '/tests',
]);

$rectorConfig->sets([
SetList::PHP_81,
SetList::PHP_82,
SetList::CODE_QUALITY,
PHPUnitSetList::PHPUNIT_100,
]);
$rectorConfig->skip([
FlipTypeControlToUseExclusiveTypeRector::class,
NewInInitializerRector::class => [
__DIR__ . '/src/SDK/Trace/Sampler/ParentBased.php',
],
ReadOnlyPropertyRector::class => [
__DIR__ . '/src/SDK/Metrics/Stream/SynchronousMetricStream.php',
__DIR__ . '/tests/Unit/Extension/Propagator',
],
DisallowedEmptyRuleFixerRector::class,
ExplicitBoolCompareRector::class,
LocallyCalledStaticMethodToNonStaticRector::class,
ReadOnlyClassRector::class,
]);
};
8 changes: 4 additions & 4 deletions src/API/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,9 @@
}
],
"require": {
"php": "^8.1",
"php": "^8.2",
"open-telemetry/context": "^1.0",
"psr/log": "^1.1|^2.0|^3.0",
"symfony/polyfill-php82": "^1.26"
"psr/log": "^1.1|^2.0|^3.0"
},
"conflict": {
"open-telemetry/sdk": "<=1.0.8"
Expand All @@ -35,7 +34,8 @@
},
"extra": {
"branch-alias": {
"dev-main": "1.1.x-dev"
"dev-main": "1.1.x-dev",
"dev-2.x": "2.x-dev"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should consider keeping the API and Context packages on 1.x; bumping these packages to a new major version requires updating every instrumentation package which might slow down adoption of an SDK 2.x release.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's reasonable. They will still exist in the 2.x branch (as will proto, semconv), but we can avoid releasing a new version until we do make a breaking change. I think the most likely trigger for this would be removing the registry in favour of SPI (and possibly removing globals initializers at the same time).

},
"spi": {
"OpenTelemetry\\API\\Instrumentation\\AutoInstrumentation\\HookManagerInterface": [
Expand Down
7 changes: 4 additions & 3 deletions src/Config/SDK/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
}
],
"require": {
"php": "^8.1",
"php": "^8.2",
"open-telemetry/context": "^1.0",
"open-telemetry/sdk": "^1.0",
"symfony/config": "^5.4 || ^6.4 || ^7.0",
"symfony/config": "^6.4 || ^7.0",
"tbachert/spi": "^1.0.1"
},
"autoload": {
Expand All @@ -35,7 +35,8 @@
},
"extra": {
"branch-alias": {
"dev-main": "0.1.x-dev"
"dev-main": "0.1.x-dev",
"dev-2.x": "2.x-dev"
},
"spi": {
"OpenTelemetry\\Config\\SDK\\Configuration\\ComponentProvider": [
Expand Down
5 changes: 2 additions & 3 deletions src/Context/ZendObserverFiber.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
use const FILTER_VALIDATE_BOOLEAN;
use function filter_var;
use function is_string;
use const PHP_VERSION_ID;
use const PHP_ZTS;
use function sprintf;
use function trigger_error;
Expand All @@ -40,8 +39,8 @@ public static function init(): bool
return true;
}

if (PHP_ZTS || PHP_VERSION_ID < 80100 || !extension_loaded('ffi')) {
trigger_error('Context: Fiber context switching not supported, requires PHP >= 8.1, an NTS build, and the FFI extension');
if (PHP_ZTS || !extension_loaded('ffi')) {
trigger_error('Context: Fiber context switching not supported, requires an NTS build, and the FFI extension');

return false;
}
Expand Down
6 changes: 3 additions & 3 deletions src/Context/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
}
],
"require": {
"php": "^8.1",
"symfony/polyfill-php82": "^1.26"
"php": "^8.2"
},
"autoload": {
"psr-4": {
Expand All @@ -33,7 +32,8 @@
},
"extra": {
"branch-alias": {
"dev-main": "1.0.x-dev"
"dev-main": "1.0.x-dev",
"dev-2.x": "2.x-dev"
}
}
}
5 changes: 3 additions & 2 deletions src/Contrib/Grpc/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
}
],
"require": {
"php": "^8.1",
"php": "^8.2",
"ext-grpc": "*",
"grpc/grpc": "*",
"open-telemetry/sdk": "^1.0"
Expand All @@ -32,7 +32,8 @@
},
"extra": {
"branch-alias": {
"dev-main": "1.0.x-dev"
"dev-main": "1.0.x-dev",
"dev-2.x": "2.x-dev"
}
}
}
5 changes: 3 additions & 2 deletions src/Contrib/Otlp/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
}
],
"require": {
"php": "^8.1",
"php": "^8.2",
"php-http/discovery": "^1.14",
"open-telemetry/gen-otlp-protobuf": "^1.1",
"open-telemetry/api": "^1.0",
Expand All @@ -35,7 +35,8 @@
},
"extra": {
"branch-alias": {
"dev-main": "1.0.x-dev"
"dev-main": "1.0.x-dev",
"dev-2.x": "2.x-dev"
}
}
}
5 changes: 3 additions & 2 deletions src/Contrib/Zipkin/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
}
],
"require": {
"php": "^8.1",
"php": "^8.2",
"open-telemetry/api": "^1.0",
"open-telemetry/sdk": "^1.0",
"php-http/async-client-implementation": "^1.0",
Expand All @@ -34,7 +34,8 @@
},
"extra": {
"branch-alias": {
"dev-main": "1.0.x-dev"
"dev-main": "1.0.x-dev",
"dev-2.x": "2.x-dev"
}
}
}
39 changes: 0 additions & 39 deletions src/Contrib/composer.json

This file was deleted.

5 changes: 3 additions & 2 deletions src/Extension/Propagator/B3/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
}
],
"require": {
"php": "^8.1",
"php": "^8.2",
"open-telemetry/api": "^1.0",
"open-telemetry/context": "^1.0"
},
Expand All @@ -31,7 +31,8 @@
},
"extra": {
"branch-alias": {
"dev-main": "1.0.x-dev"
"dev-main": "1.0.x-dev",
"dev-2.x": "2.x-dev"
}
}
}
5 changes: 3 additions & 2 deletions src/Extension/Propagator/CloudTrace/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
}
],
"require": {
"php": "^8.1",
"php": "^8.2",
"open-telemetry/api": "^1.0",
"open-telemetry/context": "^1.0"
},
Expand All @@ -31,7 +31,8 @@
},
"extra": {
"branch-alias": {
"dev-main": "1.0.x-dev"
"dev-main": "1.0.x-dev",
"dev-2.x": "2.x-dev"
}
}
}
5 changes: 3 additions & 2 deletions src/Extension/Propagator/Jaeger/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
}
],
"require": {
"php": "^8.1",
"php": "^8.2",
"open-telemetry/api": "^1.0",
"open-telemetry/context": "^1.0"
},
Expand All @@ -31,7 +31,8 @@
},
"extra": {
"branch-alias": {
"dev-main": "1.0.x-dev"
"dev-main": "1.0.x-dev",
"dev-2.x": "2.x-dev"
}
}
}
Loading
Loading