Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-30492

Cannot use fos:js-routing:dump command

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Medium
    • Resolution: Unresolved
    • Affects Version/s: 2.5.0
    • Fix Version/s: None
    • Component/s: Misc
    • Labels:
      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?

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              desorden Carlos Revillo
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: