Problem/Motivation

I am searching for a way to import config in sync directory for automated PHPunit tests and when looking at the code of the config module, I found the following lines:

https://cgit.drupalcode.org/drupal/tree/core/modules/config/src/Form/Con...

$batch = [
          'operations' => [],
          'finished' => [get_class($this), 'finishBatch'],
          'title' => t('Synchronizing configuration'),
          'init_message' => t('Starting configuration synchronization.'),
          'progress_message' => t('Completed step @current of @total.'),
          'error_message' => t('Configuration synchronization has encountered an error.'),
          'file' => __DIR__ . '/../../config.admin.inc',
        ];

But I can't find any config.admin.inc file in the code. Is it normal?

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
#2 2950709-2.patch798 bytesidebr
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Grimreaper created an issue. See original summary.

idebr’s picture

Title: missing config.admin.inc file? » ConfigSync.php tries to include non-existing file config.admin.inc
Status: Active » Needs review
FileSize
798 bytes

config.admin.inc was removed in #1987660: Convert config_sync() to a new style controller, so this file include can be removed. The 'finished' callback is available in the current file.

borisson_’s picture

Version: 8.4.3 » 8.6.x-dev
Status: Needs review » Reviewed & tested by the community

This looks great and it passes the tests.

alexpott’s picture

Category: Task » Bug report
Status: Reviewed & tested by the community » Fixed

Committed and pushed 1eae4dc7dc to 8.6.x and 7a791f8dc6 to 8.5.x. Thanks!

Yep this doesn't break because we do this:

    // If this is the first time we iterate this batch set in the current
    // request, we check if it requires an additional file for functions
    // definitions.
    if ($set_changed && isset($current_set['file']) && is_file($current_set['file'])) {
      include_once \Drupal::root() . '/' . $current_set['file'];
    }

Crediting @Grimreaper for finding this and opening the issue.

Backport to 8.5.x cause this is a bug.

  • alexpott committed 1eae4dc on 8.6.x
    Issue #2950709 by idebr, Grimreaper: ConfigSync.php tries to include non...

  • alexpott committed 7a791f8 on 8.5.x
    Issue #2950709 by idebr, Grimreaper: ConfigSync.php tries to include non...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.