This is the parent issue to gather together all things relating to Drupal9 Readiness for Scheduler.

As at 16 May 2020 Scheduler passes all tests at Core 9.0 and uses no deprecated functions.

The Scheduler Rules Integration sub-module works with Rules 8.x-3.x and this also now runs on D9.

Comments

jonathan1055 created an issue. See original summary.

jonathan1055’s picture

Issue tags: -Drupal9 Readiness +Drupal 9 compatibility

'Drupal 9 compatibility' is the preferred tag for contrib projects preparing for D9

jonathan1055’s picture

Issue summary: View changes

The Scheduler Rules Integration tests have been temporarily skipped.

mrpauldriver’s picture

I am seeing a number of warnings when tested with Upgrade Status module. Are these cause for concern?

CUSTOM PROJECTS
--------------------------------------------------------------------------------
Scheduler
Scanned on Tue, 05/19/2020 - 11:41.

21 warnings found.

web/modules/contrib/scheduler/scheduler.drush.inc:
┌──────────┬──────┬─────────────────────────────────────────────────┐
│  STATUS  │ LINE │                     MESSAGE                     │
├──────────┼──────┼─────────────────────────────────────────────────┤
│ Check    │ 32   │ Call to deprecated function drush_get_option(). │
│ manually │      │                                                 │
└──────────┴──────┴─────────────────────────────────────────────────┘

web/modules/contrib/scheduler/scheduler_rules_integration/src/Plugin/Condition/N
odeIsScheduledForPublishing.php:
┌──────────┬──────┬──────────────────────────────────────────────────────────┐
│  STATUS  │ LINE │                         MESSAGE                          │
├──────────┼──────┼──────────────────────────────────────────────────────────┤
│ Check    │      │ Class Drupal\rules\Core\RulesConditionBase not found and │
│ manually │      │ could not be autoloaded.                                 │
│          │      │                                                          │
│ Check    │ 22   │ Class Drupal\rules\Core\RulesConditionBase not found and │
│ manually │      │ could not be autoloaded.                                 │
│          │      │                                                          │
└──────────┴──────┴──────────────────────────────────────────────────────────┘

web/modules/contrib/scheduler/scheduler_rules_integration/src/Plugin/Condition/N
odeIsScheduledForUnpublishing.php:
┌──────────┬──────┬──────────────────────────────────────────────────────────┐
│  STATUS  │ LINE │                         MESSAGE                          │
├──────────┼──────┼──────────────────────────────────────────────────────────┤
│ Check    │      │ Class Drupal\rules\Core\RulesConditionBase not found and │
│ manually │      │ could not be autoloaded.                                 │
│          │      │                                                          │
│ Check    │ 22   │ Class Drupal\rules\Core\RulesConditionBase not found and │
│ manually │      │ could not be autoloaded.                                 │
│          │      │                                                          │
└──────────┴──────┴──────────────────────────────────────────────────────────┘

web/modules/contrib/scheduler/scheduler_rules_integration/src/Plugin/Condition/P
ublishingIsEnabled.php:
┌──────────┬──────┬──────────────────────────────────────────────────────────┐
│  STATUS  │ LINE │                         MESSAGE                          │
├──────────┼──────┼──────────────────────────────────────────────────────────┤
│ Check    │      │ Class Drupal\rules\Core\RulesConditionBase not found and │
│ manually │      │ could not be autoloaded.                                 │
│          │      │                                                          │
│ Check    │ 22   │ Class Drupal\rules\Core\RulesConditionBase not found and │
│ manually │      │ could not be autoloaded.                                 │
│          │      │                                                          │
└──────────┴──────┴──────────────────────────────────────────────────────────┘

web/modules/contrib/scheduler/scheduler_rules_integration/src/Plugin/Condition/U
npublishingIsEnabled.php:
┌──────────┬──────┬──────────────────────────────────────────────────────────┐
│  STATUS  │ LINE │                         MESSAGE                          │
├──────────┼──────┼──────────────────────────────────────────────────────────┤
│ Check    │      │ Class Drupal\rules\Core\RulesConditionBase not found and │
│ manually │      │ could not be autoloaded.                                 │
│          │      │                                                          │
│ Check    │ 22   │ Class Drupal\rules\Core\RulesConditionBase not found and │
│ manually │      │ could not be autoloaded.                                 │
│          │      │                                                          │
└──────────┴──────┴──────────────────────────────────────────────────────────┘

