每当我尝试清除控制台上的缓存时,都会出现以下错误:
[Symfony\Component\DependencyInjection\Exception\InactiveScopeException]
You cannot create a service ("request") of an inactive scope ("request").
有谁之前经历过这个吗?谢谢。
编辑:代码示例:
//accessing request object
namespace Greg\TestBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\DependencyInjection\ContainerInterface;
use HvH\APIschemaBundle\Controller\Validation;
use HvH\APIschemaBundle\Controller\Helpers;
//FOSRestBundle
use FOS\RestBundle\View\View;
class TestController extends Controller
{
public function testAction(Request $request)
{
//get any query strings
$query_strings = $request->query->all();
return($query_strings);
}
}
XML 不确定您要查找的文件...