Drupal 8 $ _get

//$_GET
$name = \Drupal::request()->query->get('name');

//$_POST
$name = \Drupal::request()->request->get('name'); // form param
Cooperative Cormorant