web/modules/contrib/scheduler/scheduler_rules_integration/src/Plugin/RulesAction
/PublishNow.php:
┌──────────┬──────┬─────────────────────────────────────────────────────────────┐
│  STATUS  │ LINE │                           MESSAGE                           │
├──────────┼──────┼─────────────────────────────────────────────────────────────┤
│ Check    │      │ Class Drupal\rules\Core\RulesActionBase not found and could │
│ manually │      │ not be autoloaded.                                          │
│          │      │                                                             │
│ Check    │ 22   │ Class Drupal\rules\Core\RulesActionBase not found and could │
│ manually │      │ not be autoloaded.                                          │
│          │      │                                                             │
└──────────┴──────┴─────────────────────────────────────────────────────────────┘

web/modules/contrib/scheduler/scheduler_rules_integration/src/Plugin/RulesAction
/RemovePublishingDate.php:
┌──────────┬──────┬─────────────────────────────────────────────────────────────┐
│  STATUS  │ LINE │                           MESSAGE                           │
├──────────┼──────┼─────────────────────────────────────────────────────────────┤
│ Check    │      │ Class Drupal\rules\Core\RulesActionBase not found and could │
│ manually │      │ not be autoloaded.                                          │
│          │      │                                                             │
│ Check    │ 24   │ Class Drupal\rules\Core\RulesActionBase not found and could │
│ manually │      │ not be autoloaded.                                          │
│          │      │                                                             │
└──────────┴──────┴─────────────────────────────────────────────────────────────┘

web/modules/contrib/scheduler/scheduler_rules_integration/src/Plugin/RulesAction
/RemoveUnpublishingDate.php:
┌──────────┬──────┬─────────────────────────────────────────────────────────────┐
│  STATUS  │ LINE │                           MESSAGE                           │
├──────────┼──────┼─────────────────────────────────────────────────────────────┤
│ Check    │      │ Class Drupal\rules\Core\RulesActionBase not found and could │
│ manually │      │ not be autoloaded.                                          │
│          │      │                                                             │
│ Check    │ 24   │ Class Drupal\rules\Core\RulesActionBase not found and could │
│ manually │      │ not be autoloaded.                                          │
│          │      │                                                             │
└──────────┴──────┴─────────────────────────────────────────────────────────────┘

web/modules/contrib/scheduler/scheduler_rules_integration/src/Plugin/RulesAction
/SetPublishingDate.php:
┌──────────┬──────┬─────────────────────────────────────────────────────────────┐
│  STATUS  │ LINE │                           MESSAGE                           │
├──────────┼──────┼─────────────────────────────────────────────────────────────┤
│ Check    │      │ Class Drupal\rules\Core\RulesActionBase not found and could │
│ manually │      │ not be autoloaded.                                          │
│          │      │                                                             │
│ Check    │ 28   │ Class Drupal\rules\Core\RulesActionBase not found and could │
│ manually │      │ not be autoloaded.                                          │
│          │      │                                                             │
└──────────┴──────┴─────────────────────────────────────────────────────────────┘

web/modules/contrib/scheduler/scheduler_rules_integration/src/Plugin/RulesAction
/SetUnpublishingDate.php:
┌──────────┬──────┬─────────────────────────────────────────────────────────────┐
│  STATUS  │ LINE │                           MESSAGE                           │
├──────────┼──────┼─────────────────────────────────────────────────────────────┤
│ Check    │      │ Class Drupal\rules\Core\RulesActionBase not found and could │
│ manually │      │ not be autoloaded.                                          │
│          │      │                                                             │
│ Check    │ 28   │ Class Drupal\rules\Core\RulesActionBase not found and could │
│ manually │      │ not be autoloaded.                                          │
│          │      │                                                             │
└──────────┴──────┴─────────────────────────────────────────────────────────────┘

web/modules/contrib/scheduler/scheduler_rules_integration/src/Plugin/RulesAction
/UnpublishNow.php:
┌──────────┬──────┬─────────────────────────────────────────────────────────────┐
│  STATUS  │ LINE │                           MESSAGE                           │
├──────────┼──────┼─────────────────────────────────────────────────────────────┤
│ Check    │      │ Class Drupal\rules\Core\RulesActionBase not found and could │
│ manually │      │ not be autoloaded.                                          │
│          │      │                                                             │
│ Check    │ 22   │ Class Drupal\rules\Core\RulesActionBase not found and could │
│ manually │      │ not be autoloaded.                                          │
│          │      │                                                             │
└──────────┴──────┴─────────────────────────────────────────────────────────────┘




