src/Container.php
public function getDefinition($id)
    {
        $id = strtolower($id);

        if (array_key_exists($id, $this->aliases)) {
            $id = $this->aliases[$id];
        }

        if (array_key_exists($id, $this->serviceDefinitions)) {
            return $this->serviceDefinitions[$id];
        }

        throw new \InvalidArgumentException('service is not defined');
    }
public function getDefinition($id)
    {
        $id = strtolower($id);

        if (array_key_exists($id, $this->aliases)) {
            $id = $this->aliases[$id];
        }

        if (array_key_exists($id, $this->serviceDefinitions)) {
            return $this->serviceDefinitions[$id];
        }

        throw new \InvalidArgumentException('service is not defined');
    }
Get service definition

@param string $id Service id

@return Definition

@throws \InvalidArgumentException