How to solve a symfony 4.0 deprecation: web_profiler.position

I’m on my last deprecation from 3.4 -> SF4.0. The deprecation reads:

The “web_profiler.position” configuration key has been deprecated in Symfony 3.4 and it will be removed in 4.0.

I could not find any articles on Google or on Stack overflow on how to sovle this. The closest I could find it this article from Fabien that mentions the deprecation:

Symfony 3.4 curated new features

But there’s no mention of how to solve these deprecations :/

I found the section of code generating the error:
SymfonyComponentConfigDefinitionArrayNode.php (L238):

    /**
     * Finalizes the value of this node.
     *
     * @param mixed $value
     *
     * @return mixed The finalised value
     *
     * @throws UnsetKeyException
     * @throws InvalidConfigurationException if the node doesn't have enough children
     */
    protected function finalizeValue($value)
    {
        if (false === $value) {
            throw new UnsetKeyException(sprintf('Unsetting key for path "%s", value: "%s".', $this->getPath(), json_encode($value)));
        }

        foreach ($this->children as $name => $child) {
            if (!array_key_exists($name, $value)) {
                if ($child->isRequired()) {
                    $ex = new InvalidConfigurationException(sprintf('The child node "%s" at path "%s" must be configured.', $name, $this->getPath()));
                    $ex->setPath($this->getPath());

                    throw $ex;
                }

                if ($child->hasDefaultValue()) {
                    $value[$name] = $child->getDefaultValue();
                }

                continue;
            }

            if ($child->isDeprecated()) {
                @trigger_error($child->getDeprecationMessage($name, $this->getPath()), E_USER_DEPRECATED);
            }

            try {
                $value[$name] = $child->finalize($value[$name]);
            } catch (UnsetKeyException $e) {
                unset($value[$name]);
            }
        }

        return $value;
    }

If you’re able to help, thankyou.

Source: Symfony Questions

Was this helpful?

0 / 0

Leave a Reply 0

Your email address will not be published. Required fields are marked *