|
@@ -120,13 +120,18 @@ class CoreController extends Controller
|
|
|
*
|
|
|
* NEXT_MAJOR: remove this method.
|
|
|
*
|
|
|
- * @deprecated Use the Request action argument. This method will be removed
|
|
|
- * in SonataAdminBundle 4.0 and the action methods adjusted
|
|
|
+ * @deprecated since 3.0, to be removed in 4.0 and action methods will be adjusted.
|
|
|
+ * Use Symfony\Component\HttpFoundation\Request as an action argument.
|
|
|
*
|
|
|
* @return Request
|
|
|
*/
|
|
|
public function getRequest()
|
|
|
{
|
|
|
+ @trigger_error('The '.__METHOD__.' method is deprecated since 3.0 and will be removed in 4.0.'.
|
|
|
+ ' Inject the Symfony\Component\HttpFoundation\Request into the actions instead.',
|
|
|
+ E_USER_DEPRECATED
|
|
|
+ );
|
|
|
+
|
|
|
if ($this->container->has('request_stack')) {
|
|
|
return $this->container->get('request_stack')->getCurrentRequest();
|
|
|
}
|