Skip to content
Open
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: 2 additions & 6 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,12 @@ jobs:
strategy:
fail-fast: false
matrix:
php-version: ['8.1', '8.2', '8.3']
php-version: ['8.2', '8.3', '8.4']
experimental: [false]
composer_args: [""]
include:
- php-version: 8.4
experimental: false
composer_args: "--ignore-platform-reqs"
- php-version: 8.5
experimental: true
composer_args: "--ignore-platform-reqs"
env:
extensions: ast, grpc, opentelemetry, protobuf

Expand Down Expand Up @@ -177,5 +173,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", "8.5"]'
install_directory: '~/.test/.packages'
2 changes: 1 addition & 1 deletion .github/workflows/publish-otel-php-base-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
name: OpenTelemetry PHP base docker image creation
strategy:
matrix:
php-version: ['8.1', '8.2', '8.3', '8.4']
php-version: ['8.2', '8.3', '8.4', '8.5']
runs-on: ubuntu-latest
permissions:
packages: write
Expand Down
2 changes: 1 addition & 1 deletion .phan/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
//
// Note that the **only** effect of choosing `'5.6'` is to infer that functions removed in php 7.0 exist.
// (See `backward_compatibility_checks` for additional options)
'target_php_version' => '8.1',
'target_php_version' => '8.2',

// If enabled, missing properties will be created when
// they are first seen. If false, we'll report an
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ To contribute effectively, ensure you have the following tools installed:
* PHP 8.1 or higher (Check supported 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
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
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"readme": "./README.md",
"license": "Apache-2.0",
"require": {
"php": "^8.1",
"php": "^8.2",
"google/protobuf": "^3.22 || ^4.0",
"nyholm/psr7-server": "^1.1",
"php-http/discovery": "^1.14",
Expand All @@ -19,7 +19,6 @@
"ramsey/uuid": "^3.0 || ^4.0",
"symfony/config": "^5.4 || ^6.4 || ^7.0 || ^8.0",
"symfony/polyfill-mbstring": "^1.23",
"symfony/polyfill-php82": "^1.26",
"symfony/polyfill-php83": "^1.32",
"symfony/polyfill-php84": "^1.32",
"tbachert/spi": "^1.0.x-dev"
Expand Down
51 changes: 29 additions & 22 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,28 +15,35 @@ RUN apt-get update && apt-get install -y lsb-release apt-transport-https ca-cert

ARG PHP_VERSION=8.3

RUN apt-get install -y \
php${PHP_VERSION}-ast \
php${PHP_VERSION}-cli \
php${PHP_VERSION}-curl \
php${PHP_VERSION}-dev \
php${PHP_VERSION}-grpc \
php${PHP_VERSION}-intl \
php${PHP_VERSION}-mbstring \
php${PHP_VERSION}-opcache \
php${PHP_VERSION}-opentelemetry \
php${PHP_VERSION}-protobuf \
php${PHP_VERSION}-simplexml \
php${PHP_VERSION}-sockets \
php${PHP_VERSION}-xdebug \
php${PHP_VERSION}-zip \
php${PHP_VERSION}-mongodb \
php${PHP_VERSION}-amqp \
php${PHP_VERSION}-rdkafka \
php${PHP_VERSION}-mysqli \
php${PHP_VERSION}-pgsql \
php${PHP_VERSION}-sqlite3 \
unzip
RUN set -eux; \
major=${PHP_VERSION%%.*}; minor=${PHP_VERSION#*.}; \
if [ "$major" -gt 8 ] || { [ "$major" -eq 8 ] && [ "$minor" -ge 5 ]; }; then \
OPCACHE_PKG=""; \
else \
OPCACHE_PKG="php${PHP_VERSION}-opcache"; \
fi; \
apt-get install -y \
php${PHP_VERSION}-ast \
php${PHP_VERSION}-cli \
php${PHP_VERSION}-curl \
php${PHP_VERSION}-dev \
php${PHP_VERSION}-grpc \
php${PHP_VERSION}-intl \
php${PHP_VERSION}-mbstring \
${OPCACHE_PKG} \
php${PHP_VERSION}-opentelemetry \
php${PHP_VERSION}-protobuf \
php${PHP_VERSION}-simplexml \
php${PHP_VERSION}-sockets \
php${PHP_VERSION}-xdebug \
php${PHP_VERSION}-zip \
php${PHP_VERSION}-mongodb \
php${PHP_VERSION}-amqp \
php${PHP_VERSION}-rdkafka \
php${PHP_VERSION}-mysqli \
php${PHP_VERSION}-pgsql \
php${PHP_VERSION}-sqlite3 \
unzip

COPY --from=composer /usr/bin/composer /usr/local/bin/composer

Expand Down
13 changes: 3 additions & 10 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
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\Php83\Rector\ClassMethod\AddOverrideAttributeToOverriddenMethodsRector;
use Rector\PHPUnit\Set\PHPUnitSetList;
use Rector\Strict\Rector\Empty_\DisallowedEmptyRuleFixerRector;
Expand All @@ -23,22 +22,16 @@
]);

$rectorConfig->sets([
SetList::PHP_81,
SetList::PHP_82,
SetList::CODE_QUALITY,
PHPUnitSetList::PHPUNIT_100,
]);
$rectorConfig->rule(AddOverrideAttributeToOverriddenMethodsRector::class);
$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,
]);
};
2 changes: 1 addition & 1 deletion src/API/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/context": "^1.4",
"psr/log": "^1.1|^2.0|^3.0",
"symfony/polyfill-php82": "^1.26"
Expand Down
2 changes: 1 addition & 1 deletion src/Config/SDK/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.8",
"open-telemetry/context": "^1.4",
"open-telemetry/sdk": "^1.8",
Expand Down
3 changes: 1 addition & 2 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 Down
2 changes: 1 addition & 1 deletion 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 Down
2 changes: 1 addition & 1 deletion 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 Down
2 changes: 1 addition & 1 deletion 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 Down
2 changes: 1 addition & 1 deletion 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 Down
2 changes: 1 addition & 1 deletion 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 Down
2 changes: 1 addition & 1 deletion src/SDK/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-json": "*",
"nyholm/psr7-server": "^1.1",
"open-telemetry/api": "^1.7",
Expand Down
Loading