make phpstan happy, run phpstan on all files on task startup
This commit is contained in:
parent
6e025103d3
commit
93bb473bce
|
@ -1,25 +1,25 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
use OpenTelemetry\Contrib\Otlp\OtlpHttpTransportFactory;
|
|
||||||
use OpenTelemetry\Contrib\Otlp\SpanExporter;
|
|
||||||
use OpenTelemetry\SDK\Trace\SpanProcessor\SimpleSpanProcessor;
|
|
||||||
use OpenTelemetry\SDK\Trace\TracerProvider;
|
|
||||||
use OpenTelemetry\API\Trace\Propagation\TraceContextPropagator;
|
use OpenTelemetry\API\Trace\Propagation\TraceContextPropagator;
|
||||||
use OpenTelemetry\API\Trace\SpanKind;
|
use OpenTelemetry\API\Trace\SpanKind;
|
||||||
use OpenTelemetry\SDK\Trace\SpanExporter\InMemoryExporter;
|
use OpenTelemetry\Contrib\Otlp\OtlpHttpTransportFactory;
|
||||||
|
use OpenTelemetry\Contrib\Otlp\SpanExporter;
|
||||||
use OpenTelemetry\SDK\Resource\ResourceInfoFactory;
|
|
||||||
use OpenTelemetry\SDK\Resource\ResourceInfo;
|
|
||||||
use OpenTelemetry\SDK\Common\Attribute\Attributes;
|
use OpenTelemetry\SDK\Common\Attribute\Attributes;
|
||||||
use OpenTelemetry\SemConv\ResourceAttributes;
|
use OpenTelemetry\SDK\Resource\ResourceInfo;
|
||||||
|
use OpenTelemetry\SDK\Resource\ResourceInfoFactory;
|
||||||
use OpenTelemetry\SDK\Trace\Sampler\AlwaysOnSampler;
|
use OpenTelemetry\SDK\Trace\Sampler\AlwaysOnSampler;
|
||||||
use OpenTelemetry\SDK\Trace\Sampler\ParentBased;
|
use OpenTelemetry\SDK\Trace\Sampler\ParentBased;
|
||||||
|
use OpenTelemetry\SDK\Trace\SpanExporter\InMemoryExporter;
|
||||||
|
use OpenTelemetry\SDK\Trace\SpanProcessor\SimpleSpanProcessor;
|
||||||
|
use OpenTelemetry\SDK\Trace\TracerProvider;
|
||||||
|
use OpenTelemetry\SemConv\ResourceAttributes;
|
||||||
|
|
||||||
class Tracer {
|
class Tracer {
|
||||||
/** @var Tracer $instance */
|
/** @var Tracer $instance */
|
||||||
private static $instance;
|
private static $instance;
|
||||||
|
|
||||||
|
/** @var OpenTelemetry\SDK\Trace\TracerProviderInterface $tracerProvider */
|
||||||
private $tracerProvider;
|
private $tracerProvider;
|
||||||
|
|
||||||
/** @var OpenTelemetry\API\Trace\TracerInterface $tracer */
|
/** @var OpenTelemetry\API\Trace\TracerInterface $tracer */
|
||||||
|
@ -56,6 +56,7 @@ class Tracer {
|
||||||
->setSpanKind(SpanKind::KIND_SERVER)
|
->setSpanKind(SpanKind::KIND_SERVER)
|
||||||
->setAttribute('php.request', json_encode($_REQUEST))
|
->setAttribute('php.request', json_encode($_REQUEST))
|
||||||
->setAttribute('php.server', json_encode($_SERVER))
|
->setAttribute('php.server', json_encode($_SERVER))
|
||||||
|
->setAttribute('php.session', json_encode($_SESSION))
|
||||||
->startSpan();
|
->startSpan();
|
||||||
|
|
||||||
$scope = $span->activate();
|
$scope = $span->activate();
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
#!/bin/sh
|
#!/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
|
while true; do
|
||||||
inotifywait . -e close_write -r -t 300 | grep -q .php && \
|
inotifywait . -e close_write -r -t 300 | grep -q .php && \
|
||||||
(
|
(
|
||||||
|
|
Loading…
Reference in New Issue