Problem/Motivation
\Drupal\layout_builder\SectionListInterface provides methods for manipulating a list of sections.
\Drupal\layout_builder\SectionStorageInterface extends that interface to provide methods to load and persist that list.
\Drupal\layout_builder\Plugin\SectionStorage\SectionStorageBase exists to provide a base class for implementations of SectionStorageInterface
\Drupal\layout_builder\SectionStorage\SectionStorageTrait exists to provide a trait for implementations of SectionListInterface
That name mismatch is rather confusing.
Proposed resolution
Move the code to a new trait named SectionListTrait and empty out and deprecate the old trait, importing/using the new one for BC.
Remaining tasks
Change record should be updated.
User interface changes
API changes
Data model changes
Release notes snippet
Comments
Comment #2
tim.plunkettNeeds a CR and to have the deprecated messages link to it.
Comment #3
tim.plunkettReroll
Comment #4
tim.plunkettComment #6
tim.plunkettReroll
Comment #7
tim.plunkettReroll.
Still needs a CR, and the patch to be updated accordingly.
Comment #8
tatarbjComment #9
petu commentedWe are on DrupalCampBelarus2019 reviewing this issue with @kachinskiy.
Comment #10
tim.plunkettPatch is stale but git was able to rebase this. No changes
Comment #12
andypostFix test and clean-up for 8.8
Comment #14
andypostFix last failure
Comment #15
aaronmchaleComment #16
tatarbjsandboxpl and shumer are sprinting on this issue at Drupal Camp Poland 2019 Contribution time.
Comment #17
sandboxplThings we did:
- Fresh installation of Drupal 8.8
- Applied a patch #14
- Installed the layout builder module and enabled it for Article content type
- Adding and removing custom blocks, adding layout to the content, changing order of sections/blocks, adding/removing blocks to existing layout
- Reverting layout back to default version
For us the patch is working and we didn't find any issues during testing.
What should be done for the change record, where and how should it be edited?
Comment #18
martin107 commentedHere is a guide to writing change records
https://www.drupal.org/contributor-tasks/draft-change-record
My advice -- keep it to the smallest number of sentences that full describe the change.
Many exiting change records read like a small set of bullets points.
I hope this helps ...
Comment #19
tim.plunkettNW for the change record
Comment #21
mradcliffeAdding tags.
Please see the comments above about writing a change record.
Comment #22
jwwj commentedI'll take a stab at writing the change record, mentored by mmbk
Comment #23
jwwj commentedComment #24
jwwj commentedFirst draft of change record written, but patch failed to apply on 8.8.x, 8.9.x branches. Will try creating a new patch.
Comment #25
mmbkComment #26
jwwj commentedRerolled patch from #14, should now apply to 8.9.x
Comment #27
martin107 commentedChange record looks great
Comment #28
martin107 commentedChange record looks great
Comment #29
mmbkPatch applies to 8.9.x, tests succeded: Thanks you for your work, @jwwj
Comment #30
mmbkComment #31
tim.plunkettThis change of the version is incorrect. It was already deprecated in 8.7 and that does not change with this patch.
This is also missing the test coverage from previous patches.
Comment #33
jwwj commentedstupid question, but where do I see the test coverage report in that case? Anyway, I'll change to unassigned in case somebody else wants to take a look at fixing the failing test before I can find time for it again.
Comment #34
mmbkThe test result is here and is a direct result of changing the deprecation version, as the test expects the Version 8.8.0 to be deprecated. https://www.drupal.org/pift-ci-job/1455962
The first deprecation annotation I found was refering to Version 8.8.0, so I guess patch #26 is correct.Edit: Meanwhile I dug into the code and found that #14 fixed the failed test of #12 at the wrong location. I'll provide the patch for this.
Comment #35
mmbkComment #36
andypostFix failed test caused by #31
Comment #37
mmbkHmm, just wanted to upload the new patch, and I saw that the tests are already running :-(
Nevertheless. I tried to figure out what was wrong with the test-coverage
What is wrong with the tests, that were included in #26 and removed in #31? The tests passed during the testrun of #29 and they seem to be resonable.
Comment #38
tim.plunkettStill needs a review.
Comment #39
andypostLooks that no go for 8.9 now and should be moved to 9.1
Comment #41
tim.plunkettNeeds a reroll for 9.1/10.0
Comment #42
mrinalini9 commentedComment #43
mrinalini9 commentedRerolled patch for 9.1.x, please review.
Comment #44
tim.plunkett#43 is missing the necessary changes to SectionStorageTestBase and doesn't deprecate it at all.
Rerolled #29 from scratch, fixed the @todo and the deprecation strings, and the setUp:void change.
The patch looks smaller than #43 but that's because I have git configured to detect renames and copies.
Comment #45
tim.plunkettRerolled after #2664322: key_value table is only used by a core service but it depends on system install
Comment #48
tim.plunkettReroll after #2879159: Some calls to assertEquals have expected/actual parameters reversed
Comment #49
andypostthe message should be about 9.3.0
Comment #50
ankithashettyUpdated the patch in #48 addressing the changes specified in #49, thanks!
Comment #51
longwaveIssue rationale makes sense. I read through the patch and the only changes are a copy from the old trait to the new trait, a matching copy in a test, and deprecation of the old code.
Comment #52
catchCommitted aa47e8f and pushed to 9.3.x. Thanks!
Comment #54
catch... and published the CR.