With Symfony 3.3, I have used this method and working fine.
I have 4 routes like
admin_category_index, admin_category_detail, admin_category_create, admin_category_update
And just one line make an active class for all routes.
<li {% if app.request.get('_route') starts with 'admin_category' %} class="active"{% endif %}>
<a href="{{ path('admin_category_index') }}">Product Categoires</a>
</li>