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.

Update: 15 August 2024

Scheduler 2.1.0 is released, and this compatible with Drupal 11.

Issue fork scheduler-3434325

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
new1012 bytes
new3.13 KB

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-127659

These packages were used to generate the fixes:

  1. drupal/upgrade_status: 4.1.0
  2. mglaman/phpstan-drupal: 1.2.9
  3. palantirnet/drupal-rector: 0.20.1

Rajeshreeputra made their first commit to this issue’s fork.

jonathan1055 made their first commit to this issue’s fork.

jonathan1055’s picture

Issue summary: View changes

Hi @Rajeshreeputra,
I have removed your manual commits, as I want this issue to remain only for the automated Project Update Bot suggestions. If you would like to help please create separate issues to fix the different problems.
Thanks

chandu7929’s picture

Status: Needs review » Needs work

Running command ./vendor/bin/drush upgrade_status:analyze scheduler I can see following issue, which need to be fixed.

================================================================================
Scheduler, --
Scanned on Fri, 05/31/2024 - 13:02

FILE: modules/contrib/scheduler/src/SchedulerManager.php

STATUS         LINE                           MESSAGE                           
--------------------------------------------------------------------------------
Fix now        930  Call to deprecated method loadRevision() of class           
                    Drupal\Core\Entity\EntityStorageInterface. Deprecated in    
                    drupal:10.1.0 and is removed from drupal:11.0.0. Use        
                    Drupal\Core\Entity\RevisionableStorageInterface::loadRevisio
                    n instead.                                                  
--------------------------------------------------------------------------------

FILE: modules/contrib/scheduler/scheduler.info.yml

STATUS         LINE                           MESSAGE                           
--------------------------------------------------------------------------------
Check manually 4    Value of core_version_requirement: ^8 || ^9 || ^10 is not   
                    compatible with the next major version of Drupal core. See  
                    https://drupal.org/node/3070687.                            
--------------------------------------------------------------------------------

FILE:
modules/contrib/scheduler/scheduler_rules_integration/scheduler_rules_integratio
n.info.yml

STATUS         LINE                           MESSAGE                           
--------------------------------------------------------------------------------
Check manually 4    Value of core_version_requirement: ^8 || ^9 || ^10 is not   
                    compatible with the next major version of Drupal core. See  
                    https://drupal.org/node/3070687.                            
--------------------------------------------------------------------------------
chandu7929’s picture

Version: 2.0.1 » 2.x-dev
chandu7929’s picture

I ran tests locally and can see 272 error with same message: "Undefined array key "commerce_product"

Time: 07:47.584, Memory: 28.00 MB

There were 272 errors:

1) Drupal\Tests\scheduler_rules_integration\Functional\SchedulerRulesActionsTest::testPublishOnActions with data set "#node" ('node', 'testpage')
Undefined array key "commerce_product"
jonathan1055’s picture

With regard to your comment in #7 that is exactly what the phpstan job shows
https://git.drupalcode.org/project/scheduler/-/jobs/1740052

For #9 that key is is the entity type used in testing, you need the Commerce module.

chandu7929’s picture

Status: Needs work » Needs review

Thanks @jonathan1055, I have updated MR with deprecation fix reported in #7 hence moving back in review.

jonathan1055’s picture

Thanks chandu9729. But I already have that covered in a separate issue
#3451737: Fix call to deprecated method loadRevision()

This project-update-bot-only branch will not have any manual commits added to it, as I said in #6 above.

jonathan1055 changed the visibility of the branch 3434325-automated-drupal-11 to hidden.

jonathan1055’s picture

vishalkhode’s picture

Status: Needs review » Needs work

Changes looks good to me. However, when I ran the full PHPUnit tests in my local against Drupal Core 10.3.0, so I found following failures. I think this should also exists in Drupal 11 as well and we need to fix below as well.:

