Commit 2dfec98a authored by dpi's avatar dpi
Browse files

Issue #3310533 by dpi: Drupal 10 compatibility

parent b5bd2179
Loading
Loading
Loading
Loading
+12 −11
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@ Config Override Core Fields

Provides hints to how form elements map to configuration objects.

Copyright (C) 2018 Daniel Phin (@dpi)
Copyright (C) 2022 Daniel Phin (@dpi)

# Instructions

@@ -15,15 +15,16 @@ Recommended for use with [Config Override Indicator][config-override-inspector]

# License

This program is free software; you can redistribute it and/or modify it under 
the terms of the GNU General Public License as published by the Free Software 
Foundation; either version 2 of the License, or (at your option) any later 
version.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY 
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
PARTICULAR PURPOSE. See the GNU General Public License for more details.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with 
this program; if not, write to the Free Software Foundation, Inc., 51 Franklin 
Street, Fifth Floor, Boston, MA 02110-1301 USA.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+2 −2
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@
    }
  ],
  "require": {
    "php": ">=7.3",
    "drupal/core": "^9"
    "php": ">=8.1",
    "drupal/core": ">=10"
  }
}
+2 −4
Original line number Diff line number Diff line
name: 'Config Override Core Fields'
type: module
description: 'Provides hints to how form elements map to configuration objects.'
core_version_requirement: ^9
php: 7.3
core_version_requirement: '>=10'
php: 8.1
package: 'Administration'
dependencies:
  - drupal:system (>=9.0.x)
+3 −1
Original line number Diff line number Diff line
@@ -5,12 +5,14 @@
 * Contains hooks for Config Override Core Fields.
 */

declare(strict_types=1);

use Drupal\Core\Form\FormStateInterface;

/**
 * Implements hook_form_alter().
 */
function config_override_core_fields_form_alter(array &$form, FormStateInterface $form_state, string $form_id) {
function config_override_core_fields_form_alter(array &$form, FormStateInterface $form_state, string $form_id): void {
  switch ($form_id) {
    case 'search_admin_settings':
      // search.module.