liip / LiipMonitorBundle

Integrates the LiipMonitor library into Symfony
http://liip.ch
467 stars 103 forks source link

Unexpected value for parameter "reporters": expecting "array", got "string". #292

Closed webmake closed 6 months ago

webmake commented 6 months ago

This bundle collides with symfony after 2.22.0 release

            "name": "symfony/http-foundation",
            "version": "v5.4.35",

and gives an error:

Unexpected value for parameter "reporters": expecting "array", got "string".

changes which causes this error

Symfony code \Symfony\Component\HttpFoundation\ParameterBag witch is incompatible and raises an issue

    public function all(/* string $key = null */)
    {
        $key = \func_num_args() > 0 ? func_get_arg(0) : null;

        if (null === $key) {
            return $this->parameters;
        }

        if (!\is_array($value = $this->parameters[$key] ?? [])) {
            throw new BadRequestException(sprintf('Unexpected value for parameter "%s": expecting "array", got "%s".', $key, get_debug_type($value)));
        }

        return $value;
    }
webmake commented 6 months ago

Sorry, didn't noticed that changed documentation: /monitor/health?reporters[]=my_reporter