diff --git a/lib/classes/router.php b/lib/classes/router.php index 0529a18e611..c654042f22e 100644 --- a/lib/classes/router.php +++ b/lib/classes/router.php @@ -145,11 +145,6 @@ class router { protected function create_app( string $basepath = '', ): void { - global $CFG; - - // PHP Does not support autoloading functions. - require_once("{$CFG->libdir}/nikic/fast-route/src/functions.php"); - // Create an App using the DI Bridge. $this->app = router\bridge::create(); diff --git a/lib/classes/tests/route_testcase.php b/lib/classes/tests/route_testcase.php index 22b75459d86..ebac1da0390 100644 --- a/lib/classes/tests/route_testcase.php +++ b/lib/classes/tests/route_testcase.php @@ -175,13 +175,9 @@ abstract class route_testcase extends \advanced_testcase { * @return App */ protected function get_simple_app(): App { - global $CFG; - require_once("{$CFG->libdir}/nikic/fast-route/src/functions.php"); - $app = bridge::create( + return bridge::create( container: \core\di::get_container(), ); - - return $app; } /** diff --git a/lib/thirdpartylibs.xml b/lib/thirdpartylibs.xml index 00606308cc3..651c337f3c2 100644 --- a/lib/thirdpartylibs.xml +++ b/lib/thirdpartylibs.xml @@ -794,7 +794,7 @@ All rights reserved. https://github.com/php-di/invoker - slim + slim/slim Slim Framework 4.13.0 MIT