public function addRedirection($oldPath, $newPath)
    {
        if (!is_string($oldPath) && !($oldPath instanceof UriInterface)) {
            throw new InvalidArgumentException(
                'The deprecated path must be a string; received %s',
                (is_object($oldPath) ? get_class($oldPath) : gettype($oldPath))
            );
        }

        $newPath = $this->parseRoute($newPath);
        $this->paths[$oldPath] = $newPath;

        $this->app()->map(
            $newPath['methods'],
            $oldPath,
            function (
                RequestInterface $request,
                ResponseInterface $response,
                array $args = []
            ) use (
                $newPath
            ) {
                if ($newPath['route'] === 404) {
                    return $response->withStatus(404);
                }

                $locale = isset($args['lang']) ? $args['lang'] : null;

                if ($newPath['data_key'] === null) {
                    if (is_array($newPath['route'])) {
                        $route = $this->translator()->translate($newPath['route'], [], null, $locale);
                        if ($route !== null) {
                            $newPath['route'] = $route;
                        } else {
                            $newPath['route'] = reset($newPath['route']);
                        }
                    }

                    return $response->withRedirect($newPath['route'], $newPath['status']);
                }

                if (!isset($newPath['ident'])) {
                    return $response->withStatus(404);
                }

                if (!empty($newPath[$newPath['data_key']])) {
                    $args = array_merge($newPath[$newPath['data_key']], $args);
                }

                $router = $this->get('router');
                if (isset($newPath[$newPath['data_key']]['route_endpoint'])) {
                    $endpoint = $this->translator()->translate(
                        $newPath[$newPath['data_key']]['route_endpoint'],
                        [],
                        null,
                        $locale
                    );

                    $args['route_endpoint'] = $endpoint;
                }

                $uri = $router->pathFor($newPath['ident'], $args);

                return $response->withRedirect($uri, $newPath['status']);
            }
        );
    }