1) Drupal\Tests\scheduler\FunctionalJavascript\SchedulerJavascriptVerticalTabsTest::testEditEntitySummary with data set "#taxonomy_term" ('taxonomy_term', 'test_vocab')
WebDriver\Exception\ElementNotInteractable: element not interactable
  (Session info: chrome-headless-shell=125.0.6422.112)
  (Driver info: chromedriver=125.0.6422.78 (14db42ec38aded3304a3e624a0a038e02956b87e-refs/branch-heads/6422@{#1088}),platform=Mac OS X 14.4.1 x86_64)

/Users/vishal.khode/drupal10/vendor/instaclick/php-webdriver/lib/WebDriver/Exception.php:198
/Users/vishal.khode/drupal10/vendor/instaclick/php-webdriver/lib/WebDriver/AbstractWebDriver.php:168
/Users/vishal.khode/drupal10/vendor/instaclick/php-webdriver/lib/WebDriver/AbstractWebDriver.php:237
/Users/vishal.khode/drupal10/vendor/instaclick/php-webdriver/lib/WebDriver/Container.php:241
/Users/vishal.khode/drupal10/vendor/behat/mink-selenium2-driver/src/Selenium2Driver.php:678
/Users/vishal.khode/drupal10/docroot/core/tests/Drupal/FunctionalJavascriptTests/DrupalSelenium2Driver.php:176
/Users/vishal.khode/drupal10/docroot/core/tests/Drupal/FunctionalJavascriptTests/DrupalSelenium2Driver.php:210
/Users/vishal.khode/drupal10/docroot/core/tests/Drupal/FunctionalJavascriptTests/DrupalSelenium2Driver.php:146
/Users/vishal.khode/drupal10/vendor/behat/mink/src/Element/NodeElement.php:118
/Users/vishal.khode/drupal10/vendor/behat/mink/src/Element/TraversableElement.php:166
/Users/vishal.khode/drupal10/docroot/modules/contrib/scheduler/tests/src/FunctionalJavascript/SchedulerJavascriptVerticalTabsTest.php:50
/Users/vishal.khode/drupal10/vendor/phpunit/phpunit/src/Framework/TestResult.php:729

--

There were 5 failures:

1) Drupal\Tests\scheduler\Functional\SchedulerDrushTest::testDrushCronMessages
Starting dblog message not found
Failed asserting that '[notice] Message: Scheduler lightweight cron completed.' contains "Lightweight cron run activated by drush command".

/Users/vishal.khode/drupal10/vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php:122
/Users/vishal.khode/drupal10/vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php:56
/Users/vishal.khode/drupal10/docroot/modules/contrib/scheduler/tests/src/Functional/SchedulerDrushTest.php:24
/Users/vishal.khode/drupal10/vendor/phpunit/phpunit/src/Framework/TestResult.php:729

2) Drupal\Tests\scheduler\Functional\SchedulerDrushTest::testDrushCronPublishing with data set "#node" ('node', 'testpage')
Scheduled publishing message not found
Failed asserting that '[notice] Message: Scheduler lightweight cron completed.' contains "Test Page: scheduled publishing of ay449b2rjuzomy87h01y for publishing".

/Users/vishal.khode/drupal10/vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php:122
/Users/vishal.khode/drupal10/vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php:56
/Users/vishal.khode/drupal10/docroot/modules/contrib/scheduler/tests/src/Functional/SchedulerDrushTest.php:68
/Users/vishal.khode/drupal10/vendor/phpunit/phpunit/src/Framework/TestResult.php:729

3) Drupal\Tests\scheduler\Functional\SchedulerDrushTest::testDrushCronPublishing with data set "#media" ('media', 'test_video')
Scheduled publishing message not found
Failed asserting that '[notice] Message: Scheduler lightweight cron completed.' contains "Test Video: scheduled publishing of lsszm36mtvbepdjcliu6 for publishing".

/Users/vishal.khode/drupal10/vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php:122
/Users/vishal.khode/drupal10/vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php:56
/Users/vishal.khode/drupal10/docroot/modules/contrib/scheduler/tests/src/Functional/SchedulerDrushTest.php:68
/Users/vishal.khode/drupal10/vendor/phpunit/phpunit/src/Framework/TestResult.php:729

4) Drupal\Tests\scheduler\Functional\SchedulerDrushTest::testDrushCronPublishing with data set "#commerce_product" ('commerce_product', 'test_product')
Scheduled publishing message not found
Failed asserting that '[notice] Message: Scheduler lightweight cron completed.' contains "Test Product: scheduled publishing of amzf02855ljneuydogrr for publishing".

