Comments (5)
What do you mean ?
from fosjsroutingbundle.
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.
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.
Please try again as I merged the PR fixing the command for the latest symfony changes
from fosjsroutingbundle.
Everything looks good now. :)
from fosjsroutingbundle.
Related Issues (20)
- Cannot use router in a Typescript Environment HOT 2
- Routing dump does not include port for local dev HOT 1
- Cannot use in typescript + vite environnement HOT 1
- Upgrade guide from v1?
- Importing route and prefix path issue
- webpack-inject-plugin.loader.js?id=webpack-inject-module-1!" contains a reference to the file "fos-router"
- Wrong route in dev env. missing index.php in route HOT 2
- Exception when a route name is a parsable number
- Error: spawn bin/console ENOENT HOT 7
- webpack-inject-plugin > loader-utils vulnerability HOT 4
- Routing isn't finding any routes HOT 2
- webpack problem /FosRouting.js" contains a reference to the file ....
- Symfony 6.3 deprecations
- Symfony 6.3 deprecations when dump routes HOT 1
- Overwriting php location causes console errors that --php is not a valid options
- Document how to install using AssetMapper HOT 10
- Session handling is incompatible with stateless routes introducted with Symfony 6.3
- Run webpack encore and execute php fos:js-routing:dump separately HOT 2
- Support Symfony 7 HOT 6
- 3.4.0 not working with Symfony 6.4 HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fosjsroutingbundle.