use Symfony\Component\HttpFoundation\Request; // Create a new request object $request = Request::createFromGlobals(); // Get the requested URI $uri = $request->getRequestUri(); // Get the request method (e.g. GET, POST, etc.) $method = $request->getMethod(); // Get the query parameters $queryParams = $request->query->all(); // Get the POST data $postData = $request->request->all();In the above example, we create a new Request object using the createFromGlobals method which automatically populates the object with data from the current request. We then demonstrate how to access various pieces of data from the request object, such as the requested URI, the request method, the query parameters and the POST data. The Symfony\Component\HttpFoundation package library provides PHP classes to manage HTTP requests and responses, such as Request, Response, Cookie, and HeaderBag.