#2666392: Unable to revert third party settings via config import added a new optional $id argument to ConfigEntityTypeInterface::getPropertiesToExport().

JSON API was not providing this $id argument (naturally) and some entities (specifically, configurable_language and responsive_image_style) caused our call to this method to throw an exception: https://www.drupal.org/pift-ci-job/1019447

We can easily add the new argument.

However, the documentation for the method still says that it can return NULL, but it appears that that is no longer a possibility. The docblock should be updated.

CommentFileSizeAuthor
#4 2986901-4.patch7.04 KBalexpott
#2 2986901-2.patch1 KBgabesullice

Comments

gabesullice created an issue. See original summary.

gabesullice’s picture

Status: Active » Needs review
StatusFileSize
new1 KB
wim leers’s picture

alexpott’s picture

StatusFileSize
new7.04 KB

Really nice find. Thanks for testing the alpha. I think we can do better here and not break BC but still have the important fix.

alexpott’s picture

With the patch in #4 there are no API changes to JSON API and other modules will continue to get NULL values if the annotation (and now the schema) is not defined.

gabesullice’s picture

Title: Followup for #2666392: ConfigEntityTypeInterface::getPropertiesToExport can no longer return NULL » Followup for #2666392: ConfigEntityTypeInterface::getPropertiesToExport no longer returns NULL, throws exception instead

Thanks @alexpott! That is even better. Adjusting title to reflect what's being done here.

wim leers’s picture

👏👌

wim leers’s picture

Status: Needs review » Reviewed & tested by the community

Green! I can't spot any problems, not even something to nitpick about.

catch’s picture

Version: 8.7.x-dev » 8.6.x-dev
Status: Reviewed & tested by the community » Fixed

Committed/pushed to 8.7.x and cherry-picked to 8.6.x. Thanks!

  • catch committed 16efa3b on 8.7.x
    Issue #2986901 by gabesullice, alexpott: Followup for #2666392:...

  • catch committed f28f562 on 8.6.x
    Issue #2986901 by gabesullice, alexpott: Followup for #2666392:...
alexpott’s picture

Component: configuration system » configuration entity system

@tim.plunkett pointed out this is not in the correct component - moving.

Status: Fixed » Closed (fixed)

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

jhodgdon’s picture

Adding "Contributed project soft blocker" tag to this issue, because this commit broke the Config Update Manager contrib module. See #2993876: Change notice or revert needed for #2986901, which asks for this either to be reverted or a change record to be created, and #2990516: Address test failures due presumably to changes in core, where we are attempting to work around the problem.