Drupal 11 compatibility fixes for custom_elements 3.x

Created on 26 August 2024, 3 months ago
Updated 29 August 2024, 3 months ago

Problem/Motivation

As of earlier today, the build pipeline has added "composer (next major version)". This fails, because of the below points.

There doesn't seem to be an automated incoming "Drupal 11 compatibility fixes" issue incoming, so: creating one manually.

Needed / known:

  • update version nr in composer.json. (We can also drop the version from composer.json and only have it in the info.yml; I guess that depends on the minimum Drupal version we still want to support. Can we just say we support D10+ in v3, and assume we're not hurting anyone with that?
  • We have a problem supporting the current custom_elements_thunder testing which still uses video_embed_field. (See its README.) I guess we should just "break compatibility" with the v2 processor and assume noone was using it anyway / update to supporting Thunder's newer video media type?
📌 Task
Status

Active

Version

3.0

Component

Code

Created by

🇳🇱Netherlands roderik Amsterdam,NL / Budapest,HU

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

Merge Requests

Comments & Activities

  • Issue created by @roderik
  • Assigned to useernamee
  • 🇦🇹Austria fago Vienna
  • First commit to issue fork.
  • Merge request !88Issue 3470347: Drupal 11 compatibility. → (Merged) created by Unnamed author
  • Pipeline finished with Success
    3 months ago
    Total: 176s
    #268148
  • 🇸🇮Slovenia useernamee Ljubljana

    MR was opened against 2.x branch instead of 3.x branch. I fixed that.

    There is also a conflict with the symfony/serializer:

    Fatal error: Declaration of Drupal\custom_elements\CustomElementNormalizer::supportsNormalization($data, $format = null): bool must be compatible with Symfony\Component\Serializer\Normalizer\NormalizerInterface::supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool in /var/www/html/web/modules/contrib/custom_elements/src/CustomElementNormalizer.php on line 27
    
  • 🇸🇮Slovenia useernamee Ljubljana
  • 🇦🇹Austria fago Vienna
  • 🇳🇱Netherlands roderik Amsterdam,NL / Budapest,HU

    I tested with 10.2 (including the changed function definitions in the normalizer, on top of the still-old interface, just in case).

    It works if we revert the renderInIsolation() change, and I would prefer that for the moment. (We can live with deprecation warnings until 3.1.)

    Also: please check phpcs because these are all new. (I do not recognize some of them; maybe they are just new because of D11 inclusion / an updated coder module).

  • 🇸🇮Slovenia useernamee Ljubljana

    - put renderPlain back in place
    - fix phpcs errors

  • 🇸🇮Slovenia useernamee Ljubljana
  • Pipeline finished with Skipped
    2 months ago
    #293682
  • 🇳🇱Netherlands roderik Amsterdam,NL / Budapest,HU

    Hm, strange: gitlab is suddenly expecting the "use" statements to be sorted case sensitively instead of insensitively. (So the fix commit fixed things for the current CI tests, and 'broke' my current version of phpcs/coder.) I find that change surprising, but will try to understand it later. If gitlab's happy, I'm happy.

    I also dropped the video paragraph/media type, per the issue description, and updated the custom_elements_thunder README.md about why. (Code we don't want to support, depending on unsupported module.)

    The "composer (next major version)" build now still does not work, because media_entity_twitter (a dev dependency) has no D11 release yet. But that can have a D11 release easily / can be figured out later without having to drop code.

    So: merged, thank you!

  • 🇳🇱Netherlands roderik Amsterdam,NL / Budapest,HU
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024