3 namespace Drupal\Core\Routing;
5 use Symfony\Component\Routing\Route;
8 * A backwards compatibility route.
10 * When a route is deprecated for another one, and backwards compatibility is
11 * provided, then it's best practice to:
12 * - not duplicate all route definition metadata, to instead have an "as empty
14 * - have an accompanying outbound route processor, that overwrites this empty
15 * route definition with the redirected route's definition.
17 * @see \Drupal\rest\RouteProcessor\RestResourceGetRouteProcessorBC
19 class BcRoute extends Route {
24 public function __construct() {
25 parent::__construct('');
26 $this->setOption('bc_route', TRUE);