/Users/vishal.khode/drupal10/vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php:122
/Users/vishal.khode/drupal10/vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php:56
/Users/vishal.khode/drupal10/docroot/modules/contrib/scheduler/tests/src/Functional/SchedulerDrushTest.php:68
/Users/vishal.khode/drupal10/vendor/phpunit/phpunit/src/Framework/TestResult.php:729

5) Drupal\Tests\scheduler\Functional\SchedulerDrushTest::testDrushCronPublishing with data set "#taxonomy_term" ('taxonomy_term', 'test_vocab')
Scheduled publishing message not found
Failed asserting that '[notice] Message: Scheduler lightweight cron completed.' contains "Test Vocabulary: scheduled publishing of unqwbhdfa5rykf0wci6p for publishing".

/Users/vishal.khode/drupal10/vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php:122
/Users/vishal.khode/drupal10/vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php:56
/Users/vishal.khode/drupal10/docroot/modules/contrib/scheduler/tests/src/Functional/SchedulerDrushTest.php:68
/Users/vishal.khode/drupal10/vendor/phpunit/phpunit/src/Framework/TestResult.php:729

Apart from this, we also need to update the dataProvider method for each tests and convert all DataProvider methods to static method, otherwise tests will fail on Drupal 11.

chandu7929 changed the visibility of the branch 3434325-automated-drupal-11 to active.

chandu7929’s picture

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

Hence pushed changes in separate branch to fix failing tests.

@vishalkhode - The test you have mentioned are not being run in current CI, hence I have created separate MR and will update CI accordingly to fix all the test failure in minor as well as major version of Drupal

chandu7929 changed the visibility of the branch project-update-bot-only to hidden.

chandu7929’s picture

Latest status:

I can see multiple issue while running test with major version:

  1. Devel module is not compatible with D11 and causes requirement issue, refer issue: https://gitlab.com/drupalspoons/devel/-/issues/527
  2. Using module with _LENIENT_ALLOW_LIST, it adds modules initial version for given requirement which causes different issue, for example if you check rules module its downloading(3.0.0-alpha1) version and gives error like:
    The 'core_version_requirement' key must be present in modules/contrib/rules/rules.info.yml

We should revisit this issue once we have D11 compatible release for rules and devel module at least.

@vishal for the point you have raised:

ankitv18 made their first commit to this issue’s fork.

ankitv18’s picture

Status: Needs work » Needs review

Rebased the MR with 2.x-dev and now pipelines are passing.

vishalkhode’s picture

Status: Needs review » Reviewed & tested by the community

I ran the complete tests in my local against Drupal 11.0.0-beta1 and following is the results:

Time: 03:57:30.250, Memory: 30.00 MB

