1
'login' => array(
    'type' => 'Literal',
    'options' => array(
        'route' => '/giris',
        'defaults' => array(
            'controller' => 'zfcuser',
            'action'     => 'login',
        ),
    ),
    'may_terminate' => true,
    'child_routes' => array(
        'provider' => array(
            'type' => 'Segment',
            'options' => array(
                'route' => '/:provider',
                'constraints' => array(
                    'provider' => '[a-zA-Z][a-zA-Z0-9_-]+',
                ),
                'defaults' => array(
                    'controller' => 'ScnSocialAuth-User',
                    'action' => 'provider-login',
                ),
            ),
        ),
        'query' => array(
            'type' => 'Query',
        ),
    ),
),

Giving message Deprecated: Query route deprecated as of ZF 2.1.4; use the "query" option of the HTTP router's assembling method instead in /opt/lampp/KendindenApp/vendor/zendframework/zendframework/library/Zend/Mvc/Router/Http/Query.php on line 21

It works fine When i remove this lines.

'query' => array(
    'type' => 'Query',
),
Nitin Kumar Soni
  • 198
  • 2
  • 16
  • Answer http://stackoverflow.com/questions/12785190/how-can-you-add-query-parameters-in-the-zf2-url-view-helper/15422349#15422349 – Dmitry Aug 21 '13 at 18:28

1 Answers1

3

We have deprecated the query route in ZF 2.1.4 for security reasons. For more details, please refer to http://framework.zend.com/security/advisory/ZF2013-01

DASPRiD
  • 1,673
  • 11
  • 16
  • 1
    Thats cool (the deprecation that is), but how can I set constraints and defaults for query parameters via the route configuration now? – elydelacruz Mar 24 '13 at 00:51
  • For this you can define type as segment in route configuration. [http://framework.zend.com/manual/2.0/en/modules/zend.mvc.routing.html#zend-mvc-router-http-segment](http://framework.zend.com/manual/2.0/en/modules/zend.mvc.routing.html#zend-mvc-router-http-segment) – Nitin Kumar Soni Sep 17 '13 at 09:48
  • @NitinKumarSoni, you linked to documentation for a version pre-deprecation! This could be very confusing. This link at least says deprecated - http://framework.zend.com/manual/2.1/en/modules/zend.mvc.routing.html#zend-mvc-router-http-segment – crempp Aug 07 '14 at 19:42