2

In Drupal 7, some part of hook_menu was used for routing and registering paths (That is what I have read).

I read an article about Drupal 8 and it said that one of the biggest changes in Drupal 8 is its routing system being ported to something called as Symfony HTTP kernel.

Why is this being done?

  • 1
    That's a lot of questions there - do you have one single, specific question to ask about the new routing system? I fear this will be closed as "too broad" fairly quickly in its current state. I would remove "why is this being done?" as that's not really a useful question for this site – Clive Oct 28 '13 at 11:14
  • 2
    You can the info about the same here: drupal.org/node/1800686 – Ankit Agrawal Oct 28 '13 at 11:15
  • 1
    Fair enough - I've removed the other 2 questions in that case. Don't be surprised if this still gets closed as 'too broad' or 'primarily opinion based', it's a rather speculative question. In a nutshell, the answer is because Symfony's routing system is proven, and the old hook_menu() was a confused mess that defined both routes and menu items in one place (bad for obvious reasons). – Clive Oct 28 '13 at 11:18
  • 2
    Things can work perfectly - it doesn't mean they can't be improved upon :) Think of the name: hook_menu() should only be for defining menus, it shouldn't have any responsibility for the routes that make up the paths behind those menu links. By using Symfony's routing system D8 gets a lot of best-practice stuff for free, while clearing up its own mess in hook_menu(). There's a lot of good info on the answer to this question – Clive Oct 28 '13 at 11:29
  • 1
    Actually, hook_menu was a performant, coherent solution that got replaced by a confusing mess of YAML files with different syntaxes and event subscribers built upon the unproven Symfony CMF... – user49 Oct 28 '13 at 18:59

Browse other questions tagged or ask your own question.