src/Parameter/Service/ParameterService.php
public function set(string $key, $value)
    {
        $parameter = $this->repository->findOneBy(['key' => $key]);

        if (!$parameter) {
            throw new OutOfRangeException('Parameter "'.$key.'" does not exist.');
        }

        $parameter
            ->setKey($key)
            ->setValue($value);
        $this->manager->persist($parameter);
        $this->manager->flush();
        $this->manager->detach($parameter);
    }
public function set(string $key, $value)
    {
        $parameter = $this->repository->findOneBy(['key' => $key]);

        if (!$parameter) {
            throw new OutOfRangeException('Parameter "'.$key.'" does not exist.');
        }

        $parameter
            ->setKey($key)
            ->setValue($value);
        $this->manager->persist($parameter);
        $this->manager->flush();
        $this->manager->detach($parameter);
    }
Set parameter value

@param string $key
@param mixed $value