There were 16 errors:
  1) Drupal\Tests\scheduler\FunctionalJavascript\SchedulerJavascriptDefaultTimeTest::testTimeWhenSchedulingIsRequired with data set "#node-1" ('node', 'testpage', 'publish')
  Error: Call to undefined method Drupal\Tests\scheduler\FunctionalJavascript\SchedulerJavascriptDefaultTimeTest::getName()

    /Users/user1/drupal11.0.0-beta1/docroot/modules/contrib/scheduler/tests/src/FunctionalJavascript/SchedulerJavascriptTestBase.php:62
    /Users/user1/drupal11.0.0-beta1/docroot/modules/contrib/scheduler/tests/src/FunctionalJavascript/SchedulerJavascriptDefaultTimeTest.php:23

    2) Drupal\Tests\scheduler\FunctionalJavascript\SchedulerJavascriptDefaultTimeTest::testTimeWhenSchedulingIsRequired with data set "#node-2" ('node', 'testpage', 'unpublish')
  Error: Call to undefined method Drupal\Tests\scheduler\FunctionalJavascript\SchedulerJavascriptDefaultTimeTest::getName()

    /Users/user1/drupal11.0.0-beta1/docroot/modules/contrib/scheduler/tests/src/FunctionalJavascript/SchedulerJavascriptTestBase.php:62
    /Users/user1/drupal11.0.0-beta1/docroot/modules/contrib/scheduler/tests/src/FunctionalJavascript/SchedulerJavascriptDefaultTimeTest.php:23

    3) Drupal\Tests\scheduler\FunctionalJavascript\SchedulerJavascriptDefaultTimeTest::testTimeWhenSchedulingIsRequired with data set "#media-1" ('media', 'test_video', 'publish')
  Error: Call to undefined method Drupal\Tests\scheduler\FunctionalJavascript\SchedulerJavascriptDefaultTimeTest::getName()

    /Users/user1/drupal11.0.0-beta1/docroot/modules/contrib/scheduler/tests/src/FunctionalJavascript/SchedulerJavascriptTestBase.php:62
    /Users/user1/drupal11.0.0-beta1/docroot/modules/contrib/scheduler/tests/src/FunctionalJavascript/SchedulerJavascriptDefaultTimeTest.php:23

    4) Drupal\Tests\scheduler\FunctionalJavascript\SchedulerJavascriptDefaultTimeTest::testTimeWhenSchedulingIsRequired with data set "#media-2" ('media', 'test_video', 'unpublish')
  Error: Call to undefined method Drupal\Tests\scheduler\FunctionalJavascript\SchedulerJavascriptDefaultTimeTest::getName()

    /Users/user1/drupal11.0.0-beta1/docroot/modules/contrib/scheduler/tests/src/FunctionalJavascript/SchedulerJavascriptTestBase.php:62
    /Users/user1/drupal11.0.0-beta1/docroot/modules/contrib/scheduler/tests/src/FunctionalJavascript/SchedulerJavascriptDefaultTimeTest.php:23

    5) Drupal\Tests\scheduler\FunctionalJavascript\SchedulerJavascriptDefaultTimeTest::testTimeWhenSchedulingIsRequired with data set "#commerce_product-1" ('commerce_product', 'test_product', 'publish')
  Error: Call to undefined method Drupal\Tests\scheduler\FunctionalJavascript\SchedulerJavascriptDefaultTimeTest::getName()

    /Users/user1/drupal11.0.0-beta1/docroot/modules/contrib/scheduler/tests/src/FunctionalJavascript/SchedulerJavascriptTestBase.php:62
    /Users/user1/drupal11.0.0-beta1/docroot/modules/contrib/scheduler/tests/src/FunctionalJavascript/SchedulerJavascriptDefaultTimeTest.php:23

    6) Drupal\Tests\scheduler\FunctionalJavascript\SchedulerJavascriptDefaultTimeTest::testTimeWhenSchedulingIsRequired with data set "#commerce_product-2" ('commerce_product', 'test_product', 'unpublish')
  Error: Call to undefined method Drupal\Tests\scheduler\FunctionalJavascript\SchedulerJavascriptDefaultTimeTest::getName()

    /Users/user1/drupal11.0.0-beta1/docroot/modules/contrib/scheduler/tests/src/FunctionalJavascript/SchedulerJavascriptTestBase.php:62
    /Users/user1/drupal11.0.0-beta1/docroot/modules/contrib/scheduler/tests/src/FunctionalJavascript/SchedulerJavascriptDefaultTimeTest.php:23

    7) Drupal\Tests\scheduler\FunctionalJavascript\SchedulerJavascriptDefaultTimeTest::testTimeWhenSchedulingIsRequired with data set "#taxonomy_term-1" ('taxonomy_term', 'test_vocab', 'publish')
  Error: Call to undefined method Drupal\Tests\scheduler\FunctionalJavascript\SchedulerJavascriptDefaultTimeTest::getName()

    /Users/user1/drupal11.0.0-beta1/docroot/modules/contrib/scheduler/tests/src/FunctionalJavascript/SchedulerJavascriptTestBase.php:62
    /Users/user1/drupal11.0.0-beta1/docroot/modules/contrib/scheduler/tests/src/FunctionalJavascript/SchedulerJavascriptDefaultTimeTest.php:23

    8) Drupal\Tests\scheduler\FunctionalJavascript\SchedulerJavascriptDefaultTimeTest::testTimeWhenSchedulingIsRequired with data set "#taxonomy_term-2" ('taxonomy_term', 'test_vocab', 'unpublish')
  Error: Call to undefined method Drupal\Tests\scheduler\FunctionalJavascript\SchedulerJavascriptDefaultTimeTest::getName()

    /Users/user1/drupal11.0.0-beta1/docroot/modules/contrib/scheduler/tests/src/FunctionalJavascript/SchedulerJavascriptTestBase.php:62
    /Users/user1/drupal11.0.0-beta1/docroot/modules/contrib/scheduler/tests/src/FunctionalJavascript/SchedulerJavascriptDefaultTimeTest.php:23

    9) Drupal\Tests\scheduler\FunctionalJavascript\SchedulerJavascriptVerticalTabsTest::testEditEntitySummary with data set "#node" ('node', 'testpage')
  Error: Call to undefined method Drupal\Tests\scheduler\FunctionalJavascript\SchedulerJavascriptVerticalTabsTest::getName()

    /Users/user1/drupal11.0.0-beta1/docroot/modules/contrib/scheduler/tests/src/FunctionalJavascript/SchedulerJavascriptTestBase.php:62

    10) Drupal\Tests\scheduler\FunctionalJavascript\SchedulerJavascriptVerticalTabsTest::testEditEntitySummary with data set "#media" ('media', 'test_video')
  Error: Call to undefined method Drupal\Tests\scheduler\FunctionalJavascript\SchedulerJavascriptVerticalTabsTest::getName()

    /Users/user1/drupal11.0.0-beta1/docroot/modules/contrib/scheduler/tests/src/FunctionalJavascript/SchedulerJavascriptTestBase.php:62

    11) Drupal\Tests\scheduler\FunctionalJavascript\SchedulerJavascriptVerticalTabsTest::testEditEntitySummary with data set "#commerce_product" ('commerce_product', 'test_product')
  Error: Call to undefined method Drupal\Tests\scheduler\FunctionalJavascript\SchedulerJavascriptVerticalTabsTest::getName()

    /Users/user1/drupal11.0.0-beta1/docroot/modules/contrib/scheduler/tests/src/FunctionalJavascript/SchedulerJavascriptTestBase.php:62

    12) Drupal\Tests\scheduler\FunctionalJavascript\SchedulerJavascriptVerticalTabsTest::testEditEntitySummary with data set "#taxonomy_term" ('taxonomy_term', 'test_vocab')
  Error: Call to undefined method Drupal\Tests\scheduler\FunctionalJavascript\SchedulerJavascriptVerticalTabsTest::getName()

    /Users/user1/drupal11.0.0-beta1/docroot/modules/contrib/scheduler/tests/src/FunctionalJavascript/SchedulerJavascriptTestBase.php:62

    13) Drupal\Tests\scheduler\FunctionalJavascript\SchedulerJavascriptVerticalTabsTest::testConfigureEntityTypeSummary with data set "#node" ('node', 'testpage')
  Error: Call to undefined method Drupal\Tests\scheduler\FunctionalJavascript\SchedulerJavascriptVerticalTabsTest::getName()

    /Users/user1/drupal11.0.0-beta1/docroot/modules/contrib/scheduler/tests/src/FunctionalJavascript/SchedulerJavascriptTestBase.php:62

    14) Drupal\Tests\scheduler\FunctionalJavascript\SchedulerJavascriptVerticalTabsTest::testConfigureEntityTypeSummary with data set "#media" ('media', 'test_video')
  Error: Call to undefined method Drupal\Tests\scheduler\FunctionalJavascript\SchedulerJavascriptVerticalTabsTest::getName()

    /Users/user1/drupal11.0.0-beta1/docroot/modules/contrib/scheduler/tests/src/FunctionalJavascript/SchedulerJavascriptTestBase.php:62

    15) Drupal\Tests\scheduler\FunctionalJavascript\SchedulerJavascriptVerticalTabsTest::testConfigureEntityTypeSummary with data set "#commerce_product" ('commerce_product', 'test_product')
  Error: Call to undefined method Drupal\Tests\scheduler\FunctionalJavascript\SchedulerJavascriptVerticalTabsTest::getName()

    /Users/user1/drupal11.0.0-beta1/docroot/modules/contrib/scheduler/tests/src/FunctionalJavascript/SchedulerJavascriptTestBase.php:62

    16) Drupal\Tests\scheduler\FunctionalJavascript\SchedulerJavascriptVerticalTabsTest::testConfigureEntityTypeSummary with data set "#taxonomy_term" ('taxonomy_term', 'test_vocab')
  Error: Call to undefined method Drupal\Tests\scheduler\FunctionalJavascript\SchedulerJavascriptVerticalTabsTest::getName()

    /Users/user1/drupal11.0.0-beta1/docroot/modules/contrib/scheduler/tests/src/FunctionalJavascript/SchedulerJavascriptTestBase.php:62

    --

  There were 5 failures:

    1) Drupal\Tests\scheduler\Functional\SchedulerFieldsDisplayTest::testManageFormDisplay with data set "#node" ('node', 'testpage')
  Behat\Mink\Exception\ElementNotFoundException: Form field with id|name|label|value "edit-fields-scheduler-settings-weight" not found.

    /Users/user1/drupal11.0.0-beta1/vendor/behat/mink/src/WebAssert.php:731
    /Users/user1/drupal11.0.0-beta1/docroot/modules/contrib/scheduler/tests/src/Functional/SchedulerFieldsDisplayTest.php:83

    2) Drupal\Tests\scheduler\Functional\SchedulerFieldsDisplayTest::testManageFormDisplay with data set "#media" ('media', 'test_video')
  Behat\Mink\Exception\ElementNotFoundException: Form field with id|name|label|value "edit-fields-scheduler-settings-weight" not found.

    /Users/user1/drupal11.0.0-beta1/vendor/behat/mink/src/WebAssert.php:731
    /Users/user1/drupal11.0.0-beta1/docroot/modules/contrib/scheduler/tests/src/Functional/SchedulerFieldsDisplayTest.php:83

    3) Drupal\Tests\scheduler\Functional\SchedulerFieldsDisplayTest::testManageFormDisplay with data set "#commerce_product" ('commerce_product', 'test_product')
  Behat\Mink\Exception\ElementNotFoundException: Form field with id|name|label|value "edit-fields-scheduler-settings-weight" not found.

    /Users/user1/drupal11.0.0-beta1/vendor/behat/mink/src/WebAssert.php:731
    /Users/user1/drupal11.0.0-beta1/docroot/modules/contrib/scheduler/tests/src/Functional/SchedulerFieldsDisplayTest.php:83

    4) Drupal\Tests\scheduler\Functional\SchedulerViewsAccessTest::testViewScheduledContentUser with data set "#node" ('node', 'testpage')
  Behat\Mink\Exception\ResponseTextException: The pattern /No scheduled (content|media) for user Admolly the Admin user/ was not found anywhere in the text of the current page.

    /Users/user1/drupal11.0.0-beta1/vendor/behat/mink/src/WebAssert.php:907
    /Users/user1/drupal11.0.0-beta1/vendor/behat/mink/src/WebAssert.php:329
    /Users/user1/drupal11.0.0-beta1/docroot/modules/contrib/scheduler/tests/src/Functional/SchedulerViewsAccessTest.php:176

    5) Drupal\Tests\scheduler\Functional\SchedulerViewsAccessTest::testViewScheduledContentUser with data set "#media" ('media', 'test_video')
  Behat\Mink\Exception\ResponseTextException: The pattern /No scheduled (content|media) for user Admolly the Admin user/ was not found anywhere in the text of the current page.

    /Users/user1/drupal11.0.0-beta1/vendor/behat/mink/src/WebAssert.php:907
    /Users/user1/drupal11.0.0-beta1/vendor/behat/mink/src/WebAssert.php:329
    /Users/user1/drupal11.0.0-beta1/docroot/modules/contrib/scheduler/tests/src/Functional/SchedulerViewsAccessTest.php:176

