Automated Drupal 11 compatibility fixes for entity_embed

Created on 17 March 2024, 9 months ago

Problem/Motivation

Hello project maintainers,

This is an automated issue to help make this module compatible with Drupal 11.

Changes will periodically be added to this issue that remove deprecated API uses. To stop further changes from being posted, change the status to anything other than Active, Needs review, Needs work or Reviewed and tested by the community. Alternatively, you can remove the "ProjectUpdateBotD11" tag from the issue to stop the bot from posting updates.

The changes will be posted by the Project Update Bot โ†’ official user account. This account will not receive any issue credit contributions for itself or any company.

Proposed resolution

You have a few options for how to use this issue:

  1. Accept automated changes until this issue is closed

    If this issue is left open (status of Active, Needs review, Needs work or Reviewed and tested by the community) and the "ProjectUpdateBotD11" tag is left on this issue, new changes will be posted periodically if new deprecation fixes are needed.

    As the Drupal Rector project improves and is able to fix more deprecated API uses, the changes posted here will cover more of the deprecated API uses in the module.

    Patches and/or merge requests posted by others are ignored by the bot, and general human interactions in the issue do not stop the bot from posting updates, so feel free to use this issue to refine bot changes. The bot will still post new changes then if there is a change in the new generated patch compared to the changes that the bot posted last. Those changes are then up to humans to integrate.

  2. Leave open but stop new automated changes.

    If you want to use this issue as a starting point to remove deprecated API uses but then don't want new automated changes, remove the "ProjectUpdateBotD11" tag from the issue and use it like any other issue (the status does not matter then). If you want to receive automated changes again, add back the "ProjectUpdateBotD11" tag.

  3. Close it and don't use it

    If the maintainers of this project don't find this issue useful, they can close this issue (any status besides Active, Needs review, Needs work and Reviewed and tested by the community) and no more automated changes will be posted here.

    If the issue is reopened, then new automated changes will be posted.

    If you are using another issue(s) to work on Drupal 11 compatibility it would be very useful to other contributors to add those issues as "Related issues" when closing this issue.

Remaining tasks

Using the patches

  1. Apply the latest patch in the comments by Project Update Bot โ†’ or human contributors that made it better.
  2. Thoroughly test the patch. These patches are automatically generated so they haven't been tested manually or automatically.
  3. Provide feedback about how the testing went. If you can improve the patch, post an updated patch here.

Using the merge request

  1. Review the merge request and test it.
  2. Thoroughly test the changes. These changes are automatically generated so they haven't been tested manually or automatically.
  3. Provide feedback about how the testing went. If you can improve the merge request, create a new branch and merge request and work from there.

Warning: The 'project-update-bot-only' branch will always be overwritten. Do not work in that branch!

Providing feedback

If there are problems with one of the changes posted by the Project Update Bot โ†’ , such as it does not correctly replace a deprecation, you can file an issue in the Drupal Rector issue queue โ†’ . For other issues with the bot, for instance if the issue summary created by the bot is unclear, use the Project analysis issue queue โ†’ .

๐Ÿ“Œ Task
Status

Needs review

Version

1.5

Component

Code

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

Merge Requests

