Automated Drupal 10 compatibility fixes

Created on 18 July 2022, over 2 years ago
Updated 14 March 2023, over 1 year ago

Problem/Motivation

Hello project maintainers,

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

To read more about this effort by the Drupal Association, please read: The project update bot is being refreshed to support Drupal 10 readiness of contributed projects β†’

Patches will periodically be added to this issue that remove Drupal 10 deprecated API uses. To stop further patches 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 "ProjectUpdateBotD10" tag from the issue to stop the bot from posting updates.

The patches 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 patches 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 "ProjectUpdateBotD10" tag is left on this issue, new patches 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 patches 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 patches. The bot will still post new patches then if there is a change in the new generated patch compared to the patch that the bot posted last. Those changes are then up to humans to integrate.

  2. Leave open but stop new automated patches.

    If you want to use this issue as a starting point to remove deprecated API uses but then don't want new automated patches, remove the "ProjectUpdateBotD10" tag from the issue and use it like any other issue (the status does not matter then). If you want to receive automated patches again, add back the "ProjectUpdateBotD10" 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 patches will be posted here.

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

    If you are using another issue(s) to work on Drupal 10 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.

Providing feedback

If there are problems with one of the patches 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

Fixed

Version

1.0

Component

Code

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • Status changed to RTBC almost 2 years ago
  • πŸ‡©πŸ‡ͺGermany Sarika Wirtz

    I installed module and applied the patch #2 and #10 using drupal10 and cloned node successfully.

  • Status changed to Needs work almost 2 years ago
  • πŸ‡©πŸ‡ͺGermany Grevil

    @smustgrave interesting! I just ran upgrade_status over the 8.x-1.x dev version using drush and "only" got these 2 deprecation notices:

    (The core_version_requirement should definitly be fixed. I am wondering how the Project Update Bot did not fix the most basic D10 compatibility issue).

    But I can not gather any information on Drupal\address\Event\InitialValuesEvent, so you are probably correct with your deprecation notice! Still wondering why I'm not getting the same notice... did you run upgrade_status through the UI or through drush?

    I also ran PHPStan with Drupal Standards on the module and PHPUnit in a Drupal 10 environment, still no further deprecation errors!

    Maybe one of the maintainers can clear up the use of Drupal\address\Event\InitialValuesEvent and INITIAL_VALUES here, so we can finally resolve this issue and create a new release!

  • πŸ‡©πŸ‡ͺGermany Grevil

    @Sarika Wirtz nice find! Patch #10 doesn't contain the changes from Patch #2, for some reason...

  • Assigned to Sarika Wirtz
  • πŸ‡©πŸ‡ͺGermany Sarika Wirtz

    I tested Merge request !11 using drupal10 and tried to clone the node. When I clicked on "clone node" it gave me no option to change content or title (attached screen shot "merge_request-11-2023-01-27.png"). However when i tried to save the node it gave me an error "The website encountered an unexpected error. Please try again later."

    Also error from Log:
    InvalidArgumentException: Field submit is unknown. in Drupal\Core\Entity\ContentEntityBase->getTranslatedField() (line 587 of /var/www/html/web/core/lib/Drupal/Core/Entity/ContentEntityBase.php).

  • Issue was unassigned.
  • πŸ‡©πŸ‡ͺGermany Anybody Porta Westfalica

    @smustgrave any updates after reading the comments? How to proceed here?

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Unfortunately I don't know how to proceed with those address deprecations.

  • πŸ‡³πŸ‡±Netherlands megachriz

    I see that the latest Address release is 8.x-1.11 β†’ . So there's no Address 2.0 yet. While it would be a good thing to get that deprecation fixed, it may not be a showstopper for a D10 compatible release.

    I do see that there are test failures too and an issue reported in #24. These I would call showstoppers.

  • First commit to issue fork.
  • πŸ‡ΊπŸ‡ΈUnited States sker101 NYC

    Revert the change of extending Entityform seems to be fix the test failures.

    I don't think we should be changing the extending class just because the parent class is marked as `@internal`.

    See discussion in

    https://github.com/mglaman/phpstan-drupal/issues/284

    https://www.drupal.org/project/drupal/issues/2491057#comment-14356806 πŸ“Œ Streamline the entity deletion form class hierarchy Needs review

    Perhaps we should add @phpstan-ignore-next-line as well?

  • πŸ‡ΊπŸ‡ΈUnited States markdorison

    Is anyone still experiencing issues? I am testing the latest changes committed to 8.x-1.x from this issue and I seem to be able to enable the module and clone nodes as expected.

  • πŸ‡§πŸ‡ͺBelgium victonator

    No issue's on a fresh Drupal 10 project, works perfectly

  • Status changed to Fixed over 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States markdorison

    8.x-1.16 has been tagged/released with D10 compatibility.

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

Production build 0.71.5 2024