I've re-upload a patch for the latest dev release of business_rules. You will probably need to use this patch first prior to others and other patches might fail if they are depended on lines that are deprecated.
found some minor deprecation code Parameter $entity of method Drupal\business_rules\Plugin\EntityReferenceSelection\BusinessRulesViewsSelection::getParentFieldValue() has typehint with deprecated class Drupal\Core\Entity\Entity. Deprecated in drupal:8.7.0 and is removed from drupal:9.0.0. Use \Drupal\Core\Entity\EntityBase instead.
One thing which I don't know that should fix before fixing this issue:
These modules sub-modules (br_group,br_sms) are dependant on (dbug, sms, group) which are not ready for Drupal 9 so its dependent module having depreciation code their.
#22: See #19. If you'd like to help, please start there.
Also, when uploading patches, always provide interdiffs. Please also explain the reason for the change in your comment. Otherwise, we have no idea how it differs from the previous one by taking a quick glance.
Checking patch config/schema/business_rules_action.schema.yml...
error: while searching for:
to:
type: string
label: 'To'
subject:
type: text
label: 'Subject'
format:
type: string
label: 'Mail format'
error: patch failed: config/schema/business_rules_action.schema.yml:168
error: config/schema/business_rules_action.schema.yml: patch does not apply
It also removed the core info from the info files, which would prevent older D8 versions from working. I reversed this change. I also noticed that for some reason the subject is removed from the business_rules_action.schema.yml. I reversed this as well, until we have further clarification for the change.
Here is the new patch and the interdiff for both my patch and for tbcan's patch.
This all looks good, except for some things that could be using dependency injection:
+++ b/src/Controller/ScheduleController.php
@@ -211,13 +212,13 @@ class ScheduleController extends ControllerBase implements ContainerInjectionInt
+ '%date' => \Drupal::service('date.formatter')->format($schedule->getRevisionCreationTime()),
+++ b/src/Form/ScheduleForm.php
@@ -82,7 +82,7 @@ class ScheduleForm extends ContentEntityForm {
+ $entity->setRevisionCreationTime(\Drupal::time()->getRequestTime());
+++ b/src/Form/ScheduleRevisionDeleteForm.php
@@ -73,7 +73,7 @@ class ScheduleRevisionDeleteForm extends ConfirmFormBase {
+ return t('Are you sure you want to delete the revision from %revision-date?', ['%revision-date' => \Drupal::service('date.formatter')->format($this->revision->getRevisionCreationTime())]);
@@ -107,7 +107,7 @@ class ScheduleRevisionDeleteForm extends ConfirmFormBase {
+ $this->messenger()->addMessage(t('Revision from %revision-date of Schedule %title has been deleted.', ['%revision-date' => \Drupal::service('date.formatter')->format($this->revision->getRevisionCreationTime()), '%title' => $this->revision->label()]));
+++ b/src/Form/ScheduleRevisionRevertForm.php
@@ -120,7 +120,7 @@ class ScheduleRevisionRevertForm extends ConfirmFormBase {
+ \Drupal::messenger()->addMessage(t('Schedule %title has been reverted to the revision from %revision-date.', ['%title' => $this->revision->label(), '%revision-date' => $this->dateFormatter->format($original_revision_timestamp)]));
@@ -141,7 +141,7 @@ class ScheduleRevisionRevertForm extends ConfirmFormBase {
+ $revision->setRevisionCreationTime(\Drupal::time()->getRequestTime());
+++ b/src/Form/ScheduleRevisionRevertTranslationForm.php
@@ -107,7 +107,7 @@ class ScheduleRevisionRevertTranslationForm extends ScheduleRevisionRevertForm {
+ $revision->setRevisionCreationTime(\Drupal::time()->getRequestTime());
+++ b/src/Plugin/BusinessRulesAction/FetchEntityVariableAction.php
@@ -293,7 +293,7 @@ class FetchEntityVariableAction extends BusinessRulesActionPlugin {
+ \Drupal::messenger()->addError($e);
+++ b/src/Plugin/BusinessRulesAction/ShowMessage.php
@@ -66,8 +66,7 @@ class ShowMessage extends BusinessRulesActionPlugin {
+ \Drupal::messenger()->all($message, $message_type);
But it's good enough for the first alpha, and these things can be updated in a follow-up. We're still going to need tests for a stable release, however.
Comments
Comment #2
rudranil29 commentedComment #3
rudranil29 commentedpatch for drupal 9 compatibility
Comment #4
rudranil29 commentedComment #5
margaritka.kurkul commentedHello,
I got an error during applying the patch
Could you please check?
Comment #6
lexsoft00 commentedHi @margaritka.kurkul,
I've re-upload a patch for the latest dev release of business_rules. You will probably need to use this patch first prior to others and other patches might fail if they are depended on lines that are deprecated.
Comment #7
lexsoft00 commentedComment #8
lexsoft00 commentedFix toUrl() links on rule disable
Comment #9
lexsoft00 commentedSome of the changed functions need to be reviewed before added in.
I suggest until we have added tests to this module not to implement this.
Comment #10
BalajiDS commentedRemove Warning:
Comment #11
mrinalini9 commentedComment #12
mrinalini9 commentedRerolled patch #8 as it failed to apply, along with the changes mentioned in #10, please review.
Comment #13
BalajiDS commentedPlease review the patch
Comment #14
Lal_@BalajiDS please remove the unwanted patch files... and please provide the interdiff
Comment #15
Lal_Comment #16
Lal_Comment #17
naresh_bavaskarComment #18
naresh_bavaskarfound some minor deprecation code
Parameter $entity of method Drupal\business_rules\Plugin\EntityReferenceSelection\BusinessRulesViewsSelection::getParentFieldValue() has typehint with deprecated class Drupal\Core\Entity\Entity. Deprecated in drupal:8.7.0 and is removed from drupal:9.0.0. Use \Drupal\Core\Entity\EntityBase instead.One thing which I don't know that should fix before fixing this issue:
These modules sub-modules (br_group,br_sms) are dependant on (dbug, sms, group) which are not ready for Drupal 9 so its dependent module having depreciation code their.
thanks!
Comment #19
colanAs per #9, and other comments above, there are a lot of moving parts here so we need tests.
Please direct efforts towards #3154417: Create Test cases for major functionalities. first. Once that's done, we'll have a good basis for continuing here.
Comment #20
colanComment #22
tbcanI hope this patch could help us to upgrade business_rules module to D9 ASAP.
Comment #23
colan#22: See #19. If you'd like to help, please start there.
Also, when uploading patches, always provide interdiffs. Please also explain the reason for the change in your comment. Otherwise, we have no idea how it differs from the previous one by taking a quick glance.
Comment #24
colanComment #25
nwom commented#21 no longer applied to the newest dev:
It also removed the core info from the info files, which would prevent older D8 versions from working. I reversed this change. I also noticed that for some reason the subject is removed from the business_rules_action.schema.yml. I reversed this as well, until we have further clarification for the change.
Here is the new patch and the interdiff for both my patch and for tbcan's patch.
Comment #26
colanThis all looks good, except for some things that could be using dependency injection:
But it's good enough for the first alpha, and these things can be updated in a follow-up. We're still going to need tests for a stable release, however.
@NWOM: Thanks for getting these issues organized!
Comment #28
colan