Tests: 259, Assertions: 6241, Errors: 16, Failures: 5, Deprecations: 32, Skipped: 6.
  1. The Top 16 errors as mentioned above will be fixed in #3458430: Call to undefined method getName when running PHPUnit tests on Drupal 11.
  2. The 3 failures which says "edit-fields-scheduler-settings-weight" not found was coming due to Inline Entity Form module. I've fixed it as part of MR !115 specifically here.
  3. The 2 failures which says No scheduled (content|media) for user has been introduced due to #3453360: Expand the views test to check user name or id and I believe it will be fixed in #3451750: Fix: The update to convert "numeric" arguments to "entity_target_id" is deprecated.
  4. The 6 skipped tests will be fixed in #3359998: SchedulerDrushTest fails on Gitlab-CI but OK on drupal.org.

So, looks like no additional changes are required as part of this ticket. Hence, moving it ahead.

vishalkhode’s picture

@jonathan1055: It would be helpful if you can update us about your plans to review & merge MR and get a pre/stable version of Scheduler module.

vipin.mittal18’s picture

Hello Jonathan,

I hope you are doing well!

As you are the only active maintainer of scheduler, It would be helpful if you could inform us when you intend to release a pre/stable version of scheduler as Drupal 11 stable is nearing its release date. Thanks!

