diff --git a/core/includes/ajax.inc b/core/includes/ajax.inc
index d779bd95c7d45ade465267715255209640a79ad1..31fbfc6159b3f83a3f4d8429c1bb012f7a84aad6 100644
--- a/core/includes/ajax.inc
+++ b/core/includes/ajax.inc
@@ -94,7 +94,7 @@
  *   return $form;
  * }
  *
- * function ajax_example_simplest_callback($form, $form_state) {
+ * function ajax_example_simplest_callback($form, FormStateInterface $form_state) {
  *   // The form has already been submitted and updated. We can return the replaced
  *   // item as it is.
  *   return $form['replace_textfield'];
diff --git a/core/includes/form.inc b/core/includes/form.inc
index 7d01ceb04ab6bce8ce70b99ab12d0fcacf637a40..edc9afe82e7716b67cc64a643397db1b3aca35af 100644
--- a/core/includes/form.inc
+++ b/core/includes/form.inc
@@ -39,7 +39,7 @@ function form_get_cache($form_build_id, FormStateInterface $form_state) {
  *
  * @see \Drupal\Core\Form\FormBuilderInterface::setCache().
  */
-function form_set_cache($form_build_id, $form, $form_state) {
+function form_set_cache($form_build_id, $form, FormStateInterface $form_state) {
   \Drupal::formBuilder()->setCache($form_build_id, $form, $form_state);
 }
 
@@ -136,7 +136,7 @@ function drupal_process_form($form_id, &$form, FormStateInterface $form_state) {
  *
  * @see \Drupal\Core\Form\FormSubmitterInterface::redirectForm().
  */
-function drupal_redirect_form($form_state) {
+function drupal_redirect_form(FormStateInterface $form_state) {
   return \Drupal::service('form_submitter')->redirectForm($form_state);
 }
 
@@ -288,7 +288,7 @@ function form_state_values_clean(FormStateInterface $form_state) {
  *   The data that will appear in the $form_state['values'] collection
  *   for this element. Return nothing to use the default.
  */
-function form_type_image_button_value($form, $input, $form_state) {
+function form_type_image_button_value($form, $input, FormStateInterface $form_state) {
   if ($input !== FALSE) {
     if (!empty($input)) {
       // If we're dealing with Mozilla or Opera, we're lucky. It will
@@ -1172,7 +1172,7 @@ function form_pre_render_conditional_form_element($element) {
 /**
  * Processes a form button element.
  */
-function form_process_button($element, $form_state) {
+function form_process_button($element, FormStateInterface $form_state) {
   // If this is a button intentionally allowing incomplete form submission
   // (e.g., a "Previous" or "Add another item" button), then also skip
   // client-side validation.
@@ -1185,7 +1185,7 @@ function form_process_button($element, $form_state) {
 /**
  * Sets the #checked property of a checkbox element.
  */
-function form_process_checkbox($element, $form_state) {
+function form_process_checkbox($element, FormStateInterface $form_state) {
   $value = $element['#value'];
   $return_value = $element['#return_value'];
   // On form submission, the #value of an available and enabled checked
diff --git a/core/modules/book/book.module b/core/modules/book/book.module
index c791b68c49e4f8b6b20422af422165d445b0a92f..f98978ada61874f6780322abfc4fdc3ebc36318f 100644
--- a/core/modules/book/book.module
+++ b/core/modules/book/book.module
@@ -231,7 +231,7 @@ function book_pick_book_nojs_submit($form, FormStateInterface $form_state) {
  * @return
  *   The rendered parent page select element.
  */
-function book_form_update($form, $form_state) {
+function book_form_update($form, FormStateInterface $form_state) {
   return $form['book']['pid'];
 }
 
@@ -352,7 +352,7 @@ function book_node_prepare_form(NodeInterface $node, $operation, FormStateInterf
  *
  * @see node_delete_confirm()
  */
-function book_form_node_delete_confirm_alter(&$form, $form_state) {
+function book_form_node_delete_confirm_alter(&$form, FormStateInterface $form_state) {
   $node = node_load($form['nid']['#value']);
 
   if (isset($node->book) && $node->book['has_children']) {
diff --git a/core/modules/comment/comment.module b/core/modules/comment/comment.module
index d5391f366b3b8739d97d67c7e5328175adcbf829..406472b2fde3945566ef919d1195d3884aaa9b2c 100644
--- a/core/modules/comment/comment.module
+++ b/core/modules/comment/comment.module
@@ -489,7 +489,7 @@ function comment_view_multiple($comments, $view_mode = 'full', $langcode = NULL)
 /**
  * Implements hook_form_FORM_ID_alter() for field_ui_field_overview_form.
  */
-function comment_form_field_ui_field_overview_form_alter(&$form, $form_state) {
+function comment_form_field_ui_field_overview_form_alter(&$form, FormStateInterface $form_state) {
   $request = \Drupal::request();
   if ($form['#entity_type'] == 'comment' && $request->attributes->has('commented_entity_type')) {
     $form['#title'] = \Drupal::service('comment.manager')->getFieldUIPageTitle($request->attributes->get('commented_entity_type'), $request->attributes->get('field_name'));
@@ -504,7 +504,7 @@ function comment_form_field_ui_field_overview_form_alter(&$form, $form_state) {
 /**
  * Implements hook_form_FORM_ID_alter().
  */
-function comment_form_field_ui_form_display_overview_form_alter(&$form, $form_state) {
+function comment_form_field_ui_form_display_overview_form_alter(&$form, FormStateInterface $form_state) {
   $request = \Drupal::request();
   if ($form['#entity_type'] == 'comment' && $request->attributes->has('commented_entity_type')) {
     $form['#title'] = \Drupal::service('comment.manager')->getFieldUIPageTitle($request->attributes->get('commented_entity_type'), $request->attributes->get('field_name'));
@@ -514,7 +514,7 @@ function comment_form_field_ui_form_display_overview_form_alter(&$form, $form_st
 /**
  * Implements hook_form_FORM_ID_alter().
  */
-function comment_form_field_ui_display_overview_form_alter(&$form, $form_state) {
+function comment_form_field_ui_display_overview_form_alter(&$form, FormStateInterface $form_state) {
   $request = \Drupal::request();
   if ($form['#entity_type'] == 'comment' && $request->attributes->has('commented_entity_type')) {
     $form['#title'] = \Drupal::service('comment.manager')->getFieldUIPageTitle($request->attributes->get('commented_entity_type'), $request->attributes->get('field_name'));
@@ -524,7 +524,7 @@ function comment_form_field_ui_display_overview_form_alter(&$form, $form_state)
 /**
  * Implements hook_form_FORM_ID_alter().
  */
-function comment_form_field_ui_field_storage_edit_form_alter(&$form, $form_state) {
+function comment_form_field_ui_field_storage_edit_form_alter(&$form, FormStateInterface $form_state) {
   if ($form['#field']->getType() == 'comment') {
     // We only support posting one comment at the time so it doesn't make sense
     // to let the site builder choose anything else.
diff --git a/core/modules/content_translation/content_translation.module b/core/modules/content_translation/content_translation.module
index c79213a998f5dd5231e6fa82dca4ca5c4e17751a..9b43982f8b8587a97cd82eef98fe1c7272f23c62 100644
--- a/core/modules/content_translation/content_translation.module
+++ b/core/modules/content_translation/content_translation.module
@@ -376,7 +376,7 @@ function content_translation_controller($entity_type_id) {
  *
  * @todo Move to \Drupal\content_translation\ContentTranslationManager.
  */
-function content_translation_form_controller($form_state) {
+function content_translation_form_controller(FormStateInterface $form_state) {
   return isset($form_state['controller']) && $form_state['controller'] instanceof EntityFormInterface ? $form_state['controller'] : FALSE;
 }
 
diff --git a/core/modules/content_translation/src/ContentTranslationHandler.php b/core/modules/content_translation/src/ContentTranslationHandler.php
index d14a945d4f63fc001b8228b95f582c19124916ff..d7601e73d64a68076d2157e8cf717fa911ceb25e 100644
--- a/core/modules/content_translation/src/ContentTranslationHandler.php
+++ b/core/modules/content_translation/src/ContentTranslationHandler.php
@@ -76,7 +76,7 @@ public function getTranslationAccess(EntityInterface $entity, $op) {
   /**
    * {@inheritdoc}
    */
-  public function getSourceLangcode($form_state) {
+  public function getSourceLangcode(FormStateInterface $form_state) {
     return isset($form_state['content_translation']['source']) ? $form_state['content_translation']['source']->id : FALSE;
   }
 
@@ -288,7 +288,7 @@ public function entityFormAlter(array &$form, FormStateInterface $form_state, En
    *
    * @see \Drupal\content_translation\ContentTranslationHandler::entityFormAlter()
    */
-  public function entityFormSharedElements($element, $form_state, $form) {
+  public function entityFormSharedElements($element, FormStateInterface $form_state, $form) {
     static $ignored_types;
 
     // @todo Find a more reliable way to determine if a form element concerns a
diff --git a/core/modules/content_translation/src/ContentTranslationHandlerInterface.php b/core/modules/content_translation/src/ContentTranslationHandlerInterface.php
index 67c4d0d00e1cefd5534679205d7f84648d9fec1c..8d3d725ee625593b6175c950225219b55d31565c 100644
--- a/core/modules/content_translation/src/ContentTranslationHandlerInterface.php
+++ b/core/modules/content_translation/src/ContentTranslationHandlerInterface.php
@@ -44,7 +44,7 @@ public function getTranslationAccess(EntityInterface $entity, $op);
    * @return string
    *   The source language code.
    */
-  public function getSourceLangcode($form_state);
+  public function getSourceLangcode(FormStateInterface $form_state);
 
   /**
    * Marks translations as outdated.
diff --git a/core/modules/dblog/dblog.module b/core/modules/dblog/dblog.module
index c941c06b4482c4a9e6a8865eb1f476d580d7a5b9..41ed76afc5af9a651fd1d0fda7ddabb6a9c1f114 100644
--- a/core/modules/dblog/dblog.module
+++ b/core/modules/dblog/dblog.module
@@ -95,7 +95,7 @@ function _dblog_get_message_types() {
 /**
  * Implements hook_form_FORM_ID_alter() for system_logging_settings().
  */
-function dblog_form_system_logging_settings_alter(&$form, $form_state) {
+function dblog_form_system_logging_settings_alter(&$form, FormStateInterface $form_state) {
   $row_limits = array(100, 1000, 10000, 100000, 1000000);
   $form['dblog_row_limit'] = array(
     '#type' => 'select',
diff --git a/core/modules/editor/editor.module b/core/modules/editor/editor.module
index 4ee1dddfeabe2c04d8a076e02e46bf3c41fe0e8f..9aa349ab98d08c0d6bdfc65c1b0dbac772c4a82b 100644
--- a/core/modules/editor/editor.module
+++ b/core/modules/editor/editor.module
@@ -70,7 +70,7 @@ function editor_element_info() {
 /**
  * Implements hook_form_FORM_ID_alter().
  */
-function editor_form_filter_admin_overview_alter(&$form, $form_state) {
+function editor_form_filter_admin_overview_alter(&$form, FormStateInterface $form_state) {
   // @todo Cleanup column injection: http://drupal.org/node/1876718
   // Splice in the column for "Text editor" into the header.
   $position = array_search('name', $form['formats']['#header']) + 1;
diff --git a/core/modules/entity/src/Entity/EntityFormDisplay.php b/core/modules/entity/src/Entity/EntityFormDisplay.php
index 6457e236602a0db41691fe85aa270e83a7b4d6a9..cbaa689604f774b136b77a75f64d0dd13b8fd652 100644
--- a/core/modules/entity/src/Entity/EntityFormDisplay.php
+++ b/core/modules/entity/src/Entity/EntityFormDisplay.php
@@ -176,7 +176,7 @@ public function buildForm(ContentEntityInterface $entity, array &$form, FormStat
    *
    * @see \Drupal\entity\Entity\EntityFormDisplay::buildForm()
    */
-  public function processForm($element, $form_state, $form) {
+  public function processForm($element, FormStateInterface $form_state, $form) {
     // Assign the weights configured in the form display.
     foreach ($this->getComponents() as $name => $options) {
       if (isset($element[$name])) {
diff --git a/core/modules/entity_reference/entity_reference.module b/core/modules/entity_reference/entity_reference.module
index 6d4139b4f684c459842f6db6d765e15c8eb79828..75ab68c6cf997a096ad2ebfccb8e4a0003e17ddc 100644
--- a/core/modules/entity_reference/entity_reference.module
+++ b/core/modules/entity_reference/entity_reference.module
@@ -106,7 +106,7 @@ function entity_reference_field_storage_config_update(FieldStorageConfigInterfac
  *
  * @see entity_reference_field_instance_settings_form()
  */
-function _entity_reference_field_instance_settings_ajax_process($form, $form_state) {
+function _entity_reference_field_instance_settings_ajax_process($form, FormStateInterface $form_state) {
   _entity_reference_field_instance_settings_ajax_process_element($form, $form);
   return $form;
 }
@@ -158,7 +158,7 @@ function _entity_reference_element_validate_filter(&$element, FormStateInterface
  *
  * @see entity_reference_field_instance_settings_form()
  */
-function entity_reference_settings_ajax($form, $form_state) {
+function entity_reference_settings_ajax($form, FormStateInterface $form_state) {
   $trigger = $form_state['triggering_element'];
   return NestedArray::getValue($form, $trigger['#ajax']['element']);
 }
diff --git a/core/modules/field/tests/modules/field_third_party_test/field_third_party_test.module b/core/modules/field/tests/modules/field_third_party_test/field_third_party_test.module
index 5ac0d1c82457150d6f392d1126e7e9f757566465..8726b18b5dc5d6c537e777572f9dd5670d5eeded 100644
--- a/core/modules/field/tests/modules/field_third_party_test/field_third_party_test.module
+++ b/core/modules/field/tests/modules/field_third_party_test/field_third_party_test.module
@@ -1,9 +1,11 @@
 <?php
 
+use Drupal\Core\Form\FormStateInterface;
+
 /**
  * Implements hook_field_widget_third_party_settings_form().
  */
-function field_third_party_test_field_widget_third_party_settings_form(\Drupal\Core\Field\WidgetInterface $plugin, \Drupal\Core\Field\FieldDefinitionInterface $field_definition, $form_mode, $form, $form_state) {
+function field_third_party_test_field_widget_third_party_settings_form(\Drupal\Core\Field\WidgetInterface $plugin, \Drupal\Core\Field\FieldDefinitionInterface $field_definition, $form_mode, $form, FormStateInterface $form_state) {
   $element['field_test_widget_third_party_settings_form'] = array(
     '#type' => 'textfield',
     '#title' => t('3rd party widget settings form'),
@@ -23,7 +25,7 @@ function field_third_party_test_field_widget_settings_summary_alter(&$summary, $
 /**
  * Implements hook_field_formatter_third_party_settings_form().
  */
-function field_third_party_test_field_formatter_third_party_settings_form(\Drupal\Core\Field\FormatterInterface $plugin, \Drupal\Core\Field\FieldDefinitionInterface $field_definition, $view_mode, $form, $form_state) {
+function field_third_party_test_field_formatter_third_party_settings_form(\Drupal\Core\Field\FormatterInterface $plugin, \Drupal\Core\Field\FieldDefinitionInterface $field_definition, $view_mode, $form, FormStateInterface $form_state) {
   $element['field_test_field_formatter_third_party_settings_form'] = array(
     '#type' => 'textfield',
     '#title' => t('3rd party formatter settings form'),
diff --git a/core/modules/field_ui/field_ui.api.php b/core/modules/field_ui/field_ui.api.php
index b67d89b17b03a96496cff22665f496ed1d1fc82a..4e44c3a33f16e51b613ea344de9d8f138ef6dc41 100644
--- a/core/modules/field_ui/field_ui.api.php
+++ b/core/modules/field_ui/field_ui.api.php
@@ -29,7 +29,7 @@
  *
  * @see \Drupal\field_ui\DisplayOverView.
  */
-function hook_field_formatter_third_party_settings_form(\Drupal\Core\Field\FormatterInterface $plugin, \Drupal\Core\Field\FieldDefinitionInterface $field_definition, $view_mode, $form, $form_state) {
+function hook_field_formatter_third_party_settings_form(\Drupal\Core\Field\FormatterInterface $plugin, \Drupal\Core\Field\FieldDefinitionInterface $field_definition, $view_mode, $form, \Drupal\Core\Form\FormStateInterface $form_state) {
   $element = array();
   // Add a 'my_setting' checkbox to the settings form for 'foo_formatter' field
   // formatters.
@@ -62,7 +62,7 @@ function hook_field_formatter_third_party_settings_form(\Drupal\Core\Field\Forma
  *
  * @see \Drupal\field_ui\FormDisplayOverView.
  */
-function hook_field_widget_third_party_settings_form(\Drupal\Core\Field\WidgetInterface $plugin, \Drupal\Core\Field\FieldDefinitionInterface $field_definition, $form_mode, $form, $form_state) {
+function hook_field_widget_third_party_settings_form(\Drupal\Core\Field\WidgetInterface $plugin, \Drupal\Core\Field\FieldDefinitionInterface $field_definition, $form_mode, $form, \Drupal\Core\Form\FormStateInterface $form_state) {
   $element = array();
   // Add a 'my_setting' checkbox to the settings form for 'foo_widget' field
   // widgets.
diff --git a/core/modules/field_ui/field_ui.module b/core/modules/field_ui/field_ui.module
index 336b5877c649eb0849d1f89f88c2686d7022f246..7179a3acc5892201306cd74a2a2f2ed903ab67ee 100644
--- a/core/modules/field_ui/field_ui.module
+++ b/core/modules/field_ui/field_ui.module
@@ -149,7 +149,7 @@ function field_ui_entity_bundle_rename($entity_type, $bundle_old, $bundle_new) {
  * @see node_type_form()
  * @see field_ui_form_node_type_form_submit()
  */
-function field_ui_form_node_type_form_alter(&$form, $form_state) {
+function field_ui_form_node_type_form_alter(&$form, FormStateInterface $form_state) {
   // We want to display the button only on add page.
   if ($form_state['controller']->getEntity()->isNew()) {
     $form['actions']['save_continue'] = $form['actions']['submit'];
diff --git a/core/modules/file/src/Plugin/Field/FieldWidget/FileWidget.php b/core/modules/file/src/Plugin/Field/FieldWidget/FileWidget.php
index 9a03fe41d78fd25780dce6e8943e53962ffa9f5b..8778f80e7fc81d15d866ad2474e1d8e7e8edc36e 100644
--- a/core/modules/file/src/Plugin/Field/FieldWidget/FileWidget.php
+++ b/core/modules/file/src/Plugin/Field/FieldWidget/FileWidget.php
@@ -279,7 +279,7 @@ public function massageFormValues(array $values, array $form, FormStateInterface
    *
    * This method is assigned as a #value_callback in formElement() method.
    */
-  public static function value($element, $input = FALSE, $form_state) {
+  public static function value($element, $input = FALSE, FormStateInterface $form_state) {
     if ($input) {
       // Checkboxes lose their value when empty.
       // If the display field is present make sure its unchecked value is saved.
diff --git a/core/modules/locale/locale.module b/core/modules/locale/locale.module
index 7f40bf4a3509e6fcf7b19bfd0153ac4be191af32..8b5109652adb1bcbf9cf8485a5e7f0ba6bb3290b 100644
--- a/core/modules/locale/locale.module
+++ b/core/modules/locale/locale.module
@@ -711,7 +711,7 @@ function locale_form_language_admin_add_form_alter(&$form, FormStateInterface $f
  *
  * Set a batch for a newly-added language.
  */
-function locale_form_language_admin_add_form_alter_submit($form, $form_state) {
+function locale_form_language_admin_add_form_alter_submit($form, FormStateInterface $form_state) {
   if (\Drupal::config('locale.settings')->get('translation.import_enabled')) {
     if (empty($form_state['values']['predefined_langcode']) || $form_state['values']['predefined_langcode'] == 'custom') {
       $langcode = $form_state['values']['langcode'];
@@ -751,7 +751,7 @@ function locale_form_language_admin_edit_form_alter(&$form, FormStateInterface $
 /**
  * Form submission handler for language_admin_edit_form().
  */
-function locale_form_language_admin_edit_form_alter_submit($form, $form_state) {
+function locale_form_language_admin_edit_form_alter_submit($form, FormStateInterface $form_state) {
   \Drupal::config('locale.settings')->set('translate_english', intval($form_state['values']['locale_translate_english']))->save();
 }
 
@@ -770,7 +770,7 @@ function locale_translate_english() {
  *
  * Add interface translation directory setting to directories configuration.
  */
-function locale_form_system_file_system_settings_alter(&$form, $form_state) {
+function locale_form_system_file_system_settings_alter(&$form, FormStateInterface $form_state) {
   $form['translation_path'] = array(
     '#type' => 'textfield',
     '#title' => t('Interface translations directory'),
@@ -794,7 +794,7 @@ function locale_form_system_file_system_settings_alter(&$form, $form_state) {
  * changes. Without a translations directory local po files in the directory
  * should be ignored. The old translation status is no longer valid.
  */
-function locale_system_file_system_settings_submit(&$form, $form_state) {
+function locale_system_file_system_settings_submit(&$form, FormStateInterface $form_state) {
   if ($form['translation_path']['#default_value'] != $form_state['values']['translation_path']) {
     locale_translation_clear_status();
   }
diff --git a/core/modules/menu_ui/menu_ui.module b/core/modules/menu_ui/menu_ui.module
index efe5d0fb5c674b64af393d32592a7453701678a4..03c79c6dae0c45b0431c3806b843af347e9fcc41 100644
--- a/core/modules/menu_ui/menu_ui.module
+++ b/core/modules/menu_ui/menu_ui.module
@@ -317,7 +317,7 @@ function menu_ui_node_prepare_form(NodeInterface $node, $operation, FormStateInt
  *
  * @see menu_ui_node_submit()
  */
-function menu_ui_form_node_form_alter(&$form, $form_state) {
+function menu_ui_form_node_form_alter(&$form, FormStateInterface $form_state) {
   // Generate a list of possible parents (not including this link or descendants).
   // @todo This must be handled in a #process handler.
   $node = $form_state['controller']->getEntity();
@@ -407,7 +407,7 @@ function menu_ui_form_node_form_alter(&$form, $form_state) {
  *
  * @see menu_ui_form_node_form_alter()
  */
-function menu_ui_node_submit(EntityInterface $node, $form, $form_state) {
+function menu_ui_node_submit(EntityInterface $node, $form, FormStateInterface $form_state) {
   if (!empty($form_state['values']['menu'])) {
     $definition = $form_state['values']['menu'];
     if (empty($definition['enabled'])) {
@@ -441,7 +441,7 @@ function menu_ui_node_submit(EntityInterface $node, $form, $form_state) {
  * @see NodeTypeForm::form().
  * @see menu_ui_form_node_type_form_submit().
  */
-function menu_ui_form_node_type_form_alter(&$form, $form_state) {
+function menu_ui_form_node_type_form_alter(&$form, FormStateInterface $form_state) {
   /** @var \Drupal\Core\Menu\MenuParentFormSelectorInterface $menu_parent_selector */
   $menu_parent_selector = \Drupal::service('menu.parent_form_selector');
   $menu_options = menu_ui_get_menus();
@@ -493,7 +493,7 @@ function menu_ui_form_node_type_form_alter(&$form, $form_state) {
  *
  * @see menu_ui_form_node_type_form_alter().
  */
-function menu_ui_form_node_type_form_submit(&$form, $form_state) {
+function menu_ui_form_node_type_form_submit(&$form, FormStateInterface $form_state) {
   $type = $form_state['controller']->getEntity();
   \Drupal::config('menu.entity.node.' . $type->id())
     ->set('available_menus', array_values(array_filter($form_state['values']['menu_options'])))
diff --git a/core/modules/node/src/Plugin/Search/NodeSearch.php b/core/modules/node/src/Plugin/Search/NodeSearch.php
index 45e34b82f2534375dc91cffafb01e19d61908f30..d595d160fd8b9f86be575472fe25da2654bcf7cc 100644
--- a/core/modules/node/src/Plugin/Search/NodeSearch.php
+++ b/core/modules/node/src/Plugin/Search/NodeSearch.php
@@ -480,7 +480,7 @@ public function searchFormAlter(array &$form, FormStateInterface $form_state) {
   /*
    * {@inheritdoc}
    */
-  public function buildSearchUrlQuery($form_state) {
+  public function buildSearchUrlQuery(FormStateInterface $form_state) {
     // Read keyword and advanced search information from the form values,
     // and put these into the GET parameters.
     $keys = trim($form_state['values']['keys']);
diff --git a/core/modules/path/path.module b/core/modules/path/path.module
index 8721d5e9ac846346fef60a5ec0bb4ad82d0b7de3..7c4877253c2df0d9914b78467e318efea8645ed1 100644
--- a/core/modules/path/path.module
+++ b/core/modules/path/path.module
@@ -9,6 +9,7 @@
 use Drupal\Core\Entity\EntityInterface;
 use Drupal\Core\Entity\ContentEntityInterface;
 use Drupal\Core\Field\FieldDefinition;
+use Drupal\Core\Form\FormStateInterface;
 use Drupal\Core\Routing\RouteMatchInterface;
 
 /**
@@ -54,7 +55,7 @@ function path_permission() {
 /**
  * Implements hook_form_BASE_FORM_ID_alter() for node_form().
  */
-function path_form_node_form_alter(&$form, $form_state) {
+function path_form_node_form_alter(&$form, FormStateInterface $form_state) {
   $node = $form_state['controller']->getEntity();
   if ($node->hasField('path') && $node->get('path')->access('edit')) {
     $form['path_settings'] = array(
diff --git a/core/modules/search/src/Plugin/SearchInterface.php b/core/modules/search/src/Plugin/SearchInterface.php
index 34c9d4f640810a30e429a29309f5f7203361646d..6eabf18b8ed4cf0b4b47a1697f206dea8eb56324 100644
--- a/core/modules/search/src/Plugin/SearchInterface.php
+++ b/core/modules/search/src/Plugin/SearchInterface.php
@@ -120,6 +120,6 @@ public function searchFormAlter(array &$form, FormStateInterface $form_state);
    *
    * @see SearchInterface::searchFormAlter()
    */
-  public function buildSearchUrlQuery($form_state);
+  public function buildSearchUrlQuery(FormStateInterface $form_state);
 
 }
diff --git a/core/modules/search/src/Plugin/SearchPluginBase.php b/core/modules/search/src/Plugin/SearchPluginBase.php
index 9a553ccee3022362edef17ef308df24d83d1d1c8..bf208dcb7fb1c1b1e1b4e95f10f86057155d2c0a 100644
--- a/core/modules/search/src/Plugin/SearchPluginBase.php
+++ b/core/modules/search/src/Plugin/SearchPluginBase.php
@@ -112,7 +112,7 @@ public function searchFormAlter(array &$form, FormStateInterface $form_state) {
   /*
    * {@inheritdoc}
    */
-  public function buildSearchUrlQuery($form_state) {
+  public function buildSearchUrlQuery(FormStateInterface $form_state) {
     // Grab the keywords entered in the form and put them as 'keys' in the GET.
     $keys = trim($form_state['values']['keys']);
     $query = array('keys' => $keys);
diff --git a/core/modules/system/src/Form/ModulesListForm.php b/core/modules/system/src/Form/ModulesListForm.php
index b12c4d2dda53d43c765afd0aa21dec6148c79ac1..c8fe3018835e24478f62f5b785a6b05cbd2eedcd 100644
--- a/core/modules/system/src/Form/ModulesListForm.php
+++ b/core/modules/system/src/Form/ModulesListForm.php
@@ -415,7 +415,7 @@ protected function buildRow(array $modules, Extension $module, $distribution) {
    * @return array
    *   An array of modules to install and their dependencies.
    */
-  protected function buildModuleList($form_state) {
+  protected function buildModuleList(FormStateInterface $form_state) {
     $packages = $form_state['values']['modules'];
 
     // Build a list of modules to install.
diff --git a/core/modules/system/tests/modules/ajax_forms_test/ajax_forms_test.module b/core/modules/system/tests/modules/ajax_forms_test/ajax_forms_test.module
index 8f8719a7152b2cc892fd6cd8c0355fc0b2cd6132..bc97fe6942ceb33851bb76b5e736f3b169859abd 100644
--- a/core/modules/system/tests/modules/ajax_forms_test/ajax_forms_test.module
+++ b/core/modules/system/tests/modules/ajax_forms_test/ajax_forms_test.module
@@ -12,7 +12,7 @@
 /**
  * Ajax form callback: Selects 'after'.
  */
-function ajax_forms_test_advanced_commands_after_callback($form, $form_state) {
+function ajax_forms_test_advanced_commands_after_callback($form, FormStateInterface $form_state) {
   $selector = '#after_div';
 
   $response = new AjaxResponse();
@@ -23,7 +23,7 @@ function ajax_forms_test_advanced_commands_after_callback($form, $form_state) {
 /**
  * Ajax form callback: Selects 'alert'.
  */
-function ajax_forms_test_advanced_commands_alert_callback($form, $form_state) {
+function ajax_forms_test_advanced_commands_alert_callback($form, FormStateInterface $form_state) {
   $response = new AjaxResponse();
   $response->addCommand(new Ajax\AlertCommand('Alert'));
   return $response;
@@ -32,7 +32,7 @@ function ajax_forms_test_advanced_commands_alert_callback($form, $form_state) {
 /**
  * Ajax form callback: Selects 'append'.
  */
-function ajax_forms_test_advanced_commands_append_callback($form, $form_state) {
+function ajax_forms_test_advanced_commands_append_callback($form, FormStateInterface $form_state) {
   $selector = '#append_div';
   $response = new AjaxResponse();
   $response->addCommand(new Ajax\AppendCommand($selector, "Appended text"));
@@ -42,7 +42,7 @@ function ajax_forms_test_advanced_commands_append_callback($form, $form_state) {
 /**
  * Ajax form callback: Selects 'before'.
  */
-function ajax_forms_test_advanced_commands_before_callback($form, $form_state) {
+function ajax_forms_test_advanced_commands_before_callback($form, FormStateInterface $form_state) {
   $selector = '#before_div';
   $response = new AjaxResponse();
   $response->addCommand(new Ajax\BeforeCommand($selector, "Before text"));
@@ -52,7 +52,7 @@ function ajax_forms_test_advanced_commands_before_callback($form, $form_state) {
 /**
  * Ajax form callback: Selects 'changed'.
  */
-function ajax_forms_test_advanced_commands_changed_callback($form, $form_state) {
+function ajax_forms_test_advanced_commands_changed_callback($form, FormStateInterface $form_state) {
   $response = new AjaxResponse();
   $response->addCommand(new Ajax\ChangedCommand('#changed_div'));
   return $response;
@@ -61,7 +61,7 @@ function ajax_forms_test_advanced_commands_changed_callback($form, $form_state)
 /**
  * Ajax form callback: Selects 'changed' with asterisk marking inner div.
  */
-function ajax_forms_test_advanced_commands_changed_asterisk_callback($form, $form_state) {
+function ajax_forms_test_advanced_commands_changed_asterisk_callback($form, FormStateInterface $form_state) {
   $response = new AjaxResponse();
   $response->addCommand(new Ajax\ChangedCommand('#changed_div', '#changed_div_mark_this'));
   return $response;
@@ -70,7 +70,7 @@ function ajax_forms_test_advanced_commands_changed_asterisk_callback($form, $for
 /**
  * Ajax form callback: Selects 'css'.
  */
-function ajax_forms_test_advanced_commands_css_callback($form, $form_state) {
+function ajax_forms_test_advanced_commands_css_callback($form, FormStateInterface $form_state) {
   $selector = '#css_div';
   $color = 'blue';
 
@@ -82,7 +82,7 @@ function ajax_forms_test_advanced_commands_css_callback($form, $form_state) {
 /**
  * Ajax form callback: Selects 'data'.
  */
-function ajax_forms_test_advanced_commands_data_callback($form, $form_state) {
+function ajax_forms_test_advanced_commands_data_callback($form, FormStateInterface $form_state) {
   $selector = '#data_div';
   $response = new AjaxResponse();
   $response->addCommand(new Ajax\DataCommand($selector, 'testkey', 'testvalue'));
@@ -92,7 +92,7 @@ function ajax_forms_test_advanced_commands_data_callback($form, $form_state) {
 /**
  * Ajax form callback: Selects 'invoke'.
  */
-function ajax_forms_test_advanced_commands_invoke_callback($form, $form_state) {
+function ajax_forms_test_advanced_commands_invoke_callback($form, FormStateInterface $form_state) {
   $response = new AjaxResponse();
   $response->addCommand(new Ajax\InvokeCommand('#invoke_div', 'addClass', array('error')));
   return $response;
@@ -101,7 +101,7 @@ function ajax_forms_test_advanced_commands_invoke_callback($form, $form_state) {
 /**
  * Ajax form callback: Selects 'html'.
  */
-function ajax_forms_test_advanced_commands_html_callback($form, $form_state) {
+function ajax_forms_test_advanced_commands_html_callback($form, FormStateInterface $form_state) {
   $response = new AjaxResponse();
   $response->addCommand(new Ajax\HtmlCommand('#html_div', 'replacement text'));
   return $response;
@@ -110,7 +110,7 @@ function ajax_forms_test_advanced_commands_html_callback($form, $form_state) {
 /**
  * Ajax form callback: Selects 'insert'.
  */
-function ajax_forms_test_advanced_commands_insert_callback($form, $form_state) {
+function ajax_forms_test_advanced_commands_insert_callback($form, FormStateInterface $form_state) {
   $response = new AjaxResponse();
   $response->addCommand(new Ajax\InsertCommand('#insert_div', 'insert replacement text'));
   return $response;
@@ -119,7 +119,7 @@ function ajax_forms_test_advanced_commands_insert_callback($form, $form_state) {
 /**
  * Ajax form callback: Selects 'prepend'.
  */
-function ajax_forms_test_advanced_commands_prepend_callback($form, $form_state) {
+function ajax_forms_test_advanced_commands_prepend_callback($form, FormStateInterface $form_state) {
   $response = new AjaxResponse();
   $response->addCommand(new Ajax\PrependCommand('#prepend_div', "prepended text"));
   return $response;
@@ -128,7 +128,7 @@ function ajax_forms_test_advanced_commands_prepend_callback($form, $form_state)
 /**
  * Ajax form callback: Selects 'remove'.
  */
-function ajax_forms_test_advanced_commands_remove_callback($form, $form_state) {
+function ajax_forms_test_advanced_commands_remove_callback($form, FormStateInterface $form_state) {
   $response = new AjaxResponse();
   $response->addCommand(new Ajax\RemoveCommand('#remove_text'));
   return $response;
@@ -137,7 +137,7 @@ function ajax_forms_test_advanced_commands_remove_callback($form, $form_state) {
 /**
  * Ajax form callback: Selects 'restripe'.
  */
-function ajax_forms_test_advanced_commands_restripe_callback($form, $form_state) {
+function ajax_forms_test_advanced_commands_restripe_callback($form, FormStateInterface $form_state) {
   $response = new AjaxResponse();
   $response->addCommand(new Ajax\RestripeCommand('#restripe_table'));
   return $response;
@@ -146,7 +146,7 @@ function ajax_forms_test_advanced_commands_restripe_callback($form, $form_state)
 /**
  * Ajax form callback: Selects 'settings'.
  */
-function ajax_forms_test_advanced_commands_settings_callback($form, $form_state) {
+function ajax_forms_test_advanced_commands_settings_callback($form, FormStateInterface $form_state) {
   $setting['ajax_forms_test']['foo'] = 42;
   $response = new AjaxResponse();
   $response->addCommand(new Ajax\SettingsCommand($setting));
@@ -156,7 +156,7 @@ function ajax_forms_test_advanced_commands_settings_callback($form, $form_state)
 /**
  * Ajax callback for 'add_css'.
  */
-function ajax_forms_test_advanced_commands_add_css_callback($form, $form_state) {
+function ajax_forms_test_advanced_commands_add_css_callback($form, FormStateInterface $form_state) {
   $response = new AjaxResponse();
   $response->addCommand(new Ajax\AddCssCommand('my/file.css'));
   return $response;
@@ -165,7 +165,7 @@ function ajax_forms_test_advanced_commands_add_css_callback($form, $form_state)
 /**
  * Ajax callback for 'settings' but with setting overrides.
  */
-function ajax_forms_test_advanced_commands_settings_with_merging_callback($form, $form_state) {
+function ajax_forms_test_advanced_commands_settings_with_merging_callback($form, FormStateInterface $form_state) {
   $attached = array(
     '#attached' => array(
       'js' => array(
@@ -189,7 +189,7 @@ function ajax_forms_test_advanced_commands_settings_with_merging_callback($form,
 /**
  * Ajax form callback: Selects the 'drivertext' element of the validation form.
  */
-function ajax_forms_test_validation_form_callback($form, $form_state) {
+function ajax_forms_test_validation_form_callback($form, FormStateInterface $form_state) {
   drupal_set_message("ajax_forms_test_validation_form_callback invoked");
   drupal_set_message(t("Callback: drivertext=%drivertext, spare_required_field=%spare_required_field", array('%drivertext' => $form_state['values']['drivertext'], '%spare_required_field' => $form_state['values']['spare_required_field'])));
   return '<div id="message_area">ajax_forms_test_validation_form_callback at ' . date('c') . '</div>';
@@ -198,7 +198,7 @@ function ajax_forms_test_validation_form_callback($form, $form_state) {
 /**
  * Ajax form callback: Selects the 'drivernumber' element of the validation form.
  */
-function ajax_forms_test_validation_number_form_callback($form, $form_state) {
+function ajax_forms_test_validation_number_form_callback($form, FormStateInterface $form_state) {
   drupal_set_message("ajax_forms_test_validation_number_form_callback invoked");
   drupal_set_message(t("Callback: drivernumber=%drivernumber, spare_required_field=%spare_required_field", array('%drivernumber' => $form_state['values']['drivernumber'], '%spare_required_field' => $form_state['values']['spare_required_field'])));
   return '<div id="message_area_number">ajax_forms_test_validation_number_form_callback at ' . date('c') . '</div>';
diff --git a/core/modules/system/tests/modules/ajax_forms_test/src/Callbacks.php b/core/modules/system/tests/modules/ajax_forms_test/src/Callbacks.php
index 03f990248c19b81598b7042ca6ecbd6daf07393e..e983097338566a3678459fd52b4e8c8081715a4b 100644
--- a/core/modules/system/tests/modules/ajax_forms_test/src/Callbacks.php
+++ b/core/modules/system/tests/modules/ajax_forms_test/src/Callbacks.php
@@ -10,6 +10,7 @@
 use Drupal\Core\Ajax\AjaxResponse;
 use Drupal\Core\Ajax\DataCommand;
 use Drupal\Core\Ajax\HtmlCommand;
+use Drupal\Core\Form\FormStateInterface;
 
 /**
  * Simple object for testing methods as Ajax callbacks.
@@ -19,7 +20,7 @@ class Callbacks {
   /**
    * Ajax callback triggered by select.
    */
-  function selectCallback($form, $form_state) {
+  function selectCallback($form, FormStateInterface $form_state) {
     $response = new AjaxResponse();
     $response->addCommand(new HtmlCommand('#ajax_selected_color', $form_state['values']['select']));
     $response->addCommand(new DataCommand('#ajax_selected_color', 'form_state_value_select', $form_state['values']['select']));
@@ -29,7 +30,7 @@ function selectCallback($form, $form_state) {
   /**
    * Ajax callback triggered by checkbox.
    */
-  function checkboxCallback($form, $form_state) {
+  function checkboxCallback($form, FormStateInterface $form_state) {
     $response = new AjaxResponse();
     $response->addCommand(new HtmlCommand('#ajax_checkbox_value', (int) $form_state['values']['checkbox']));
     $response->addCommand(new DataCommand('#ajax_checkbox_value', 'form_state_value_select', (int) $form_state['values']['checkbox']));
diff --git a/core/modules/system/tests/modules/form_test/src/Form/FormTestTableSelectFormBase.php b/core/modules/system/tests/modules/form_test/src/Form/FormTestTableSelectFormBase.php
index c5186e2e7128e46664ee068517c092099ddf4d20..f618c92cce32040c3d539e4129142423afa53cbe 100644
--- a/core/modules/system/tests/modules/form_test/src/Form/FormTestTableSelectFormBase.php
+++ b/core/modules/system/tests/modules/form_test/src/Form/FormTestTableSelectFormBase.php
@@ -8,6 +8,7 @@
 namespace Drupal\form_test\Form;
 
 use Drupal\Core\Form\FormBase;
+use Drupal\Core\Form\FormStateInterface;
 
 /**
  * Provides a base class for tableselect forms.
@@ -27,7 +28,7 @@ abstract class FormTestTableSelectFormBase extends FormBase {
    * @return array
    *   A form with a tableselect element and a submit button.
    */
-  function tableselectFormBuilder($form, $form_state, $element_properties) {
+  function tableselectFormBuilder($form, FormStateInterface $form_state, $element_properties) {
     list($header, $options) = _form_test_tableselect_get_data();
 
     $form['tableselect'] = $element_properties;
diff --git a/core/modules/update/update.module b/core/modules/update/update.module
index ec3e1b4e10576c5fbf39c8d4ca07c1e461cbc389..0ce90b4985686f547e17db00f119a5af3dcfc01b 100644
--- a/core/modules/update/update.module
+++ b/core/modules/update/update.module
@@ -258,7 +258,7 @@ function update_themes_disabled($themes) {
  *
  * @see _update_cache_clear()
  */
-function update_form_system_modules_alter(&$form, $form_state) {
+function update_form_system_modules_alter(&$form, FormStateInterface $form_state) {
   $form['#submit'][] = 'update_storage_clear_submit';
 }
 
diff --git a/core/modules/views/src/Form/ViewsForm.php b/core/modules/views/src/Form/ViewsForm.php
index ac88a11ac0c5f20ae407d162fabfd5ef3d7170fb..2273f9009b0e74c16e6ec4c9fad7a5eeaaaca5b5 100644
--- a/core/modules/views/src/Form/ViewsForm.php
+++ b/core/modules/views/src/Form/ViewsForm.php
@@ -169,7 +169,7 @@ public function submitForm(array &$form, FormStateInterface $form_state) {
    * @return \Drupal\Core\Form\FormInterface
    *   The form object to use.
    */
-  protected function getFormObject($form_state) {
+  protected function getFormObject(FormStateInterface $form_state) {
     // If this is a class, instantiate it.
     $form_step_class = isset($form_state['step_controller'][$form_state['step']]) ? $form_state['step_controller'][$form_state['step']] : 'Drupal\views\Form\ViewsFormMainForm';
     return $this->classResolver->getInstanceFromDefinition($form_step_class);
diff --git a/core/modules/views/src/Plugin/views/wizard/WizardPluginBase.php b/core/modules/views/src/Plugin/views/wizard/WizardPluginBase.php
index 3c55b1a1a322e9dcd1c1d44326c8cc40aff02f2d..4a6d31e4015eabfb2f6f970ea98f2aefdbe31277 100644
--- a/core/modules/views/src/Plugin/views/wizard/WizardPluginBase.php
+++ b/core/modules/views/src/Plugin/views/wizard/WizardPluginBase.php
@@ -484,7 +484,7 @@ public function buildForm(array $form, FormStateInterface $form_state) {
    *   it back into $element['#default_value'] so that the form will be rendered
    *   with the correct value selected.
    */
-  public static function getSelected($form_state, $parents, $default_value, $element) {
+  public static function getSelected(FormStateInterface $form_state, $parents, $default_value, $element) {
     // For now, don't trust this to work on anything but a #select element.
     if (!isset($element['#type']) || $element['#type'] != 'select' || !isset($element['#options'])) {
       return $default_value;
@@ -674,7 +674,7 @@ protected function instantiateView($form, FormStateInterface $form_state) {
    *   An array whose keys are the names of each display and whose values are
    *   arrays of options for that display.
    */
-  protected function buildDisplayOptions($form, $form_state) {
+  protected function buildDisplayOptions($form, FormStateInterface $form_state) {
     // Display: Master
     $display_options['default'] = $this->defaultDisplayOptions();
     $display_options['default'] += array(
@@ -705,7 +705,7 @@ protected function buildDisplayOptions($form, $form_state) {
   /**
    * Alters the full array of display options before they are added to the view.
    */
-  protected function alterDisplayOptions(&$display_options, $form, $form_state) {
+  protected function alterDisplayOptions(&$display_options, $form, FormStateInterface $form_state) {
     foreach ($display_options as $display_type => $options) {
       // Allow style plugins to hook in and provide some settings.
       $style_plugin = Views::pluginManager('style')->createInstance($options['style']['type']);
@@ -716,7 +716,7 @@ protected function alterDisplayOptions(&$display_options, $form, $form_state) {
   /**
    * Adds the array of display options to the view, with appropriate overrides.
    */
-  protected function addDisplays(View $view, $display_options, $form, $form_state) {
+  protected function addDisplays(View $view, $display_options, $form, FormStateInterface $form_state) {
     // Initialize and store the view executable to get the display plugin
     // instances.
     $executable = $view->getExecutable();
@@ -830,7 +830,7 @@ protected function defaultDisplayOptions() {
    *   An array of filter arrays keyed by ID. A sort array contains the options
    *   accepted by a filter handler.
    */
-  protected function defaultDisplayFilters($form, $form_state) {
+  protected function defaultDisplayFilters($form, FormStateInterface $form_state) {
     $filters = array();
 
     // Add any filters provided by the plugin.
@@ -915,7 +915,7 @@ protected function defaultDisplayFiltersUser(array $form, FormStateInterface $fo
    *   An array of sort arrays keyed by ID. A sort array contains the options
    *   accepted by a sort handler.
    */
-  protected function defaultDisplaySorts($form, $form_state) {
+  protected function defaultDisplaySorts($form, FormStateInterface $form_state) {
     $sorts = array();
 
     // Add any sorts provided by the plugin.
@@ -941,7 +941,7 @@ protected function defaultDisplaySorts($form, $form_state) {
    *   An array of sort arrays keyed by ID. A sort array contains the options
    *   accepted by a sort handler.
    */
-  protected function defaultDisplaySortsUser($form, $form_state) {
+  protected function defaultDisplaySortsUser($form, FormStateInterface $form_state) {
     $sorts = array();
 
     // Don't add a sort if there is no form value or the user set the sort to
@@ -1056,7 +1056,7 @@ protected function blockDisplayOptions(array $form, FormStateInterface $form_sta
    * @return array
    *   Returns an array of display options.
    */
-  protected function pageFeedDisplayOptions($form, $form_state) {
+  protected function pageFeedDisplayOptions($form, FormStateInterface $form_state) {
     $display_options = array();
     $display_options['pager']['type'] = 'some';
     $display_options['style'] = array('type' => 'rss');
diff --git a/core/modules/views_ui/admin.inc b/core/modules/views_ui/admin.inc
index 504e93cfc5671da9f8b1cdace737a89f8ae11bfd..fd9b1b1787a83306176ae8736aacc1a9b9378fe3 100644
--- a/core/modules/views_ui/admin.inc
+++ b/core/modules/views_ui/admin.inc
@@ -193,7 +193,7 @@ function views_ui_add_ajax_wrapper($element, FormStateInterface $form_state) {
  * @return
  *   The part of the form that has changed.
  */
-function views_ui_ajax_update_form($form, $form_state) {
+function views_ui_ajax_update_form($form, FormStateInterface $form_state) {
   // The region that needs to be updated was stored in a property of the
   // triggering element by views_ui_add_ajax_trigger(), so all we have to do is
   // retrieve that here.
@@ -325,7 +325,7 @@ function views_ui_standard_display_dropdown(&$form, FormStateInterface $form_sta
  * Create the menu path for one of our standard AJAX forms based upon known
  * information about the form.
  */
-function views_ui_build_form_path($form_state) {
+function views_ui_build_form_path(FormStateInterface $form_state) {
   $ajax = empty($form_state['ajax']) ? 'nojs' : 'ajax';
   $name = $form_state['view']->id();
   $path = "admin/structure/views/$ajax/$form_state[form_key]/$name/$form_state[display_id]";
diff --git a/core/modules/views_ui/src/ViewUI.php b/core/modules/views_ui/src/ViewUI.php
index faa7507a3ec99ea10657a016ef837a5520ddacda..8909c139826c8074666d036001044bdce5c96613 100644
--- a/core/modules/views_ui/src/ViewUI.php
+++ b/core/modules/views_ui/src/ViewUI.php
@@ -399,7 +399,7 @@ public function getStandardButtons(&$form, FormStateInterface $form_state, $form
   /**
    * Return the was_defaulted, is_defaulted and revert state of a form.
    */
-  public function getOverrideValues($form, $form_state) {
+  public function getOverrideValues($form, FormStateInterface $form_state) {
     // Make sure the dropdown exists in the first place.
     if (isset($form_state['values']['override']['dropdown'])) {
       // #default_value is used to determine whether it was the default value or not.
diff --git a/core/profiles/minimal/minimal.profile b/core/profiles/minimal/minimal.profile
index ed291da4d912bdc526379c0a9f2a2f0d0c208f29..4f6570a21a4fc8fa91f03ae2e2d692d5583b66f5 100644
--- a/core/profiles/minimal/minimal.profile
+++ b/core/profiles/minimal/minimal.profile
@@ -4,12 +4,14 @@
  * Enables modules and site configuration for a minimal site installation.
  */
 
+use Drupal\Core\Form\FormStateInterface;
+
 /**
  * Implements hook_form_FORM_ID_alter() for install_configure_form().
  *
  * Allows the profile to alter the site configuration form.
  */
-function minimal_form_install_configure_form_alter(&$form, $form_state) {
+function minimal_form_install_configure_form_alter(&$form, FormStateInterface $form_state) {
   // Pre-populate the site name with the server name.
   $form['site_information']['site_name']['#default_value'] = \Drupal::request()->server->get('SERVER_NAME');
 }
diff --git a/core/profiles/standard/standard.profile b/core/profiles/standard/standard.profile
index 209107d1953dde5b38892a942a5139e6a36d5b68..4af64566e475e27fee29b64a547dc7b0052daa1a 100644
--- a/core/profiles/standard/standard.profile
+++ b/core/profiles/standard/standard.profile
@@ -4,12 +4,14 @@
  * Enables modules and site configuration for a standard site installation.
  */
 
+use Drupal\Core\Form\FormStateInterface;
+
 /**
  * Implements hook_form_FORM_ID_alter() for install_configure_form().
  *
  * Allows the profile to alter the site configuration form.
  */
-function standard_form_install_configure_form_alter(&$form, $form_state) {
+function standard_form_install_configure_form_alter(&$form, FormStateInterface $form_state) {
   // Pre-populate the site name with the server name.
   $form['site_information']['site_name']['#default_value'] = \Drupal::request()->server->get('SERVER_NAME');
 }