code: 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);
      }
docs: Set parameter value
  
  @param string $key
  @param mixed $value