Change ComponentSourceInterface::preSaveItem($item) to ::optimizeExplicitInput($values)

Created on 25 June 2025, 2 days ago

Overview

See https://git.drupalcode.org/project/experience_builder/-/merge_requests/1...

public function preSaveItem(ComponentTreeItem $item): void;
public function optimizeExplicitInput(array $inputValues): voi

Proposed resolution

User interface changes

📌 Task
Status

Active

Version

0.0

Component

Component sources

Created by

🇦🇺Australia larowlan 🇦🇺🏝.au GMT+10

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @larowlan
  • 🇦🇺Australia larowlan 🇦🇺🏝.au GMT+10
  • Pipeline finished with Success
    2 days ago
    Total: 683s
    #531775
  • 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺

    wim leers made their first commit to this issue’s fork.

  • 🇪🇸Spain penyaskito Seville 💃, Spain 🇪🇸, UTC+2 🇪🇺
  • 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
  • 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺

    This passes tests on SQLite & MariaDB, but introduced a regression on MySQL & PostgreSQL. 🫠

    HPUnit Test failed to complete; Error: PHPUnit 10.5.47 by Sebastian Bergmann and contributors.
        
        Runtime:       PHP 8.3.22
        Configuration: /builds/project/experience_builder/web/core/phpunit.xml.dist
        
        ...FFF......                                                      12 / 12 (100%)
        
        Time: 05:39.478, Memory: 8.00 MB
        
        Api Layout Controller Post (Drupal\Tests\experience_builder\Kernel\ApiLayoutControllerPost)
         ✔ Entity access required
         ✔ Empty
         ✔ Missing slot
         ✘ 
           ┐
           ├ Failed asserting that actual size 1 matches expected size 0.
           │
           │ /builds/project/experience_builder/tests/src/Kernel/ApiLayoutControllerTestBase.php:98
           │ /builds/project/experience_builder/tests/src/Kernel/ApiLayoutControllerPostTest.php:176
           ┴
         ✘ With global
           ┐
           ├ Failed asserting that false is true.
           │
           │ /builds/project/experience_builder/tests/src/Kernel/ApiLayoutControllerPostTest.php:253
           ┴
         ✘ Without page region permission
           ┐
           ├ Failed asserting that false is true.
           │
           │ /builds/project/experience_builder/tests/src/Kernel/ApiLayoutControllerPostTest.php:307
           ┴
         ✔ With draft code component
         ✔ Image component permutations with 0
         ✔ Image component permutations with 1
         ✔ Image component permutations with 2
         ✔ Image component permutations with 3
         ✔ Invalid form values are returned
        
        FAILURES!
        Tests: 12, Assertions: 219, Failures: 3.
    

    +

    ---- Drupal\Tests\experience_builder\Kernel\ApiLayoutControllerPatchTest ----
    Status    Group      Filename          Line Function                            
    --------------------------------------------------------------------------------
    Fail      Other      phpunit-19.xml       0 Drupal\Tests\experience_builder\Ker
        PHPUnit Test failed to complete; Error: PHPUnit 10.5.47 by Sebastian Bergmann and contributors.
        
        Runtime:       PHP 8.3.22
        Configuration: /builds/project/experience_builder/web/core/phpunit.xml.dist
        
        ..........FF.                                                     13 / 13 (100%)
        
        Time: 05:53.443, Memory: 10.00 MB
        
        Api Layout Controller Patch (Drupal\Tests\experience_builder\Kernel\ApiLayoutControllerPatch)
         ✔ Entity access required
         ✔ Invalid with no·component·instance·uuid
         ✔ Invalid with no·component·type
         ✔ Invalid with no·model
         ✔ Invalid with No·such·component·in·model
         ✔ Invalid with No·such·component
         ✔ Invalid with No·version·provided
         ✔ Invalid with Invalid·version·provided
         ✔ 
         ✔  with fresh·state,·global
         ✘  with existing·auto-save,·no·global
           ┐
           ├ Failed asserting that actual size 1 matches expected size 0.
           │
           │ /builds/project/experience_builder/tests/src/Kernel/ApiLayoutControllerTestBase.php:98
           │ /builds/project/experience_builder/tests/src/Kernel/ApiLayoutControllerPatchTest.php:206
           ┴
         ✘  with existing·auto-save,·global
           ┐
           ├ Failed asserting that actual size 1 matches expected size 0.
           │
           │ /builds/project/experience_builder/tests/src/Kernel/ApiLayoutControllerTestBase.php:98
           │ /builds/project/experience_builder/tests/src/Kernel/ApiLayoutControllerPatchTest.php:206
           ┴
         ✔ Without page region permission
        
        FAILURES!
        Tests: 13, Assertions: 294, Failures: 2.
    

    MySQL 8

    Same on PostgreSQL 16

  • 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
  • Pipeline finished with Skipped
    1 day ago
    #532081
  • 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺

    Thanks!

Production build 0.71.5 2024