From 93bb473bceb3f4c6450f3101fa82a17dc84cf388 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sat, 21 Oct 2023 10:02:49 +0300 Subject: [PATCH] make phpstan happy, run phpstan on all files on task startup --- classes/tracer.php | 21 +++++++++++---------- utils/phpstan-watcher.sh | 4 ++++ 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/classes/tracer.php b/classes/tracer.php index e8f6a0378..0e72e7976 100644 --- a/classes/tracer.php +++ b/classes/tracer.php @@ -1,25 +1,25 @@ setSpanKind(SpanKind::KIND_SERVER) ->setAttribute('php.request', json_encode($_REQUEST)) ->setAttribute('php.server', json_encode($_SERVER)) + ->setAttribute('php.session', json_encode($_SESSION)) ->startSpan(); $scope = $span->activate(); diff --git a/utils/phpstan-watcher.sh b/utils/phpstan-watcher.sh index 70eb1d9ab..1972df049 100644 --- a/utils/phpstan-watcher.sh +++ b/utils/phpstan-watcher.sh @@ -1,5 +1,9 @@ #!/bin/sh +docker run --rm -v $(pwd):/app -v /tmp/phpstan-8.1:/tmp/phpstan \ + --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 . +echo All done, RC=$?. + while true; do inotifywait . -e close_write -r -t 300 | grep -q .php && \ (