vipin.mittal18’s picture

Hello Jonathan,

Please accept my apologies for bothering you, but I would appreciate it if you could release a Drupal 11 compatible version as we have put in a great deal of effort to fix the compatibility issues. If you are no longer maintaining this, please add me as a maintainer, so we can provide support for Drupal 11 customers that will be very helpful in the long run.

Thanks!

jonathan1055’s picture

Status: Reviewed & tested by the community » Active
Related issues: +#3458430: Call to undefined method getName when running PHPUnit tests on Drupal 11

I have been on holiday, just returned today. I have lots to catch up on, and will review the issues in turn. Please be patient. As stated in #6 this issue will be left open for the automated MR bot, hence setting back to active. Separate issues are used for the actual fixes.

I have added one related issue, making three in total. Are you aware of any others that are required for D11 compatibility?

vishalkhode’s picture

Hi @jonathan1055

Thanks for the reply. Included two more tickets for separate fixes required for Drupal 11 compatibility.

Separate issues are used for the actual fixes.

I've cherry-picked commit from all these tickets which are required to make module Drupal 11 compatible and also added one temp commit: 47066616 to run tests on Drupal 11 and you can see all PHPUnit tests are passing (https://git.drupalcode.org/issue/scheduler-3434325/-/pipelines/230921) except following deprecation errors out of which only one is related to Scheduler module.

  1. The update to convert "numeric" arguments to "entity_target_id" for entity
        reference fields for view "scheduler_scheduled_content" is deprecated in
        drupal:10.3.0 and is removed from drupal:12.0.0

    The above will be fixed in #3451750: Fix: The update to convert "numeric" arguments to "entity_target_id" is deprecated

  2. "Drupal\entity\EventSubscriber\EntityDuplicateSubscriber" now to avoid
        errors or add an explicit @return annotation to suppress this message.
    "Drupal\rules\EventSubscriber\GenericEventSubscriber" now to avoid errors
    or add an explicit @return annotation to suppress this message.

    The above deprecation errors are coming from Embed & Rules module.

