Skip to content

Commit

Permalink
chore: update dependencies (#102)
Browse files Browse the repository at this point in the history
  • Loading branch information
gaelreyrol authored Dec 21, 2024
1 parent dcd1a1a commit f6ca63b
Show file tree
Hide file tree
Showing 10 changed files with 189 additions and 108 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@ insert_final_newline = true

[*.{nix,yml,yaml,yml.dist,md,lock}]
indent_size = 2

[*.neon]
indent_style = tab
22 changes: 11 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,14 @@ jobs:
uses: actions/cache@v4
with:
path: ${{ steps.composercache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-
key: ${{ runner.os }}-composer-tools-php-cs-fixer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-tools-php-cs-fixer
- name: List PHP installed extensions
run: php -m
- name: Update project dependencies
run: |
composer update --no-interaction --no-progress --ansi
- name: Install PHP CS Fixer dependencies
run: cd tools/php-cs-fixer && composer update --no-interaction --no-progress --ansi
- name: Run PHP-CS-Fixer fix
run: vendor/bin/php-cs-fixer fix --dry-run --diff --ansi
run: tools/php-cs-fixer/vendor/bin/php-cs-fixer fix --dry-run --diff --ansi
phpstan:
name: PHPStan (PHP ${{ matrix.php }})
runs-on: ubuntu-latest
Expand Down Expand Up @@ -98,13 +97,14 @@ jobs:
uses: actions/cache@v4
with:
path: ${{ steps.composercache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-
key: ${{ runner.os }}-composer-tools-phpstan-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-tools-phpstan
- name: List PHP installed extensions
run: php -m
- name: Update project dependencies
- name: Install PHPStan dependencies
run: |
composer update --no-interaction --no-progress --ansi
cd tools/phpstan && composer update --no-interaction --no-progress --ansi
- name: Cache PHPStan results
uses: actions/cache@v4
with:
Expand All @@ -116,8 +116,8 @@ jobs:
continue-on-error: true
- name: Run PHPStan analysis
run: |
./vendor/bin/phpstan --version
./vendor/bin/phpstan analyse --no-interaction --no-progress --ansi --error-format=github --memory-limit=256M
tools/phpstan/vendor/bin/phpstan --version
tools/phpstan/vendor/bin/phpstan analyse --no-interaction --no-progress --ansi --error-format=github --memory-limit=256M
phpunit:
name: PHPUnit (PHP ${{ matrix.php }}, ${{ matrix.dependencies }})
runs-on: ubuntu-latest
Expand Down
61 changes: 26 additions & 35 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,22 @@
],
"require": {
"php": ">=8.2",
"monolog/monolog": "^3.7",
"monolog/monolog": "^3.8",
"nyholm/psr7": "^1.8",
"open-telemetry/api": "^1.1",
"open-telemetry/context": "^1.1",
"open-telemetry/opentelemetry-logger-monolog": "^1.0",
"open-telemetry/opentelemetry-propagation-server-timing": "^0.0.2",
"open-telemetry/opentelemetry-propagation-server-timing": "^0.0.3",
"open-telemetry/opentelemetry-propagation-traceresponse": "^0.0.3",
"open-telemetry/sdk": "^1.1",
"open-telemetry/sem-conv": "^1.27",
"open-telemetry/symfony-sdk-bundle": "^0.0.24",
"open-telemetry/symfony-sdk-bundle": "^0.0.25",
"php-http/discovery": "^1.20",
"psr/http-factory": "^1.1",
"symfony/config": "^7.1",
"symfony/dependency-injection": "^7.1",
"symfony/event-dispatcher": "^7.1",
"symfony/http-client": "^7.1",
"symfony/config": "^7.2",
"symfony/dependency-injection": "^7.2",
"symfony/event-dispatcher": "^7.2",
"symfony/http-client": "^7.2",
"zenstruck/dsn": "^0.2",
"zenstruck/uri": "^2.3"
},
Expand All @@ -52,39 +52,31 @@
"doctrine/doctrine-bundle": "^2.13",
"doctrine/doctrine-migrations-bundle": "^3.3",
"doctrine/orm": "^2.18 || ^3.3",
"ergebnis/composer-normalize": "^2",
"friendsofphp/php-cs-fixer": "^3",
"ergebnis/composer-normalize": "^2.45",
"guzzlehttp/promises": "^2.0",
"maglnet/composer-require-checker": "^4",
"matthiasnoback/symfony-config-test": "^5.2",
"matthiasnoback/symfony-dependency-injection-test": "^5.1",
"matthiasnoback/symfony-dependency-injection-test": "^6.0",
"nyholm/symfony-bundle-test": "^3.0",
"open-telemetry/exporter-otlp": "^1.1",
"open-telemetry/exporter-zipkin": "^1.1",
"open-telemetry/transport-grpc": "^1.1",
"php-http/httplug": "^2.4",
"phpstan/extension-installer": "^1",
"phpstan/phpstan": "^1",
"phpstan/phpstan-deprecation-rules": "^1.2",
"phpstan/phpstan-phpunit": "^1.4",
"phpstan/phpstan-strict-rules": "^1.6",
"phpstan/phpstan-symfony": "^1.4",
"phpunit/phpunit": "^10.5",
"phpunit/phpunit": "^11.5",
"pyrech/composer-changelogs": "^2.1",
"roave/security-advisories": "dev-master",
"symfony/browser-kit": "^7.1",
"symfony/cache": "^7.1",
"symfony/framework-bundle": "^7.1",
"symfony/http-kernel": "^7.1",
"symfony/mailer": "^7.1",
"symfony/messenger": "^7.1",
"symfony/browser-kit": "^7.2",
"symfony/cache": "^7.2",
"symfony/framework-bundle": "^7.2",
"symfony/http-kernel": "^7.2",
"symfony/mailer": "^7.2",
"symfony/messenger": "^7.2",
"symfony/monolog-bundle": "^3.10",
"symfony/phpunit-bridge": "^7.1",
"symfony/runtime": "^7.1",
"symfony/twig-bundle": "^7.1",
"symfony/yaml": "^7.1",
"twig/twig": "^3.14",
"zalas/phpunit-globals": "^3.3"
"symfony/phpunit-bridge": "^7.2",
"symfony/runtime": "^7.2",
"symfony/twig-bundle": "^7.2",
"symfony/yaml": "^7.2",
"twig/twig": "^3.17",
"zalas/phpunit-globals": "^3.5"
},
"suggest": {
"doctrine/doctrine-bundle": "Needed to enable Doctrine DBAL & ORM instrumentation",
Expand Down Expand Up @@ -121,15 +113,14 @@
"allow-plugins": {
"ergebnis/composer-normalize": true,
"php-http/discovery": true,
"phpstan/extension-installer": true,
"pyrech/composer-changelogs": true,
"symfony/runtime": true,
"tbachert/spi": true
},
"sort-packages": true
},
"scripts": {
"check-reqs": "@php vendor/bin/composer-require-checker check",
"check-reqs": "@php tools/composer-require-checker/vendor/bin/composer-require-checker check",
"coverage": [
"@putenv XDEBUG_MODE=coverage",
"@phpunit --coverage-html=coverage"
Expand All @@ -144,9 +135,9 @@
"@composer normalize --dry-run"
],
"lowest": "@composer update --prefer-lowest --prefer-stable",
"php-cs-fixer:fix": "@php ./vendor/bin/php-cs-fixer fix",
"php-cs-fixer:lint": "@php ./vendor/bin/php-cs-fixer check",
"phpstan": "@php vendor/bin/phpstan analyse",
"php-cs-fixer:fix": "@php ./tools/php-cs-fixer/vendor/bin/php-cs-fixer fix",
"php-cs-fixer:lint": "@php ./tools/php-cs-fixer/vendor/bin/php-cs-fixer check",
"phpstan": "@php ./tools/phpstan/vendor/bin/phpstan analyse",
"phpunit": "@php vendor/bin/phpunit",
"test": [
"@putenv XDEBUG_MODE=off",
Expand Down
148 changes: 105 additions & 43 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
@@ -1,44 +1,106 @@
parameters:
ignoreErrors:
-
message: "#^Method FriendsOfOpenTelemetry\\\\OpenTelemetryBundle\\\\DependencyInjection\\\\OpenTelemetryExtension\\:\\:loadInternal\\(\\) has parameter \\$mergedConfig with no value type specified in iterable type array\\.$#"
count: 1
path: src/DependencyInjection/OpenTelemetryExtension.php

-
message: "#^Property FriendsOfOpenTelemetry\\\\OpenTelemetryBundle\\\\Instrumentation\\\\Doctrine\\\\Middleware\\\\TraceableConnectionV4\\:\\:\\$logger is never read, only written\\.$#"
count: 1
path: src/Instrumentation/Doctrine/Middleware/TraceableConnectionV4.php

-
message: """
#^Fetching deprecated class constant DB_USER of interface OpenTelemetry\\\\SemConv\\\\TraceAttributes\\:
No replacement at this time\\.$#
"""
count: 1
path: src/Instrumentation/Doctrine/Middleware/TraceableDriverV4.php

-
message: "#^Property FriendsOfOpenTelemetry\\\\OpenTelemetryBundle\\\\Instrumentation\\\\Doctrine\\\\Middleware\\\\TraceableStatementV4\\:\\:\\$logger is never read, only written\\.$#"
count: 1
path: src/Instrumentation/Doctrine/Middleware/TraceableStatementV4.php

-
message: "#^Property FriendsOfOpenTelemetry\\\\OpenTelemetryBundle\\\\OpenTelemetry\\\\Log\\\\LogProcessor\\\\AbstractLogProcessorFactory\\:\\:\\$logger is never read, only written\\.$#"
count: 1
path: src/OpenTelemetry/Log/LogProcessor/AbstractLogProcessorFactory.php

-
message: "#^Property FriendsOfOpenTelemetry\\\\OpenTelemetryBundle\\\\OpenTelemetry\\\\Trace\\\\SpanProcessor\\\\AbstractSpanProcessorFactory\\:\\:\\$logger is never read, only written\\.$#"
count: 1
path: src/OpenTelemetry/Trace/SpanProcessor/AbstractSpanProcessorFactory.php

-
message: "#^Property FriendsOfOpenTelemetry\\\\OpenTelemetryBundle\\\\OpenTelemetry\\\\Transport\\\\AbstractTransportFactory\\:\\:\\$logger is never read, only written\\.$#"
count: 1
path: src/OpenTelemetry/Transport/AbstractTransportFactory.php

-
message: "#^Call to deprecated method discover\\(\\) of class OpenTelemetry\\\\SDK\\\\Common\\\\Export\\\\Http\\\\PsrTransportFactory\\.$#"
count: 1
path: src/OpenTelemetry/Transport/PsrHttpTransportFactory.php
ignoreErrors:
-
message: '#^Method FriendsOfOpenTelemetry\\OpenTelemetryBundle\\DependencyInjection\\OpenTelemetryExtension\:\:loadInternal\(\) has parameter \$mergedConfig with no value type specified in iterable type array\.$#'
identifier: missingType.iterableValue
count: 1
path: src/DependencyInjection/OpenTelemetryExtension.php

-
message: '#^Property FriendsOfOpenTelemetry\\OpenTelemetryBundle\\Instrumentation\\Doctrine\\Middleware\\TraceableConnectionV4\:\:\$logger is never read, only written\.$#'
identifier: property.onlyWritten
count: 1
path: src/Instrumentation/Doctrine/Middleware/TraceableConnectionV4.php

-
message: '''
#^Fetching deprecated class constant DB_USER of interface OpenTelemetry\\SemConv\\TraceAttributes\:
No replacement at this time\.$#
'''
identifier: classConstant.deprecated
count: 1
path: src/Instrumentation/Doctrine/Middleware/TraceableDriverV4.php

-
message: '#^Property FriendsOfOpenTelemetry\\OpenTelemetryBundle\\Instrumentation\\Doctrine\\Middleware\\TraceableStatementV4\:\:\$logger is never read, only written\.$#'
identifier: property.onlyWritten
count: 1
path: src/Instrumentation/Doctrine/Middleware/TraceableStatementV4.php

-
message: '#^Method FriendsOfOpenTelemetry\\OpenTelemetryBundle\\OpenTelemetry\\Exporter\\OtlpExporterEndpoint\:\:getTransport\(\) never returns null so it can be removed from the return type\.$#'
identifier: return.unusedType
count: 1
path: src/OpenTelemetry/Exporter/OtlpExporterEndpoint.php

-
message: '#^Property FriendsOfOpenTelemetry\\OpenTelemetryBundle\\OpenTelemetry\\Log\\LogProcessor\\AbstractLogProcessorFactory\:\:\$logger is never read, only written\.$#'
identifier: property.onlyWritten
count: 1
path: src/OpenTelemetry/Log/LogProcessor/AbstractLogProcessorFactory.php

-
message: '#^Property FriendsOfOpenTelemetry\\OpenTelemetryBundle\\OpenTelemetry\\Trace\\SpanProcessor\\AbstractSpanProcessorFactory\:\:\$logger is never read, only written\.$#'
identifier: property.onlyWritten
count: 1
path: src/OpenTelemetry/Trace/SpanProcessor/AbstractSpanProcessorFactory.php

-
message: '#^Method FriendsOfOpenTelemetry\\OpenTelemetryBundle\\OpenTelemetry\\Trace\\ZipkinExporterEndpoint\:\:getTransport\(\) never returns null so it can be removed from the return type\.$#'
identifier: return.unusedType
count: 1
path: src/OpenTelemetry/Trace/ZipkinExporterEndpoint.php

-
message: '#^Property FriendsOfOpenTelemetry\\OpenTelemetryBundle\\OpenTelemetry\\Transport\\AbstractTransportFactory\:\:\$logger is never read, only written\.$#'
identifier: property.onlyWritten
count: 1
path: src/OpenTelemetry/Transport/AbstractTransportFactory.php

-
message: '#^Call to deprecated method discover\(\) of class OpenTelemetry\\SDK\\Common\\Export\\Http\\PsrTransportFactory\.$#'
identifier: staticMethod.deprecated
count: 1
path: src/OpenTelemetry/Transport/PsrHttpTransportFactory.php

-
message: '#^Call to method FriendsOfOpenTelemetry\\OpenTelemetryBundle\\OpenTelemetry\\Log\\LogExporter\\NoopLogExporterFactory\:\:createExporter\(\) on a separate line has no effect\.$#'
identifier: method.resultUnused
count: 1
path: tests/Unit/OpenTelemetry/Log/LogExporter/NoopLogExporterFactoryTest.php

-
message: '#^Call to method FriendsOfOpenTelemetry\\OpenTelemetryBundle\\OpenTelemetry\\Log\\LogProcessor\\NoopLogProcessorFactory\:\:createProcessor\(\) on a separate line has no effect\.$#'
identifier: method.resultUnused
count: 1
path: tests/Unit/OpenTelemetry/Log/LogProcessor/NoopLogProcessorFactoryTest.php

-
message: '#^Call to method FriendsOfOpenTelemetry\\OpenTelemetryBundle\\OpenTelemetry\\Log\\LoggerProvider\\NoopLoggerProviderFactory\:\:createProvider\(\) on a separate line has no effect\.$#'
identifier: method.resultUnused
count: 1
path: tests/Unit/OpenTelemetry/Log/LoggerProvider/NoopLoggerProviderFactoryTest.php

-
message: '#^Call to method FriendsOfOpenTelemetry\\OpenTelemetryBundle\\OpenTelemetry\\Metric\\MeterProvider\\NoopMeterProviderFactory\:\:createProvider\(\) on a separate line has no effect\.$#'
identifier: method.resultUnused
count: 1
path: tests/Unit/OpenTelemetry/Metric/MeterProvider/NoopMeterProviderFactoryTest.php

-
message: '#^Call to method FriendsOfOpenTelemetry\\OpenTelemetryBundle\\OpenTelemetry\\Metric\\MetricExporter\\NoopMetricExporterFactory\:\:createExporter\(\) on a separate line has no effect\.$#'
identifier: method.resultUnused
count: 1
path: tests/Unit/OpenTelemetry/Metric/MetricExporter/NoopMetricExporterFactoryTest.php

-
message: '#^Call to method FriendsOfOpenTelemetry\\OpenTelemetryBundle\\OpenTelemetry\\Trace\\SpanProcessor\\NoopSpanProcessorFactory\:\:createProcessor\(\) on a separate line has no effect\.$#'
identifier: method.resultUnused
count: 1
path: tests/Unit/OpenTelemetry/Trace/SpanProcessor/NoopSpanProcessorFactoryTest.php

-
message: '#^Call to method FriendsOfOpenTelemetry\\OpenTelemetryBundle\\OpenTelemetry\\Trace\\TracerProvider\\NoopTracerProviderFactory\:\:createProvider\(\) on a separate line has no effect\.$#'
identifier: method.resultUnused
count: 1
path: tests/Unit/OpenTelemetry/Trace/TracerProvider/NoopTracerProviderFactoryTest.php
32 changes: 16 additions & 16 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
includes:
- phpstan-baseline.neon
- phpstan-baseline.neon

parameters:
level: 6
paths:
- src/
- tests/
bootstrapFiles:
- src/aliases.php
editorUrl: 'phpstorm://open?file=%%file%%&line=%%line%%'
tmpDir: %currentWorkingDirectory%/.phpstan
excludePaths:
- tests/*/var/*
level: 6
paths:
- src/
- tests/
bootstrapFiles:
- src/aliases.php
editorUrl: 'phpstorm://open?file=%%file%%&line=%%line%%'
tmpDir: %currentWorkingDirectory%/.phpstan
excludePaths:
- tests/*/var/*

# Doctrine ^3.8
- src/Instrumentation/Doctrine/Middleware/TraceableConnectionV3.php
- src/Instrumentation/Doctrine/Middleware/TraceableDriverV3.php
- src/Instrumentation/Doctrine/Middleware/TraceableStatementV3.php
- tests/Functional/Instrumentation/Doctrine/DoctrineV3TracingTest.php
# Doctrine ^3.8
- src/Instrumentation/Doctrine/Middleware/TraceableConnectionV3.php
- src/Instrumentation/Doctrine/Middleware/TraceableDriverV3.php
- src/Instrumentation/Doctrine/Middleware/TraceableStatementV3.php
- tests/Functional/Instrumentation/Doctrine/DoctrineV3TracingTest.php
2 changes: 1 addition & 1 deletion src/OpenTelemetry/Context/Propagator/HeadersPropagator.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ final class HeadersPropagator implements PropagationGetterInterface
/**
* @param mixed|Request $carrier
*
* @return array<int, string>
* @return list<string>
*/
public function keys($carrier): array
{
Expand Down
4 changes: 2 additions & 2 deletions tests/Unit/OpenTelemetry/Metric/ExemplarFilterFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ public function testCreate(string $name, ?string $class): void
}

/**
* @return \Generator{string, array{
* @return \Generator<string, array{
* string,
* ?class-string<ExemplarFilterInterface>,
* }}
* }>
*/
public static function exemplarFilter(): \Generator
{
Expand Down
5 changes: 5 additions & 0 deletions tools/composer-require-checker/composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"require": {
"maglnet/composer-require-checker": "^4.14"
}
}
5 changes: 5 additions & 0 deletions tools/php-cs-fixer/composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"require": {
"friendsofphp/php-cs-fixer": "^3.65"
}
}
Loading

0 comments on commit f6ca63b

Please sign in to comment.