Comments & Activities

  • Issue created by @project update bot
  • This is an automated patch generated using Upgrade Status and Drupal Rector. Please see the issue summary for more details. A merge request is also openend and updated.

    It is important that any automated tests available are run and that you manually test the changes.

    Drupal 11 Compatibility

    According to the Upgrade Status module โ†’ , even with these changes, this module is not yet compatible with Drupal 11.

    Currently Drupal Rector, version 0.20.1, cannot fix all Drupal 11 compatibility problems.

    Therefore these changes did not update the info.yml file for Drupal 11 compatibility.

    Leaving this issue open, even after committing the current patch, will allow the Project Update Bot โ†’ to post additional Drupal 11 compatibility fixes as they become available in Drupal Rector.

    Debug info

    Bot run #11-121090

    This patch was created using these packages:

    1. drupal/upgrade_status: 4.1.0
    2. mglaman/phpstan-drupal: 1.2.7
    3. palantirnet/drupal-rector: 0.20.1
  • Pipeline finished with Failed
    9 months ago
    Total: 899s
    #121487
  • This comment was forced and has ignored the check if a change was already posted. This is only done when we want to update the issue without waiting for changes to happen.

    This is an automated patch generated using Upgrade Status and Drupal Rector. Please see the issue summary for more details. A merge request (MR) is also openend and updated.

    It is important that any automated tests available are run and that you manually test the changes.

    Drupal 11 Compatibility

    According to the Upgrade Status module โ†’ , even with these changes, this module is not yet compatible with Drupal 11.

    Currently Drupal Rector, version 0.20.1, cannot fix all Drupal 11 compatibility problems.

    Therefore, these changes did not update the info.yml file for Drupal 11 compatibility.

    The compatibility issues that Upgrade Status found after the Drupal Rector fixes were applied are attached to help you resolve them manually.

    Leaving this issue open, even after committing the current patch or merging the MR, will allow the Project Update Bot โ†’ to post additional Drupal 11 compatibility fixes as they become available in Drupal Rector.

    Debug information

    Bot run #11-137198

    These packages were used to generate the fixes:

    1. drupal/upgrade_status: 4.1.0
    2. mglaman/phpstan-drupal: 1.2.10
    3. palantirnet/drupal-rector: 0.20.1
  • Pipeline finished with Failed
    8 months ago
    Total: 876s
    #137588
  • ๐Ÿ‡ญ๐Ÿ‡บHungary Balu Ertl Budapest ๐Ÿ‡ช๐Ÿ‡บ

    Balu Ertl โ†’ made their first commit to this issueโ€™s fork.

  • ๐Ÿ‡ญ๐Ÿ‡บHungary Balu Ertl Budapest ๐Ÿ‡ช๐Ÿ‡บ

    Balu Ertl โ†’ changed the visibility of the branch project-update-bot-only to hidden.

  • Pipeline finished with Canceled
    6 months ago
    Total: 67s
    #199015
  • Pipeline finished with Failed
    6 months ago
    Total: 769s
    #199016
  • ๐Ÿ‡ญ๐Ÿ‡บHungary Balu Ertl Budapest ๐Ÿ‡ช๐Ÿ‡บ

    Based on the answers on this Slack thread, I have the conclusion that it's not strictly necessary to rely on the DeprecationHelper::backwardsCompatibleCall() utility. I assume the module maintainers probably still plan to continue supporting D9, in which this deprecation handling solution was not present yet and thus would have no effect anyway.

    Albeit the change record โ†’ about the deprecation of watchdog_exception() suggests using \Drupal\Core\Utility\Error::logException() but for me it still seems to be just another wrapper around the \Drupal\Core\Logger\LoggerChannel::log().

    Therefore I simplified exception logging with a more informative solution I peeked from core's \Drupal\Core\EventSubscriber\DefaultExceptionHtmlSubscriber::makeSubrequest().

  • ๐Ÿ‡ญ๐Ÿ‡บHungary Balu Ertl Budapest ๐Ÿ‡ช๐Ÿ‡บ

    Reviewed and tested (module install, configuring, trying out, uninstalling) on a D11-beta1 site, found working as expected:

  • Pipeline finished with Failed
    6 months ago
    Total: 850s
    #199289
  • This is an automated patch generated using Upgrade Status and Drupal Rector. Please see the issue summary for more details. A merge request (MR) is also openend and updated.

    It is important that any automated tests available are run and that you manually test the changes.

    Drupal 11 Compatibility

    According to the Upgrade Status module โ†’ , even with these changes, this module is not yet compatible with Drupal 11.

    Currently Drupal Rector, version 0.20.3, cannot fix all Drupal 11 compatibility problems.

    Therefore, these changes did not update the info.yml file for Drupal 11 compatibility.

    The compatibility issues that Upgrade Status found after the Drupal Rector fixes were applied are attached to help you resolve them manually.

    Leaving this issue open, even after committing the current patch or merging the MR, will allow the Project Update Bot โ†’ to post additional Drupal 11 compatibility fixes as they become available in Drupal Rector.

    Debug information

    Bot run #11-199781

    These packages were used to generate the fixes:

    1. drupal/upgrade_status: 4.3.2
    2. mglaman/phpstan-drupal: 1.2.11
    3. palantirnet/drupal-rector: 0.20.3
  • Pipeline finished with Failed
    6 months ago
    Total: 918s
    #201411
  • Status changed to Needs work 6 months ago
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States japerry KVUO

    The tests are failing in head, but its possible thats due to current incompatibilities, which would be made worse with D11 support. Those should get fixed before this gets committed.

  • Status changed to Postponed 5 months ago
  • ๐Ÿ‡ญ๐Ÿ‡บHungary Balu Ertl Budapest ๐Ÿ‡ช๐Ÿ‡บ

    I believe the MR of ๐Ÿ“Œ Fix tests Needs review should be included first before we move forward with this one.

  • Pipeline finished with Failed
    5 months ago
    Total: 810s
    #219883
  • Pipeline finished with Failed
    5 months ago
    Total: 793s
    #219900
  • Status changed to Needs review 5 months ago
  • ๐Ÿ‡ญ๐Ÿ‡บHungary Balu Ertl Budapest ๐Ÿ‡ช๐Ÿ‡บ

    Drupal Rector still suggests one point to fix:


    As discussed today with @japerry โ†’ , we agreed this could be ignored because there is a @todo comment above the line communicating this should be fixed eventually in the future. So setting ticket status back to Needs Review.

  • This is an automated patch generated using Upgrade Status and Drupal Rector. Please see the issue summary for more details. A merge request (MR) is also openend and updated.

    It is important that any automated tests available are run and that you manually test the changes.

    Drupal 11 Compatibility

    According to the Upgrade Status module โ†’ , even with these changes, this module is not yet compatible with Drupal 11.

    Currently Drupal Rector, version 0.20.3, cannot fix all Drupal 11 compatibility problems.

    Therefore, these changes did not update the info.yml file for Drupal 11 compatibility.

    The compatibility issues that Upgrade Status found after the Drupal Rector fixes were applied are attached to help you resolve them manually.

    Leaving this issue open, even after committing the current patch or merging the MR, will allow the Project Update Bot โ†’ to post additional Drupal 11 compatibility fixes as they become available in Drupal Rector.

    Debug information

    Bot run #11-223311

    These packages were used to generate the fixes:

    1. drupal/upgrade_status: 4.3.4
    2. mglaman/phpstan-drupal: 1.2.11
    3. palantirnet/drupal-rector: 0.20.3
  • Pipeline finished with Failed
    5 months ago
    Total: 804s
    #225043
  • ๐Ÿ‡ญ๐Ÿ‡บHungary Balu Ertl Budapest ๐Ÿ‡ช๐Ÿ‡บ

    Balu Ertl โ†’ changed the visibility of the branch 8.x-1.x to hidden.

  • Pipeline finished with Failed
    5 months ago
    Total: 890s
    #225628
  • ๐Ÿ‡บ๐Ÿ‡ฆUkraine yuriy.korzhov

    Patch including rector's fixes from entity_embed.1.x-dev.rector.patch and info file fix.

  • ๐Ÿ‡ญ๐Ÿ‡บHungary Balu Ertl Budapest ๐Ÿ‡ช๐Ÿ‡บ

    @ukor โ†’ thanks for contributing code. This issue already has an open merge request. Would you mind committing the content of your patch file onto the feature branch of this issue repository, please? This would make this issue solved earlier by easing the module maintainer's job of reviewing changes. Thanks in advance!

  • ๐Ÿ‡บ๐Ÿ‡ฆUkraine evgen

    Could not apply patch MR 36.

  • First commit to issue fork.
  • Merge request !47Resolve #3430164 "D11 readiness" โ†’ (Open) created by ankitv18
  • Pipeline finished with Canceled
    about 2 months ago
    Total: 184s
    #308871
  • Pipeline finished with Failed
    about 2 months ago
    Total: 478s
    #308872
  • Pipeline finished with Failed
    about 2 months ago
    Total: 448s
    #309359
  • Pipeline finished with Canceled
    about 2 months ago
    Total: 110s
    #309373
  • Pipeline finished with Failed
    about 2 months ago
    Total: 318s
    #309374
  • Pipeline finished with Failed
    about 2 months ago
    Total: 80s
    #309390
  • Pipeline finished with Failed
    about 2 months ago
    Total: 75s
    #309417
  • Pipeline finished with Failed
    about 2 months ago
    Total: 224s
    #309422
  • Pipeline finished with Failed
    about 2 months ago
    Total: 221s
    #309439
  • Pipeline finished with Failed
    about 2 months ago
    Total: 239s
    #309442
  • Pipeline finished with Failed
    about 2 months ago
    Total: 290s
    #309575
  • Pipeline finished with Failed
    about 2 months ago
    Total: 292s
    #309592
  • Pipeline finished with Running
    about 2 months ago
    #310530
  • Pipeline finished with Failed
    about 2 months ago
    Total: 673s
    #311104
  • Merge request !50Automated D11 compatibility โ†’ (Closed) created by abhinavk
  • Pipeline finished with Failed
    about 1 month ago
    Total: 310s
    #315931
  • First commit to issue fork.
  • Merge request !51Automated D11 compatibility โ†’ (Open) created by abhinavk
  • Pipeline finished with Failed
    about 1 month ago
    Total: 755s
    #315973
  • Pipeline finished with Failed
    about 1 month ago
    Total: 415s
    #316010
  • Pipeline finished with Failed
    about 1 month ago
    Total: 485s
    #316023
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia ankitv18

    ankitv18 โ†’ changed the visibility of the branch 3430164-d11_ready to hidden.

  • Pipeline finished with Failed
    about 1 month ago
    Total: 504s
    #316047
  • Pipeline finished with Canceled
    about 1 month ago
    Total: 77s
    #317456
  • Pipeline finished with Failed
    about 1 month ago
    Total: 954s
    #317457
  • Pipeline finished with Failed
    about 1 month ago
    Total: 347s
    #318132
  • Pipeline finished with Success
    about 1 month ago
    Total: 208s
    #318139
  • ๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom Ok4p1 Glasgow

    I get the following error after trying to use the latest MR. Drupal 10.3.8.

    Error: Call to undefined method Drupal\embed\EmbedType\EmbedTypeBase::create() in Drupal\entity_embed\Plugin\EmbedType\Entity::create() (line 56 of modules/contrib/entity_embed/src/Plugin/EmbedType/Entity.php).

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia rahul1707

    Tested MR !47 changes in Drupal 10.3 and Drupal 11, functionality is working fine for me.
    Changing status to RTBC.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia ankitv18

    ankitv18 โ†’ changed the visibility of the branch 3430164-automated-drupal-11 to hidden.

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States phenaproxima Massachusetts

    The comment from #27 is concerning and suggests that there may have been a backwards compatibility break here - can we look into that, please?

  • Status changed to Postponed 4 days ago
  • heddn Nicaragua

    embed.module support for D11 got rolled back. We'll need to wait on https://www.drupal.org/project/embed/issues/3430097 ๐Ÿ“Œ Automated Drupal 11 compatibility fixes for embed Needs work to land first. I'm way down the line in https://www.drupal.org/project/media_migration/issues/3431903 ๐Ÿ“Œ Automated Drupal 11 compatibility fixes for media_migration Needs review waiting for this to land. So hopefully the upstream issues land soonish.

Production build 0.71.5 2024