jonathan1055’s picture

I have created a separate issue #3463494: Gitlab PHPunit jobs at D11 need compatible test dependencies which can be committed first. Then we can properly test the other D11 issue.
Thanks to @vishalkhode for providing the alternative repo info.

deepakkm made their first commit to this issue’s fork.

chandu7929’s picture

Once we merge change of 3463494-inline-entity-form it will start running test on next major.

chandu7929’s picture

There are conflicts, need to resolve and push should do the job.

chandu7929’s picture

I think there is only pending item :https://www.drupal.org/project/scheduler/issues/3451750

vishalkhode’s picture

@jonathan1055 Can you please confirm, what's pending for Drupal 11 compatibility fixes ? Everything looks good now. When this is planned for merge & release ?

jonathan1055’s picture

Thank you for working on #3467349: PHPStan at D11 - Drupal\scheduler\SchedulerManager::Drupal\scheduler\formatOutputText() does not exist. Yes there are no more blockers for D11 release.

The current latest tag is 2.0.4 so I am just wondering whether the D11-compatible release would be good as 2.1.0 not 2.0.5 ?

jonathan1055’s picture

Status: Active » Fixed

I have released Scheduler 2.1.0

Thank you everyone for your contributions here.

jonathan1055’s picture

Issue summary: View changes

Updated the summary with link to 2.1.0

jonathan1055’s picture

Title: Automated Drupal 11 compatibility fixes for scheduler » Drupal 11 compatibility fixes [2.x]
Related issues: +#3451287: Drupal 11 compatibility fixes [8.x-1.x]

Changed the title to be specifically for the 2.x branch to distinguish it from #3451287: Drupal 11 compatibility fixes [8.x-1.x]

Status: Fixed » Closed (fixed)

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