Skip to content

Commit

Permalink
feat(composer): add requirements check
Browse files Browse the repository at this point in the history
  • Loading branch information
gaelreyrol committed Jan 12, 2024
1 parent e07ebd9 commit 5058e1a
Show file tree
Hide file tree
Showing 4 changed files with 106 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@ cachix use opentelemetry
cachix use nix-shell
cachix use php-src-nix

export PATH="$PATH:$HOME/.config/composer/vendor/bin"

use flake
49 changes: 49 additions & 0 deletions composer-require-checker.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"symbol-whitelist" : [
"Composer\\InstalledVersions",
"OpenTelemetry\\Contrib\\Grpc\\GrpcTransportFactory",
"OpenTelemetry\\Contrib\\Otlp\\ContentTypes",
"OpenTelemetry\\Contrib\\Otlp\\HttpEndpointResolverInterface",
"OpenTelemetry\\Contrib\\Otlp\\LogsExporter",
"OpenTelemetry\\Contrib\\Otlp\\MetricExporter",
"OpenTelemetry\\Contrib\\Otlp\\OtlpHttpTransportFactory",
"OpenTelemetry\\Contrib\\Otlp\\OtlpUtil",
"OpenTelemetry\\Contrib\\Otlp\\Protocols",
"OpenTelemetry\\Contrib\\Otlp\\SpanExporter",
"OpenTelemetry\\Contrib\\Zipkin\\Exporter",
"Symfony\\Component\\Console\\Application",
"Symfony\\Component\\Console\\Command\\Command",
"Symfony\\Component\\Console\\ConsoleEvents",
"Symfony\\Component\\Console\\Event\\ConsoleCommandEvent",
"Symfony\\Component\\Console\\Event\\ConsoleErrorEvent",
"Symfony\\Component\\Console\\Event\\ConsoleSignalEvent",
"Symfony\\Component\\Console\\Event\\ConsoleTerminateEvent",
"Symfony\\Component\\HttpFoundation\\HeaderBag",
"Symfony\\Component\\HttpFoundation\\Request",
"Symfony\\Component\\HttpKernel\\Bundle\\Bundle",
"Symfony\\Component\\HttpKernel\\DependencyInjection\\ConfigurableExtension",
"Symfony\\Component\\HttpKernel\\Event\\ControllerArgumentsEvent",
"Symfony\\Component\\HttpKernel\\Event\\ControllerEvent",
"Symfony\\Component\\HttpKernel\\Event\\ExceptionEvent",
"Symfony\\Component\\HttpKernel\\Event\\FinishRequestEvent",
"Symfony\\Component\\HttpKernel\\Event\\RequestEvent",
"Symfony\\Component\\HttpKernel\\Event\\ResponseEvent",
"Symfony\\Component\\HttpKernel\\Event\\TerminateEvent",
"Symfony\\Component\\HttpKernel\\Event\\ViewEvent",
"Symfony\\Component\\HttpKernel\\HttpKernel",
"Symfony\\Component\\HttpKernel\\KernelEvents"
],
"php-core-extensions" : [
"Core",
"date",
"json",
"hash",
"pcre",
"Phar",
"Reflection",
"SPL",
"random",
"standard"
],
"scan-files" : [ "src/**/*.php" ]
}
17 changes: 13 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"php-cs-fixer:lint": "@php-cs-fixer:fix --dry-run --diff",
"phpstan": "@php vendor/bin/phpstan analyse",
"phpunit": "@php vendor/bin/phpunit",
"check-reqs": "@php vendor/bin/composer-require-checker check",
"lint": [
"@php-cs-fixer:lint",
"@phpstan"
Expand All @@ -40,14 +41,21 @@
"prefer-stable": true,
"require": {
"php": "~8.2 || ~8.3",
"monolog/monolog": "^3.5",
"nyholm/psr7": "^1.8",
"open-telemetry/api": "^1.0",
"open-telemetry/context": "^1.0",
"open-telemetry/opentelemetry-logger-monolog": "^1.0",
"open-telemetry/sdk": "^1.0",
"open-telemetry/sem-conv": "^1.23",
"php-http/discovery": "^1.19",
"psr/http-factory": "^1.0",
"symfony/config": "^6.4 || ^7.0",
"symfony/dependency-injection": "^6.4 || ^7.0",
"symfony/event-dispatcher": "^7.0",
"symfony/http-client": "^6.4 || ^7.0",
"zenstruck/dsn": "^0.2"
"zenstruck/dsn": "^0.2",
"zenstruck/uri": "^2.3"
},
"require-dev": {
"ext-ffi": "*",
Expand All @@ -57,11 +65,11 @@
"ext-xdebug": "*",
"friendsofphp/php-cs-fixer": "^3.41",
"guzzlehttp/promises": "^2.0",
"maglnet/composer-require-checker": "^4.8",
"matthiasnoback/symfony-config-test": "^5.1",
"matthiasnoback/symfony-dependency-injection-test": "^5.0",
"open-telemetry/exporter-otlp": "^1.0",
"open-telemetry/exporter-zipkin": "^1.0",
"open-telemetry/opentelemetry-logger-monolog": "^1.0",
"open-telemetry/transport-grpc": "^1.0",
"php-http/httplug": "^2.4",
"phpstan/extension-installer": "^1.3",
Expand All @@ -88,8 +96,9 @@
"sort-packages": true
},
"suggest": {
"symfony/console": "Needed to enable Symfony HttpKernel instrumentation",
"symfony/http-kernel": "Needed to enable Symfony Console instrumentation",
"symfony/console": "Needed to enable Symfony Console instrumentation",
"symfony/http-foundation": "Needed to enable Symfony HttpKernel instrumentation",
"symfony/http-kernel": "Needed to enable Symfony HttpKernel instrumentation",
"symfony/monolog-bundle": "Needed to register OpenTelemetry handler in Symfony Monolog service",
"open-telemetry/exporter-otlp": "Needed to export OpenTelemetry data via OTPL",
"open-telemetry/exporter-zipkin": "Needed to export OpenTelemetry data via Zipkin",
Expand Down
42 changes: 42 additions & 0 deletions report.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"_meta": {
"composer-require-checker": {
"version": "4.8.0@1c7498e4c31ff7e467ac1b5138d277736c838393"
},
"date": "2024-01-12T13:45:49+00:00"
},
"unknown-symbols": {
"Composer\\InstalledVersions": [],
"OpenTelemetry\\Contrib\\Grpc\\GrpcTransportFactory": [],
"OpenTelemetry\\Contrib\\Otlp\\ContentTypes": [],
"OpenTelemetry\\Contrib\\Otlp\\HttpEndpointResolverInterface": [],
"OpenTelemetry\\Contrib\\Otlp\\LogsExporter": [],
"OpenTelemetry\\Contrib\\Otlp\\MetricExporter": [],
"OpenTelemetry\\Contrib\\Otlp\\OtlpHttpTransportFactory": [],
"OpenTelemetry\\Contrib\\Otlp\\OtlpUtil": [],
"OpenTelemetry\\Contrib\\Otlp\\Protocols": [],
"OpenTelemetry\\Contrib\\Otlp\\SpanExporter": [],
"OpenTelemetry\\Contrib\\Zipkin\\Exporter": [],
"Symfony\\Component\\Console\\Application": [],
"Symfony\\Component\\Console\\Command\\Command": [],
"Symfony\\Component\\Console\\ConsoleEvents": [],
"Symfony\\Component\\Console\\Event\\ConsoleCommandEvent": [],
"Symfony\\Component\\Console\\Event\\ConsoleErrorEvent": [],
"Symfony\\Component\\Console\\Event\\ConsoleSignalEvent": [],
"Symfony\\Component\\Console\\Event\\ConsoleTerminateEvent": [],
"Symfony\\Component\\HttpFoundation\\HeaderBag": [],
"Symfony\\Component\\HttpFoundation\\Request": [],
"Symfony\\Component\\HttpKernel\\Bundle\\Bundle": [],
"Symfony\\Component\\HttpKernel\\DependencyInjection\\ConfigurableExtension": [],
"Symfony\\Component\\HttpKernel\\Event\\ControllerArgumentsEvent": [],
"Symfony\\Component\\HttpKernel\\Event\\ControllerEvent": [],
"Symfony\\Component\\HttpKernel\\Event\\ExceptionEvent": [],
"Symfony\\Component\\HttpKernel\\Event\\FinishRequestEvent": [],
"Symfony\\Component\\HttpKernel\\Event\\RequestEvent": [],
"Symfony\\Component\\HttpKernel\\Event\\ResponseEvent": [],
"Symfony\\Component\\HttpKernel\\Event\\TerminateEvent": [],
"Symfony\\Component\\HttpKernel\\Event\\ViewEvent": [],
"Symfony\\Component\\HttpKernel\\HttpKernel": [],
"Symfony\\Component\\HttpKernel\\KernelEvents": []
}
}

0 comments on commit 5058e1a

Please sign in to comment.