also add php and xml:

````xml
<?xml version="1.0" encoding="UTF-8" ?>
<routes xmlns="http://symfony.com/schema/routing">

    <route id="remove_trailing_slash" path="/{url}/">
        <default key="_controller">AcmeDemoBundle:Default:removeTrailingSlash</default>
        <requirement key="url">.*/</requirement>
        <requirement key="_method">GET</requirement>
    </route>
</routes>
````

````php
use Symfony\Component\Routing\RouteCollection;
use Symfony\Component\Routing\Route;

$collection = new RouteCollection();
$collection->add('remove_trailing_slash', new Route('/{url}/', array(
    '_controller' => 'AcmeDemoBundle:Default:removeTrailingSlash',
), array(
    'url' => '.*/',
    '_method' => 'GET',
)));
````