Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not use dynamic REQUEST_URI from $_SERVER as base url #5652

Merged
merged 1 commit into from
Sep 8, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions components/routing/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ your autoloader to load the Routing component::
$routes = new RouteCollection();
$routes->add('route_name', $route);

$context = new RequestContext($_SERVER['REQUEST_URI']);
$context = new RequestContext('/');

$matcher = new UrlMatcher($routes, $context);

Expand Down Expand Up @@ -207,7 +207,7 @@ a certain route::
$routes = new RouteCollection();
$routes->add('show_post', new Route('/show/{slug}'));

$context = new RequestContext($_SERVER['REQUEST_URI']);
$context = new RequestContext('/');

$generator = new UrlGenerator($routes, $context);

Expand Down Expand Up @@ -327,7 +327,7 @@ automatically in the background if you want to use it. A basic example of the
:class:`Symfony\\Component\\Routing\\Router` class would look like::

$locator = new FileLocator(array(__DIR__));
$requestContext = new RequestContext($_SERVER['REQUEST_URI']);
$requestContext = new RequestContext('/');

$router = new Router(
new YamlFileLoader($locator),
Expand Down