public function set(string $id, $service)
    {
        if ($this->frozen) {
            throw new FrozenContainerException(
                "The container is frozen and is not possible to define the new service \"{$id}\"."
            );
        }

        $this->definitions[$id] = $service;

        // clean alias and internal cache
        unset($this->services[$id]);
        unset($this->aliases[$id]);

        return $this;
    }