Closed simplyniceweb closed 9 years ago
Silex\Provider\UrlGeneratorServiceProvider it's removed from 2.0 version, you need to use a router class instead.
Any documentation about router class for silex? so i can work with silex 2.0?
Thanks!
The doc of Silex need updated! This promoting the framework.
For the 2.0 doc true, but for now still in development so you can use with warning :)
Yes @namaless, however, the page http://silex.sensiolabs.org/ need updated. Some thing changed from 2010.
I really do agree with @argentinaluiz. updated documentation is a must, updating into a newer version is useless if you can't apply it or not even knowing what's up with the updates or why i'm having such errors or warnings, this should be highlighted on the silex webpages e.g. changelogs, why, when, what or any alternatives etc.
@argentinaluiz @simplynice25 there is no release of the 2.0 branch yet, and therefor the documentation is up to date with the 1.x releases.
As far as i know there isnt really anything outdated documentation for the 1.x releases.
@henrikbjorn I think him talking about the date in the bottom of screen, the docs is updated btw.
Closing as the docs for 2.0 will be updated/published when it's ready. For now, people should use 1.2 or 1.3
Silex is now on 2.0 and there is zero documentation of the change.
For those stumbling across this, use:
$app->register(new Silex\Provider\RoutingServiceProvider());
Then you can access $app['url_generator']->generate('example')
.
@ThatGerber: thanks for the hint.
Even using $app->register(new Silex\Provider\RoutingServiceProvider());
there is no way to generate urls from a twig template.
Is there any fix for this?
@FedericoBiccheddu have you tried this : http://silex.sensiolabs.org/doc/2.0/providers/twig.html#symfony-components-integration ?
@mathroc yes, I did read it. The problem was a syntax error caused by my IDE.
Sorry for the unnecessary bump.
I tried to update silex into this version: "silex/silex": "2.0.*@dev" and after reloading the page i got a "class Silex\Provider\UrlGeneratorServiceProvider not found".
Any idea why?
Here's my composer: "silex/silex": "2.0.@dev", "symfony/config": "~2.3", "symfony/console": "~2.3", "symfony/monolog-bridge": "~2.3", "symfony/security": "~2.3", "symfony/translation": "~2.3", "symfony/twig-bridge": "~2.3", "twig/twig": ">=1.8,<2.0-dev", "symfony/yaml": "~2.4", "deralex/yaml-config-service-provider": "1.0.x-dev", "swiftmailer/swiftmailer": "5.3.@dev", "doctrine/dbal": "2.5.@dev", "doctrine/orm": "2.5.@dev", "doctrine/common": "2.5.@dev", "rhumsaa/uuid": "2.8.@dev"