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.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Project Update Bot created an issue. See original summary.

project update bot’s picture

Status: Active » Needs review
StatusFileSize
new546 bytes

This is an automated patch generated by Drupal Rector. Please see the issue summary for more details.

It is important that any automated tests available are run with this patch and that you manually test this patch.

Drupal 10 Compatibility

According to the Upgrade Status module, even with this patch, this module is not yet compatible with Drupal 10.

Currently Drupal Rector, version 0.12.0, cannot fix all Drupal 10 compatibility problems.

This patch does not update the info.yml file for Drupal 10 compatibility.

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

Debug info

Bot run #127

This patch was created using these packages:

  1. mglaman/phpstan-drupal: 1.1.9
  2. palantirnet/drupal-rector: 0.12.0
project update bot’s picture

This is an automated patch generated by Drupal Rector. Please see the issue summary for more details.

It is important that any automated tests available are run with this patch and that you manually test this patch.

Drupal 10 Compatibility

According to the Upgrade Status module, even with this patch, this module is not yet compatible with Drupal 10.

Currently Drupal Rector, version 0.13.0, cannot fix all Drupal 10 compatibility problems.

This patch does not update the info.yml file for Drupal 10 compatibility.

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

Debug info

Bot run #139

This patch was created using these packages:

  1. mglaman/phpstan-drupal: 1.1.24
  2. palantirnet/drupal-rector: 0.13.0

omkar-pd’s picture

Issue summary: View changes
StatusFileSize
new699 bytes

core_version_requirement should be added in info.yml and composer.json.

omkar-pd’s picture

Note:
There are still some issues that needs to be checked like.
Missing explicit access check on entity query. inside comment_notify.inc file on line 174 and 182.

The below warning can be ignored for now or can be fixed. depends on maintainer.

Call to deprecated function module_load_include(). Deprecated in drupal:9.4.0 and is removed from drupal:11.0.0.
gnuget’s picture

Thanks for your patch @omkar-pd!

I have a question, removing this makes this module non-drupal 8 compatible right? I think for D8, the

core</core> key is required.
<pre>
<code>
-core: 8.x
 type: module

If it is removed we should remove the D8 support here, right?

-core_version_requirement: ^8 || ^9
+core_version_requirement: ^8 || ^9 || ^10

🤔

omkar-pd’s picture

Yes, you're right and new release should be created for D10. I'll provide a new patch.

ravimane23’s picture

ravimane23’s picture

Assigned: Unassigned » ravimane23
Issue tags: +DrupalMumbaiD10Readiness
ravimane23’s picture

Hello,

Resolved below issues from upgrade status..

Upgade status

ravimane23’s picture

Assigned: ravimane23 » Unassigned

Status: Needs review » Needs work

The last submitted patch, 11: comment_notify-3286600-11.patch, failed testing. View results

project update bot’s picture

Status: Needs work » Needs review
StatusFileSize
new3.35 KB
new1.5 KB

This is an automated patch generated by Drupal Rector. Please see the issue summary for more details.

It is important that any automated tests available are run with this patch and that you manually test this patch.

Drupal 10 Compatibility

According to the Upgrade Status module, even with this patch, this module is not yet compatible with Drupal 10.

Currently Drupal Rector, version 0.13.1, cannot fix all Drupal 10 compatibility problems.

This patch does not update the info.yml file for Drupal 10 compatibility.

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

Debug info

Bot run #145

This patch was created using these packages:

  1. mglaman/phpstan-drupal: 1.1.25
  2. palantirnet/drupal-rector: 0.13.1
project update bot’s picture

Issue summary: View changes
kunalgautam’s picture

Issue summary: View changes
StatusFileSize
new2.12 KB

Patch for Drupal version 10.1.x and rector fixes

kunalgautam’s picture

StatusFileSize
new2.34 KB

Test cases updated

mlncn’s picture

Status: Needs review » Reviewed & tested by the community

Final patch looks good!

stefanos.petrakis’s picture

Status: Reviewed & tested by the community » Needs work

