Skip to content
Snippets Groups Projects
Unverified Commit 78e8f760 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3480293 by gapple: ConfigTarget::__construct() documentation references...

Issue #3480293 by gapple: ConfigTarget::__construct() documentation references incorrect ToConfig enum name

(cherry picked from commit ba24f059)
parent 71c6a08a
No related branches found
No related tags found
20 merge requests!11380Issue #3490698 by catch, spokje: Bump MINIMUM_STABILITY back to 'stable' when...,!11239Issue #3507548: Allow workspace changes listing to show all items, without a pager,!11238Fix issue #3051797,!11213Issue #3506743 by tomislav.matokovic: Increasing the color contrast for the navigation block title against the background of the navigation sidebar to at least 4.5:1,!11147Draft: Try to avoid manually setting required cache contexts,!11108Issue #3490298 by nicxvan: Profiles can be missed in OOP hooks,!11093Drupal on MongoDB 11.1.x,!11017Issue #3502540: Add date filter for moderated content.,!11009Issue #3486972 migrate feed icon,!10999Cleaning up Taxonomy hooks and updating baseline.,!10977Issue #3501457: Fix path used in a A11y Test Admin,!10881Issue #3489329 by mfb, casey: symfony/http-foundation commit 32310ff breaks PathValidator,!10570Issue #3494197: Convert Twig engine hooks,!10567Issue #3494154: Index is not added if entity doesn't support revisions,!10548Revert "Issue #3478621 by catch, longwave, nicxvan: Add filecache to OOP hook attribute parsing",!10404Margin has been added,!10391Issue #3485117 by nexusnovaz, godotislate, nicxvan: Fix return type on...,!10388Issue #3485117 by nexusnovaz, godotislate, nicxvan: Fix return type on...,!10376Issue #3485117 by nexusnovaz, godotislate, nicxvan: Fix return type on...,!10237Issue #3484105 by nicxvan, godotislate: Automatically included .inc files are no longer included
Pipeline #338583 passed
Pipeline: drupal

#338584

    ......@@ -74,8 +74,8 @@ final class ConfigTarget {
    * return an array with the transformed values, also keyed by property path.
    * The callback will receive the form state object as its second argument.
    * The callback may return a special values:
    * - ToConfig::NoMapping, to indicate that the given form value does not
    * need to be mapped onto the Config object
    * - ToConfig::NoOp, to indicate that the given form value does not need to
    * be mapped onto the Config object
    * - ToConfig::DeleteKey to indicate that the targeted property path should
    * be deleted from config.
    * Defaults to NULL.
    ......@@ -237,7 +237,7 @@ public function setValue(Config $config, mixed $value, FormStateInterface $form_
    }
    // Set the returned value, or if a special value (one of the cases in the
    // ConfigTargetValue enum): apply the appropriate action.
    // ToConfig enum): apply the appropriate action.
    array_walk($value, fn (mixed $value, string $property) => match ($value) {
    // No-op.
    ToConfig::NoOp => NULL,
    ......
    ......@@ -286,14 +286,14 @@ public function testSingleTarget(): void {
    $config->set('something', FALSE)->shouldBeCalledTimes(1);
    $config_target->setValue($config->reveal(), 'No', $this->prophesize(FormStateInterface::class)->reveal());
    // Test `ConfigTargetValue::NoMapping`: nothing should happen to the Config.
    // Test `ToConfig::NoOp`: nothing should happen to the Config.
    $config = $this->prophesize(Config::class);
    $config->getName()->willReturn('foo.settings');
    $config->set('something', Argument::any())->shouldBeCalledTimes(0);
    $config->clear('something', Argument::any())->shouldBeCalledTimes(0);
    $config_target->setValue($config->reveal(), '<test:noop>', $this->prophesize(FormStateInterface::class)->reveal());
    // Test `ConfigTargetValue::DeleteKey`: Config::clear() should be called.
    // Test `ToConfig::DeleteKey`: Config::clear() should be called.
    $config = $this->prophesize(Config::class);
    $config->getName()->willReturn('foo.settings');
    $config->clear('something')->shouldBeCalledTimes(1);
    ......
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or to comment