diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 0039fef88..69fd3f3f4 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -3,11 +3,11 @@ "tasks": [ { "type": "shell", - "label": "phpstan 8.1 (watcher)", + "label": "phpstan (watcher)", "isBackground": true, "problemMatcher": { "fileLocation": ["relative", "${workspaceRoot}"], - "owner": "phpstan-watcher-8.1", + "owner": "phpstan-watcher", "pattern": { "regexp": "^/app/(.*?):([0-9\\?]*):(.*)$", "file": 1, diff --git a/classes/tracer.php b/classes/tracer.php index 3a734641e..d788cfdba 100644 --- a/classes/tracer.php +++ b/classes/tracer.php @@ -11,6 +11,8 @@ use OpenTelemetry\SDK\Trace\SpanExporter\InMemoryExporter; class Tracer { /** @var Tracer $instance */ private static $instance; + + /** @var OpenTelemetry\API\Trace\TracerInterface $tracer */ private static $tracer; public function __construct() { @@ -44,7 +46,7 @@ class Tracer { * @param string $name * @param array|array> $tags * @param array $args - * @return Span + * @return OpenTelemetry\API\Trace\SpanInterface */ private function _start(string $name, array $tags = [], array $args = []) { $span = $this->tracer->spanBuilder($name)->startSpan(); @@ -64,7 +66,7 @@ class Tracer { * @param string $name * @param array|array> $tags * @param array $args - * @return Span + * @return OpenTelemetry\API\Trace\SpanInterface */ public static function start(string $name, array $tags = [], array $args = []) { return self::get_instance()->_start($name, $tags, $args); @@ -76,5 +78,4 @@ class Tracer { return self::$instance; } - } diff --git a/phpstan.neon b/phpstan.neon index 1b5c17e3e..8b0c352a2 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -28,8 +28,6 @@ parameters: - plugins/**/tests/* - plugins/*/vendor/intervention/* - plugins/*/vendor/psr/log/* - - vendor/**/test/* - - vendor/**/tests/* - - vendor/sebastian/* + - vendor/**/* paths: - . diff --git a/utils/phpstan-watcher.sh b/utils/phpstan-watcher.sh index 4c8f1bfa1..70eb1d9ab 100644 --- a/utils/phpstan-watcher.sh +++ b/utils/phpstan-watcher.sh @@ -1,19 +1,12 @@ #!/bin/sh -PHP_VERSION="$1" - -[ -z "$PHP_VERSION" ] && PHP_VERSION=8.1 - -echo PHP_VERSION: ${PHP_VERSION} -echo PWD: $(pwd) - while true; do inotifywait . -e close_write -r -t 300 | grep -q .php && \ ( MODIFIED=$(git ls-files -m | grep .php) docker run --rm -v $(pwd):/app -v /tmp/phpstan-8.1:/tmp/phpstan \ - --workdir /app registry.fakecake.org/cthulhoo/ci-alpine:3.16 php81 -d memory_limit=-1 ./vendor/bin/phpstan --memory-limit=2G --error-format=raw analyze ${MODIFIED} + --workdir /app registry.fakecake.org/ci/php8.2-alpine:3.18 php82 -d memory_limit=-1 ./vendor/bin/phpstan --memory-limit=2G --error-format=raw analyze ${MODIFIED} echo All done, RC=$?. ) sleep 1