jonathan1055’s picture

Hi MrPaulDriver,
The 10 'class could not be loaded' warnings are all regarding Scheduler Rules Integration. I had to remove the 'require-dev Rules' to allow the module to be tested at 9.0 at all, because Rules will not get loaded at 9.0 so our tests never got started. See #3136553: Cannot use Rules module in D9. If you can think of a way to get the tests running without having to exclude Rules then that would be very good.

The warning about Call to deprecated function drush_get_option() is not reported by PHPStan, so maybe Upgrade Status module is using a different list of functions or a different way to detect deprecated functions.

By the way, please could you edit your post and add <code> and </code> around your output so that it is formatted in a more readable way.

mrpauldriver’s picture

Thank you for reviewing. Post edited with < code > tags.

jonathan1055’s picture

StatusFileSize
new287.95 KB

Thanks. What version of Upgrade Status are you using? I am on 2.6.0 and Scheduler shows as green, nothing to report. It is working, because the report for Rules fails, see screen shot. I am not worried about the 10 'class not found and could not be autoloaded' as explained above, but I will investigate the drush_get_option() problem. It would be nice to see this for myself on my report, though.

upgrade status

mrpauldriver’s picture

We are using the same version of Upgrade Status. I am also running 8.8.5.

jonathan1055’s picture

I am using core 8.8-dev (which is later than 8.8.6) and also 8.9-dev (which is later than 8.9.0-beta3). I can understand why I am not seeing the Rules class warnings, because I do have Rules installed in those two environments. But it's the drush warning we need to resolve. Which Drush (if any) do you have? I'm using Drush 10.

grayle’s picture

StatusFileSize
new1.13 KB

drush_get_option() is deprecated in drush 9 and I believe removed from drush 10, but a lot of people are still using drush 8. Drush 9/10 ignores drush.inc anyway afaik, so I think it's safe to leave it in for the D8 users.

My upgrade status (2.9) doesn't seem to care about it either way. It did throw this though, against HEAD of 1.x-dev:

modules/contrib/scheduler/src/Plugin/Field/FieldWidget/TimestampDatetimeNoDefaul
tWidget.php:
┌─────────┬──────┬──────────────────────────────────────────────────────────────┐
│ STATUS  │ LINE │                           MESSAGE                            │
├─────────┼──────┼──────────────────────────────────────────────────────────────┤
│ Fix now │ 37   │ Call to deprecated method formatExample() of class           │
│         │      │ Drupal\Core\Datetime\Element\Datetime. Deprecated in Drupal  │
│         │      │ 8.6.x and will be removed before Drupal 9.0.0. HTML date     │
│         │      │ input format should not be exposed to users, as browser      │
│         │      │ widgets expose input differently, varying by vendor, locale, │
│         │      │ device type, etc.                                            │
│         │      │                                                              │
└─────────┴──────┴──────────────────────────────────────────────────────────────┘
dave reid’s picture

Status: Active » Needs review

  • jonathan1055 committed 19eb0a9 on 8.x-1.x authored by Grayle
    Issue #3136831 by Grayle, jonathan1055: Remove deprecated Datetime::...
jonathan1055’s picture

Title: Drupal9 Readiness and compatibility - Scheduler » [meta] Drupal9 Readiness and compatibility - Scheduler

Thanks Grayle,
I decided to remove that datetime example completely, as it is not used at all in Scheduler, and even if the widget was used elsewhere the html date and time example nearly always never matches the users browser implementation of date input.

Just for info, and for anyone else reading, this issue is the parent meta issue for Drupal9 readiness. For any specific deprecation shown in d9checker/phpstan please post it to #3042677: Drupal 9 Deprecated Code Report for Scheduler. Thanks

  • jonathan1055 committed 7529756 on 8.x-1.x
    Issue #3136831 by jonathan1055: Coding standards - remove unused use...
jonathan1055’s picture

Version: 8.x-1.x-dev » 2.x-dev

Work will be done on 2.x first.

jonathan1055’s picture

Issue summary: View changes
Status: Needs review » Fixed

Scheudler 8.x-1.x and 2.x have been compatible with Drupal 9 since April 2020 so this issue can be closed now.
#3079913: Add new 'core_version_requirement' key to .info.yml

Status: Fixed » Closed (fixed)

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