Details
-
Bug
-
Resolution: Unresolved
-
Medium
-
None
-
2.5.0
-
None
Description
You get an error when trying to dump or debug fosJs related routes.
Error looks like
root@28ca2ab43009:/var/www/html# cat web/js/fos_js php bin/console fos:js-routing:dump Dumping exposed routes. [file+] /var/www/html/app/../web/js/fos_js_routes.js In ExposedRoutesExtractor.php line 28: Type error: Argument 2 passed to eZ\Bundle\EzPublishCoreBundle\Routing\JsRouting\ExposedRoutesExtractor::__construct() must be an instance of Symfony\Component\HttpFoundation\Request, null given, cal led in /tmp/ezplatformcache/var/cache/dev/ContainerLumgnoo/getEzpublish_JsRouting_ExtractorService.php on line 8 fos:js-routing:dump [--callback CALLBACK] [--target [TARGET]] [--locale [LOCALE]] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-e|--env ENV] [--no-debug] [--siteaccess [SITEACCESS]] [--] <command>
I think this is because there is no request when running the command from console.
Could it be an option to make the masterRequest param optional at https://github.com/ezsystems/ezpublish-kernel/blob/master/eZ/Bundle/EzPublishCoreBundle/Routing/JsRouting/ExposedRoutesExtractor.php#L28?