Giter Club home page Giter Club logo

Comments (5)

stof avatar stof commented on August 15, 2024

What do you mean ?

from fosjsroutingbundle.

nveid avatar nveid commented on August 15, 2024

Well.. None of my routes are resolving correctly, so I broke down to the console with a couple test commands using the app/console for:js-routing:debug command..
[ErrorException]
Warning: Illegal offset type in isset or empty in /Users/nveid/PhpstormProjects/redneck_sym/vendor/symfony/symfony/src/Symfony/Component/Routing/RouteCollection.php line 156

So then, I went there and i put a print_r() on the incoming $name argument.. It was an array, where it was trying to use an isset().. I then put an is_array() check right before ethe isset(), I then got a further problem at

Notice: Array to string conversion in /Users/nveid/PhpstormProjects/redneck_sym/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/RouterDebugCommand.php line 126

Also, giggles... I decided to use the command with no arguments and I got all this feedback..

Macapak:redneck_sym nveid$ app/console fos:js-routing:debug
[router] Current routes
PHP Fatal error: Call to undefined method Symfony\Component\Routing\CompiledRoute::getRequirements() in /Users/nveid/PhpstormProjects/redneck_sym/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/RouterDebugCommand.php on line 88
PHP Stack trace:
PHP 1. {main}() /Users/nveid/PhpstormProjects/redneck_sym/app/console:0
PHP 2. Symfony\Component\Console\Application->run() /Users/nveid/PhpstormProjects/redneck_sym/app/console:22
PHP 3. Symfony\Bundle\FrameworkBundle\Console\Application->doRun() /Users/nveid/PhpstormProjects/redneck_sym/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:106
PHP 4. Symfony\Component\Console\Application->doRun() /Users/nveid/PhpstormProjects/redneck_sym/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:78
PHP 5. Symfony\Component\Console\Command\Command->run() /Users/nveid/PhpstormProjects/redneck_sym/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:193
PHP 6. FOS\JsRoutingBundle\Command\RouterDebugExposedCommand->execute() /Users/nveid/PhpstormProjects/redneck_sym/vendor/symfony/symfony/src/Symfony/Component/Console/Command/Command.php:239
PHP 7. Symfony\Bundle\FrameworkBundle\Command\RouterDebugCommand->outputRoutes() /Users/nveid/PhpstormProjects/redneck_sym/vendor/friendsofsymfony/jsrouting-bundle/FOS/JsRoutingBundle/Command/RouterDebugExposedCommand.php:64

Fatal error: Call to undefined method Symfony\Component\Routing\CompiledRoute::getRequirements() in /Users/nveid/PhpstormProjects/redneck_sym/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/RouterDebugCommand.php on line 88

Call Stack:
0.0024 233360 1. {main}() /Users/nveid/PhpstormProjects/redneck_sym/app/console:0
0.0304 1666696 2. Symfony\Component\Console\Application->run() /Users/nveid/PhpstormProjects/redneck_sym/app/console:22
0.0356 1860280 3. Symfony\Bundle\FrameworkBundle\Console\Application->doRun() /Users/nveid/PhpstormProjects/redneck_sym/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:106
0.3660 13071000 4. Symfony\Component\Console\Application->doRun() /Users/nveid/PhpstormProjects/redneck_sym/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:78
0.3700 13072736 5. Symfony\Component\Console\Command\Command->run() /Users/nveid/PhpstormProjects/redneck_sym/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:193
0.3704 13076768 6. FOS\JsRoutingBundle\Command\RouterDebugExposedCommand->execute() /Users/nveid/PhpstormProjects/redneck_sym/vendor/symfony/symfony/src/Symfony/Component/Console/Command/Command.php:239
0.9010 23156032 7. Symfony\Bundle\FrameworkBundle\Command\RouterDebugCommand->outputRoutes() /Users/nveid/PhpstormProjects/redneck_sym/vendor/friendsofsymfony/jsrouting-bundle/FOS/JsRoutingBundle/Command/RouterDebugExposedCommand.php:64

So.. in the end I'm not sure if the problem is 2.1, or CMF.. I'm going to assume its a conflict with the CMF router because I saw some fixes related 2.1 in the git history here.

from fosjsroutingbundle.

nveid avatar nveid commented on August 15, 2024

Here's the array output from when I did a print_r that I spoke about earlier:

   Array  
  (
    [silvona_ziplookup_json] => Symfony\Component\Routing\CompiledRoute Object
      (
          [variables:Symfony\Component\Routing\CompiledRoute:private] => Array
            (
            )

        [tokens:Symfony\Component\Routing\CompiledRoute:private] => Array
            (
                [0] => Array
                    (
                        [0] => text
                        [1] => /location/ziplookup.json
                    )

            )

        [staticPrefix:Symfony\Component\Routing\CompiledRoute:private] => /location/ziplookup.json
        [regex:Symfony\Component\Routing\CompiledRoute:private] => #^/location/ziplookup\.json$#s
    )

)

from fosjsroutingbundle.

stof avatar stof commented on August 15, 2024

Please try again as I merged the PR fixing the command for the latest symfony changes

from fosjsroutingbundle.

nveid avatar nveid commented on August 15, 2024

Everything looks good now. :)

from fosjsroutingbundle.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.