From a2860ac4b2fdaede1f23b3554d5c5b247d6728d9 Mon Sep 17 00:00:00 2001 From: Cauan Cabral Date: Mon, 29 Jun 2020 10:58:23 -0300 Subject: [PATCH] Move routes setup to routes.php Solve issue with plugin routes been loaded before App own routes ( https://github.com/cakephp/cakephp/issues/14744 ) --- config/{bootstrap.php => routes.php} | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename config/{bootstrap.php => routes.php} (82%) diff --git a/config/bootstrap.php b/config/routes.php similarity index 82% rename from config/bootstrap.php rename to config/routes.php index 5076ef1..c000885 100644 --- a/config/bootstrap.php +++ b/config/routes.php @@ -9,13 +9,13 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ use Cake\Core\Configure; -use Cake\Routing\Router; +use Cake\Routing\RouteBuilder; Configure::load('CakeDC/Auth.auth'); $oauthPath = Configure::read('OAuth.path'); if (is_array($oauthPath)) { - Router::scope('/auth', function ($routes) use ($oauthPath) { - $routes->connect( + $routes->scope('/auth', function (RouteBuilder $builder) use ($oauthPath) { + $builder->connect( '/:provider', $oauthPath, ['provider' => implode('|', array_keys(Configure::read('OAuth.providers')))]