使用Symfony HttpFoundation组件获取“GET”参数

I've started using SymfonyHttpFoundation Component in my projects ( not otherwise on Symfony) and have troubles retrieving GET values.

The relevant code is:

$Request=Symfony\Component\HttpFoundation\Request::createFromGlobals();
\Dev\Debug::dump($Request->query->get('action'));

This gets me a NULL ( \Dev\Debug::dump() is just a formatted wrapper for print_r)

The requested URL is:

http://[domainName]/compile.php?action=assets

The weird thing is 'though ( or maybe I am missing the point of the component) that is I create the Request ($Request=Symfony\Component\HttpFoundation\Request::createFromGlobals()), the requested URL doesn't show the get string anymore, it becomes:

http://[domainName]/compile.php

My question is - why is it returning a NULL value and why the GET parameters are removed from the URL?

Sorry, guys, problem solved. Went mad and this line escaped my sight:

header('location:http://'.$_SERVER['HTTP_HOST'].'/compile.php');

Obviously it was simply redirecting, without me noticing. And I simply jumped to conclusions that the new thing should be at fault.

Http Component working fine.