The final patch does not look that good since the tests for D10.1 failed (see #17).
Working on this, hoping I can provide an updated patch with the tests fixed.

stefanos.petrakis’s picture

Status: Needs work » Needs review

Tests are green again, this is ready for a review now.

stefanos.petrakis’s picture

StatusFileSize
new9.89 KB

Seems like we too landed at the chicken-egg problem.

In order to have the module be applicable as a patch (via cweagans/composer-patches) to released versions (e.g. 1.3.0), we need to drop any mods to composer.json or comment_notify.info.yml, regarding drupal core version requirements. This is the current state of the MR.

This latest version however does not allow running the automated tests on D.O. and is still not installable on D10 unless combined with mglaman/composer-drupal-lenient (for composer installation) and Backward Compatibility (https://www.drupal.org/project/backward_compatibility) for enabling on Drupal.

The previous version of the MR that was changing the info.yml file (as well as composer.json) could be used as a patch via git, namely by requesting the composer dependency as in:
composer require drupal/comment_notify:1.3.0 --prefer-source
After that, the module was fetched using git and the MR was applicable as a patch (via git apply patch) without hiccups.
That version was allowing running tests on D.O.
Attaching that version as a patch for reference.

yashingole’s picture

StatusFileSize
new283.69 KB
new28.31 KB

I have reviewed and checked Patch #22 this works for drupal 9.5 and drupal 10.0. and 10.0.1
Screenshots of the compatibility on 9.5 and the Config on 10 have been attached for reference:

klemendev’s picture

Status: Needs review » Reviewed & tested by the community
greggles’s picture

Status: Reviewed & tested by the community » Needs review

@KlemenDEV could you describe your review as you set to RTBC?

I've done a brief review and am inclined to commit and fix things in followups, but would be good to confirm what QA steps have been done.

@Stefanos Petrakis thanks for the work on the MR and patch! If you are interested in becoming a co-maintainer that could be a good idea :)

stefanos.petrakis’s picture

Hi @greggles; thanks for the kind words. I could imagine co-maintaining, sure!

daffie’s picture

Issue summary: View changes
Status: Needs review » Needs work

Most changes look good to me. I have 2 remarks about the patch:

  1. +++ b/tests/src/Functional/CommentNotifyNotificationsTest.php
    @@ -18,12 +18,23 @@ class CommentNotifyNotificationsTest extends CommentNotifyTestBase {
    +  /**
    +   * Exempt from strict schema checking.
    +   *
    +   * This is due to saving configuration with a missing schema for terms.
    +   *
    +   * @see \Drupal\Core\Config\Development\ConfigSchemaChecker
    +   *
    +   * @var bool
    +   */
    +  protected $strictConfigSchema = FALSE;
    

    This change looks wrong to me. Lets just add the config schema.

  2. +++ b/comment_notify.info.yml
    @@ -6,4 +6,4 @@ dependencies:
    -core_version_requirement: ^8 || ^9
    +core_version_requirement: ">=8"
    
    +++ b/composer.json
    @@ -23,7 +23,6 @@
    -        "drupal/core": "^8 || ^9",
    

    I am not happy with this change. It is now implying that this version will work with all future version of Drupal core. Only we have now idea what changes will be in future versions of Drupal core.

klemendev’s picture

@KlemenDEV could you describe your review as you set to RTBC?

I have marked it based on the 10.0.1 testing of @yashingole and I myself patched the module on the 9.5.3 website, verified configuration (site-wide and user form) still worked, and left some comments (two different comment types), and made sure the email was sent properly. Also, no errors or warnings were logged by the PHP (8.1.11).

stefanos.petrakis’s picture

Status: Needs work » Needs review

Back to NR after responding to @daffie 's comment in #27 (thanks for the extra eyes!)

daffie’s picture

Status: Needs review » Reviewed & tested by the community

It looks good to me.
All my remarks have been addressed.

greggles’s picture

Status: Reviewed & tested by the community » Fixed

@KlemenDEV thanks for comment in #28. I appreciate that extra detail.

@stefanos.petrakis and @daffie thanks for the extra review and changes! I've now merged it so I think this issue can be marked as fixed.

greggles’s picture

I filed #3344353: New release, new co-maintainer about new comaintainer and new release. Thanks!

Status: Fixed » Closed (fixed)

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