Skip to content

Commit

Permalink
Replace XML routing file with bare PHP.
Browse files Browse the repository at this point in the history
  • Loading branch information
drupol committed Jun 29, 2020
1 parent 750e8e3 commit be0ab05
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Resources/config/routes/cas.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@

return static function (RoutingConfigurator $routes) {
$routes
->import('@CasBundle/Resources/config/routes/routing.xml')
->import('@CasBundle/Resources/config/routes/routes.php')
->prefix('/cas');
};
25 changes: 25 additions & 0 deletions src/Resources/config/routes/routes.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php

use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator;
use EcPhp\CasBundle\Controller\Homepage;
use EcPhp\CasBundle\Controller\Login;
use EcPhp\CasBundle\Controller\Logout;
use EcPhp\CasBundle\Controller\ProxyCallback;

return static function (RoutingConfigurator $routes) {
$routes
->add('cas_bundle_homepage', '/homepage')
->controller(Homepage::class);

$routes
->add('cas_bundle_login', '/login')
->controller(Login::class);

$routes
->add('cas_bundle_logout', '/logout')
->controller(Logout::class);

$routes
->add('cas_bundle_proxy_callback', '/proxy/callback')
->controller(ProxyCallback::class);
};
11 changes: 0 additions & 11 deletions src/Resources/config/routes/routing.xml

This file was deleted.

0 comments on commit be0ab05

Please sign in to comment.