public function setDeprecated(string $option, $deprecationMessage = 'The option "%name%" is deprecated.'): self
    {
        if ($this->locked) {
            throw new AccessException('Options cannot be deprecated from a lazy option or normalizer.');
        }

        if (!isset($this->defined[$option])) {
            throw new UndefinedOptionsException(sprintf('The option "%s" does not exist, defined options are: "%s".', $option, implode('", "', array_keys($this->defined))));
        }

        if (!\is_string($deprecationMessage) && !$deprecationMessage instanceof \Closure) {
            throw new InvalidArgumentException(sprintf('Invalid type for deprecation message argument, expected string or \Closure, but got "%s".', \gettype($deprecationMessage)));
        }

        // ignore if empty string
        if ('' === $deprecationMessage) {
            return $this;
        }

        $this->deprecated[$option] = $deprecationMessage;

        // Make sure the option is processed
        unset($this->resolved[$option]);

        return $this;
    }