Extensions issueshttps://lab.civicrm.org/groups/extensions/-/issues2023-05-09T11:43:55Zhttps://lab.civicrm.org/extensions/mjwshared/-/issues/19checkIfSeparateMembershipPaymentEnabled throws error if Stripe and Globalpaym...2023-05-09T11:43:55ZJohn TwymancheckIfSeparateMembershipPaymentEnabled throws error if Stripe and Globalpayments aren't installed**Summary**
The `checkIfSeparateMembershipPaymentEnabled` function in the [Check.php file](https://lab.civicrm.org/extensions/mjwshared/-/blob/master/CRM/Mjwshared/Check.php#L185) generates an error when users login to Civi for the firs...**Summary**
The `checkIfSeparateMembershipPaymentEnabled` function in the [Check.php file](https://lab.civicrm.org/extensions/mjwshared/-/blob/master/CRM/Mjwshared/Check.php#L185) generates an error when users login to Civi for the first time per session.
**Details**
When loading the CiviCRM dashboard for the first time in a session, the `checkIfSeparateMembershipPaymentEnabled` function is generating the error `Invalid criteria for IN`. The issue is the Api4 call to the `PaymentProcessor` entity, and specifically the use of `payment_processor_type_id:name` in the where clause.
Our CiviCRM installation does not have the Stripe or Globalpayment payment processors installed. It seems the Api is doing a lookup using the supplied names to generate numeric IDs to construct the underlying query in the form of `payment_processor_type_id IN (...)` with integer values in the parentheses.
**Proposal**
Implement an explicit join in the query to the PaymentProcessorType entity and construct the `IN` clause against the `name` field of that entity directly:
```
$paymentProcessorIDs = \Civi\Api4\PaymentProcessor::get(FALSE)
->addJoin('PaymentProcessorType AS ptype', 'LEFT', ['payment_processor_type_id', '=', 'ptype.id'])
->addWhere('ptype'name', 'IN', $separateMembershipPaymentNotSupportedProcessors)
->execute()
->column('id');
```
We've tested this modification locally and it all seems to behave itself. I'd be happy to work up a PR if you'd like.https://lab.civicrm.org/extensions/areas/-/issues/11Add option for LIKE and REGEXP along with = comparisons2023-05-01T15:10:55ZlarsssandergreenAdd option for LIKE and REGEXP along with = comparisonsI was thinking of adding my own area definition types to allow for LIKE or REGEXP instead of just =, but it looks like it would be pretty easy to add this as an option to the extension in general — and maybe that would be useful to other...I was thinking of adding my own area definition types to allow for LIKE or REGEXP instead of just =, but it looks like it would be pretty easy to add this as an option to the extension in general — and maybe that would be useful to others? My motivation is mostly to allow for postal code ranges, so I can do something like A1A [1234][FJK][0-9] to cover a range of Canadian postal codes, but this would also be useful to cover cities that are spelled in multiple ways (Fort Steele, Ft. Steele, Ft Steele) and so on.
I'm thinking that each area definition has a comparison type with default = and LIKE and REGEXP as the other options.
I'll get to work on this if it makes sense to add to the extension, if not, I'll happily just take care of it for my own use.https://lab.civicrm.org/extensions/civiexportexcel/-/issues/19Data processor integration.2023-04-27T14:53:44ZjaapjansmaData processor integration.It would be nice if this extension provides an integration with the data processor. So that data processor search could be exported to an excel file.It would be nice if this extension provides an integration with the data processor. So that data processor search could be exported to an excel file.jaapjansmajaapjansmahttps://lab.civicrm.org/extensions/cdntaxreceipts/-/issues/122Uninstalling the extension leaves behind the aggregrate message template2023-04-27T14:14:45ZDaveDUninstalling the extension leaves behind the aggregrate message templateAnd then reinstalling installs another copy. It does delete the single receipt one and the option group and the option values.
I'm not sure what it is yet. Maybe it's something like the delete in sql/uninstall is order-dependent and nee...And then reinstalling installs another copy. It does delete the single receipt one and the option group and the option values.
I'm not sure what it is yet. Maybe it's something like the delete in sql/uninstall is order-dependent and needs to be broken up.https://lab.civicrm.org/extensions/action-provider/-/issues/37Added phone type to update contact breaks old FormProcessors2023-04-27T01:33:31Zsimon.hermannAdded phone type to update contact breaks old FormProcessorsThe new added option to add a phone type in the commit 7439f6987d3cb54f14998d131491edc728a008c9 breaks old FormProcessors, as it is set as a required field.
Setting this setting to false, should fix the problem.The new added option to add a phone type in the commit 7439f6987d3cb54f14998d131491edc728a008c9 breaks old FormProcessors, as it is set as a required field.
Setting this setting to false, should fix the problem.https://lab.civicrm.org/extensions/invoicehelper/-/issues/6Link for partial payment2023-04-24T20:33:21ZsamuelsovLink for partial paymentThe link only displays when the payment is Pending. I think it should be available for partial payment as well.The link only displays when the payment is Pending. I think it should be available for partial payment as well.https://lab.civicrm.org/extensions/formprotection/-/issues/16Flood control should exclude unsubscribe/optout/resubscribe pages2023-04-24T10:09:04ZJonGoldFlood control should exclude unsubscribe/optout/resubscribe pagesThese pages have no form inputs, just a button. People click it very quickly, so flood control of pretty much any length breaks these pages.
Ideally we could identify any form that has no inputs and exempt it from flood control, but I ...These pages have no form inputs, just a button. People click it very quickly, so flood control of pretty much any length breaks these pages.
Ideally we could identify any form that has no inputs and exempt it from flood control, but I also think it'd be fine if we hard-coded these paths into the extension.1.5https://lab.civicrm.org/extensions/action-provider/-/issues/36MapValue action now always multiple?2023-04-20T07:47:57ZBjörn EndresMapValue action now always multiple?A while ago, the "Map Value" action would only map a single string/number to another one.
However, with commit https://lab.civicrm.org/extensions/action-provider/-/commit/bffa7cb2481437952fb0e154a6f124b103fea428, which seems to aim at e...A while ago, the "Map Value" action would only map a single string/number to another one.
However, with commit https://lab.civicrm.org/extensions/action-provider/-/commit/bffa7cb2481437952fb0e154a6f124b103fea428, which seems to aim at enabling the mapping for multiple values, this isn't possible any more. Since the ``input_value`` specification is now ``multiple=true`` (see [here](https://lab.civicrm.org/extensions/action-provider/-/blob/ad95aab4e35bd51cf5f0f97939f88598327df59b/Civi/ActionProvider/Action/Generic/MapValue.php#L51)), the result is always an array. This breaks form processors based on the original implementation ("requires a single value a multiple value is given").
My questions are:
1. Was this change introduced on purpose, or was that a side effect that hasn't affected anyone else yet?
2. Could I get my old behaviour back by -for example- adding a "return first value" configuration option? Or maybe by splitting this into a "Map Value" and a "Map Values" action?
@jaapjansma Would you have an opinion on this?https://lab.civicrm.org/extensions/civiexportexcel/-/issues/20[PHP 8] Incompatibility due to old civix2023-04-14T20:40:32Zjofranzfranz@systopia.de[PHP 8] Incompatibility due to old civixFILE: civiexportexcel/civiexportexcel.civix.php
```
---------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------...FILE: civiexportexcel/civiexportexcel.civix.php
```
---------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------------------
246 | ERROR | [x] Curly brace syntax for accessing array elements and string offsets has been deprecated in PHP 7.4
| | and removed in PHP 8.0. Found: $entry{0}
---------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------
```https://lab.civicrm.org/extensions/searchactiondesigner/-/issues/8PDF format not recognized when creating pdf2023-04-14T13:52:39ZTobias Voigttobias.voigt@civiservice.dePDF format not recognized when creating pdfI noticed that when I choose the pdf format as an option group, the action "Communication: Create PDF" only recognizes this variable if I choose "All files in one zip" as the batch output mode. If I choose 'Merge all files into one pdf' ...I noticed that when I choose the pdf format as an option group, the action "Communication: Create PDF" only recognizes this variable if I choose "All files in one zip" as the batch output mode. If I choose 'Merge all files into one pdf' though, the pdf format isn't recognized and the standard format is used instead.https://lab.civicrm.org/extensions/cdntaxreceipts/-/issues/137Message templates - installer doesn't install a copy with is_reserved=12023-04-13T19:29:59ZDaveDMessage templates - installer doesn't install a copy with is_reserved=1Normally message templates have two copies each in the db, one with is_default=1 and is_reserved=0, which actually means "this is the one in use", and another with is_reserved=1 and is_default=0, which actually means "the default version...Normally message templates have two copies each in the db, one with is_default=1 and is_reserved=0, which actually means "this is the one in use", and another with is_reserved=1 and is_default=0, which actually means "the default version". This is how it supports the "revert to default" link. Since there is no is_reserved=1 copy, there isn't a link to revert to default.
It's a simple template that's easy to manually recreate, but the extension could install the reserved copy [here](https://lab.civicrm.org/extensions/cdntaxreceipts/-/blob/a6adb0dbafe1a7272ee0eaec224b1c9eb642fbb3/CRM/Cdntaxreceipts/Upgrader.php#L266) at the same time as the other one.https://lab.civicrm.org/extensions/formprotection/-/issues/19Conflict between Form protection and the Go cardless extension2023-04-13T18:47:22ZgibsonoliverConflict between Form protection and the Go cardless extensionWhen Form protection is enabled and a payment form has Stripe enabled and Go cardless all Go cardless payments lead to a site error.
Fatal error: Uncaught TypeError: Argument 1 passed to Civi\Formprotection\Recaptcha::validate() must b...When Form protection is enabled and a payment form has Stripe enabled and Go cardless all Go cardless payments lead to a site error.
Fatal error: Uncaught TypeError: Argument 1 passed to Civi\Formprotection\Recaptcha::validate() must be of the type string, null given, called in public_html/wp-content/uploads/civicrm/ext/formprotection-1.3.1/Civi/Formprotection/Recaptcha.php on line 156 and defined in public_html/wp-content/uploads/civicrm/ext/formprotection-1.3.1/Civi/Formprotection/Recaptcha.php:167 Stack trace: #0 public_html/wp-content/uploads/civicrm/ext/formprotection-1.3.1/Civi/Formprotection/Recaptcha.php(156): Civi\Formprotection\Recaptcha::validate() #1 public_html/wp-content/uploads/civicrm/ext/formprotection-1.3.1/formprotection.php(142): Civi\Formprotection\Recaptcha->validateForm() #2 public_html/wp-content/plugins/civicrm/civicrm/CRM/Utils/Hook.php(287): formprotection_civicrm_validateForm() #3 cuscnux in public_html/wp-content/uploads/civicrm/ext/formprotection-1.3.1/Civi/Formprotection/Recaptcha.php on line 167https://lab.civicrm.org/extensions/firewall/-/issues/30Error: Class 'Civi\Firewall\Services' not found in firewall_civicrm_container()2023-04-12T17:25:54ZAndrew WassonError: Class 'Civi\Firewall\Services' not found in firewall_civicrm_container()This error is logged when I enable or disable Firewall on a Drupal 7 CiviCRM 5.57 website.
The error is as follows:
> Error: Class 'Civi\Firewall\Services' not found in firewall_civicrm_container() (line 30 of /sites/default/files/civi...This error is logged when I enable or disable Firewall on a Drupal 7 CiviCRM 5.57 website.
The error is as follows:
> Error: Class 'Civi\Firewall\Services' not found in firewall_civicrm_container() (line 30 of /sites/default/files/civicrm/extensions/firewall/firewall.php).
I can't see anything in the code that is obvious. It might be that As of CiviCRM version 5.27 CiviCRM now uses Symfony v3.4 or v4.4and that there is an important change which is that in v3.3 Symfony services are now considered by default to be private?
The website in question is as follows:
- Firewall 1.5.8
- Drupal 7
- CiviCRM 5.57 website
- PHP version 7.4.33https://lab.civicrm.org/extensions/formprotection/-/issues/14Fatal error if CiviEvent is disabled2023-04-12T15:24:55ZAllenShawFatal error if CiviEvent is disabledOn a site where CiviEvent is not enabled, this fatal error messages is given at /civicrm/admin/setting/formprotection
`Event API is not available because CiviEvent component is disabled`
After enabling CiviEvent, the page opens without...On a site where CiviEvent is not enabled, this fatal error messages is given at /civicrm/admin/setting/formprotection
`Event API is not available because CiviEvent component is disabled`
After enabling CiviEvent, the page opens without error.https://lab.civicrm.org/extensions/formprotection/-/issues/4floodcontrol can incorrectly fail a submission2023-04-12T14:05:41ZJonGoldfloodcontrol can incorrectly fail a submissionWhile investigating a client complaint, I found multiple log entries like this:
```
Aug 23 15:43:19 [warning] floodcontrol: 45.130.83.84 FAIL Register [0], filled in 0 seconds
```
They were mostly followed by a PASS some time later, p...While investigating a client complaint, I found multiple log entries like this:
```
Aug 23 15:43:19 [warning] floodcontrol: 45.130.83.84 FAIL Register [0], filled in 0 seconds
```
They were mostly followed by a PASS some time later, presumably from a resubmission.
I did a test on a contribution page and got the same result, which appeared after the Stripe "pre-authorizing your card" sweetalert-styled message.
Interestingly, here's the Civi log for my failure, followed by the relevant Apache logs, with timestamps:
Civi:
```
Aug 23 16:10:59 [warning] floodcontrol: 24.191.15.235 FAIL Main [0], filled in 0 seconds
```
Apache:
```
mysite.org:443 24.191.15.235 - - [23/Aug/2022:16:10:17 -0400] "GET /civicrm/asset/builder?an=civicrmStripe.js&ap=Pc5LCgJBDATQu/RaO3vPEpAYgmboT%2BhkZhTx7vYguAvFKyrvZBSPdEkIGw2Efd8RuLcmHNkKeShbL2UN7Y07FT2O3Md9WrkhuIY4ApUye7opj3rm1aNXBHmGNJ9%2BAo%2BhJgiL/931l%2BXF0ylVrRIvk/kKmRVlOoamp42cp4v0%2BQI%3D&ad=41298c39868eebc490ab2e8f27b786a8 HTTP/1.1" 200 8020 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:103.0) Gecko/20100101 Firefox/103.0"
mysite.org:443 24.191.15.235 - - [23/Aug/2022:16:10:17 -0400] "GET /civicrm/asset/builder?an=crm-l10n.js&ap=XczLCsIwEEDRfxlcBuuzi%2B5EFFwoirgryJgMNTJJSh5oEf/duLCI23vgPkFqBdVIgLaSk6KVQc0bu0NDUEWfSADe8LF3bWrDyuKFSfXA7O4LJh8XKTqlg9EhIH/ZU3DJS1qivNLSqTyEFMrmQPZ8OoIAdhL5U/sgt5QPDYWfqDDSxrYprp03GLMYUxdK1UXXZY7a/PE4V%2BMsdX0ZjMVkOhvOS3i9AQ%3D%3D&ad=2e4f9c19a4f21221b1129aa38126bdfc HTTP/1.1" 200 2970 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:103.0) Gecko/20100101 Firefox/103.0"
mysite.org:443 24.191.15.235 - - [23/Aug/2022:16:10:57 -0400] "POST /civicrm/ajax/rest HTTP/1.1" 200 5683 "https://mysite.org/civicrm/contribute/transact?reset=1&id=4&action=preview" "Mozilla/5.0 (X11; Linux x86_64; rv:103.0) Gecko/20100101 Firefox/103.0"
mysite.org:443 24.191.15.235 - - [23/Aug/2022:16:10:59 -0400] "POST /civicrm/contribute/transact HTTP/1.1" 200 23252 "https://mysite.org/civicrm/contribute/transact?reset=1&id=4&action=preview" "Mozilla/5.0 (X11; Linux x86_64; rv:103.0) Gecko/20100101 Firefox/103.0"
mysite.org:443 54.187.205.235 - - [23/Aug/2022:16:10:59 -0400] "POST /civicrm/payment/ipn/4 HTTP/1.1" 200 5440 "-" "Stripe/1.0 (+https://stripe.com/docs/webhooks)"
```
I think this is because `buildForm()` is generally called on post-process (see the flowchart on https://docs.civicrm.org/dev/en/latest/framework/quickform/). I'm guessing that the cached time (when the page is first loaded) is getting written to a second time on submission.https://lab.civicrm.org/extensions/formprotection/-/issues/9reCaptcha v3 not validating2023-04-12T13:28:53ZsamuelsovreCaptcha v3 not validatingTrying to make reCaptcha v3 works on a contribution page with Moneris gateway, I noticed a few problems leading to always failing the validation. The recaptcha token is not passed in the $_POST.
Reading the code, I see that :
1. the tem...Trying to make reCaptcha v3 works on a contribution page with Moneris gateway, I noticed a few problems leading to always failing the validation. The recaptcha token is not passed in the $_POST.
Reading the code, I see that :
1. the template file get loaded 2 times
1. there is double declaration of `<input id="g-recaptcha-token">` in the template + in Civi/Formprotection/Forms.php
1. the recaptcha token input is not added between the form tags, so the captcha token is never passed in the $_POST
My current hacks are :
1. temporary disabling the multiple call of CRM_Utils_ReCAPTCHA::enableCaptchaOnForm :
```diff
diff --git a/Civi/Formprotection/Floodcontrol.php b/Civi/Formprotection/Floodcontrol.php
index e47f5d3..d1ee7ea 100644
--- a/Civi/Formprotection/Floodcontrol.php
+++ b/Civi/Formprotection/Floodcontrol.php
@@ -55,7 +55,7 @@ class Floodcontrol {
}
if (!\CRM_Core_Session::getLoggedInContactID() && is_callable(['CRM_Utils_ReCAPTCHA', 'enableCaptchaOnForm'])) {
- \CRM_Utils_ReCAPTCHA::enableCaptchaOnForm($form);
+ //\CRM_Utils_ReCAPTCHA::enableCaptchaOnForm($form);
}
}
@@ -93,7 +93,7 @@ class Floodcontrol {
if ($max_count_recaptcha && $data['success'] >= $max_count_recaptcha) {
\Civi::log()->warning("floodcontrol: enabling captcha [{$data['success']} success of $max_count_recaptcha]");
- \CRM_Utils_ReCAPTCHA::enableCaptchaOnForm($form);
+ //\CRM_Utils_ReCAPTCHA::enableCaptchaOnForm($form);
}
}
```
2. remove the one from Civi/Formprotection/Forms.php :
```diff
diff --git a/Civi/Formprotection/Recaptcha.php b/Civi/Formprotection/Recaptcha.php
index d34363d..fae7523 100644
--- a/Civi/Formprotection/Recaptcha.php
+++ b/Civi/Formprotection/Recaptcha.php
@@ -204,9 +205,6 @@ class Recaptcha {
}
return '
- <form method="post" action="#">
- <input type="hidden" id="g-recaptcha-token" name="g-recaptcha-token">
- </form>
<script src="' . self::$apiURL . '?render=' . $pubkey . '"></script>
<script type="text/javascript">
function reloadReCAPTCHA() {
```
3. move to the region form-bottom instead of page-body and remove `<form>` :
```diff
diff --git a/CRM/Utils/ReCAPTCHA.php b/CRM/Utils/ReCAPTCHA.php
index 22c8912..9e34c8d 100644
--- a/CRM/Utils/ReCAPTCHA.php
+++ b/CRM/Utils/ReCAPTCHA.php
@@ -100,7 +100,7 @@ class CRM_Utils_ReCAPTCHA {
if (Recaptcha::hasSettingsAvailable()) {
$captcha->add($form);
$form->assign('isCaptcha', TRUE);
- CRM_Core_Region::instance('page-body')->add(['template' => 'CRM/common/ReCAPTCHA.tpl']);
+ CRM_Core_Region::instance('form-bottom')->add(['template' => 'CRM/common/ReCAPTCHA.tpl']);
}
}
diff --git a/templates/CRM/common/ReCAPTCHA.tpl b/templates/CRM/common/ReCAPTCHA.tpl
index 3e3d492..737d55b 100644
--- a/templates/CRM/common/ReCAPTCHA.tpl
+++ b/templates/CRM/common/ReCAPTCHA.tpl
@@ -18,10 +18,8 @@
<tr>
<td class="recaptcha_label"> </td>
<td>
- <form id="form_id" method="post">
<input type="hidden" id="g-recaptcha-token" name="g-recaptcha-token">
<input type="hidden" name="action" value="validate_captcha">
- </form>
</td>
<td>{$recaptchaHTML}</td>
</tr>
```1.4https://lab.civicrm.org/extensions/formprotection/-/issues/13Duplicate captchas if on <5.53 and you previously had the forceRecaptcha sett...2023-04-12T13:25:56ZDaveDDuplicate captchas if on <5.53 and you previously had the forceRecaptcha setting turned onThe forceRecaptcha setting comes from the core extension. If you are on a version earlier than 5.53 and previously had it on before installing formprotection, then the core code from https://github.com/civicrm/civicrm-core/commit/c1b477a...The forceRecaptcha setting comes from the core extension. If you are on a version earlier than 5.53 and previously had it on before installing formprotection, then the core code from https://github.com/civicrm/civicrm-core/commit/c1b477a0f78664dd2bb364ce0ddeb3df6721eedd still triggers a call to `CRM_Utils_ReCAPTCHA::enableCaptchaOnForm()`, but this setting is no longer visible in the UI.
Obviously the best answer is "upgrade civi", and the next simplest answer is change the setting to 0 with `cv`, so I don't think I'll make a PR, but just putting this here in case anyone else has the same problem since it took a while to track down.
Adding that the reason duplicates are a problem is that there are two g-recaptcha-token fields, and only the first one gets filled in, but it's the blank value from the second one that is in `$_POST`. This doesn't seem to be a problem with stripe because it has separate code to get the token, but is a problem with authorize.net for example.https://lab.civicrm.org/extensions/formprotection/-/issues/18No user feedback when reCAPTCHA v3 fails2023-04-12T13:24:59ZJKingsnorthNo user feedback when reCAPTCHA v3 failsIf reCAPTCHA v3 is enabled, and the response is unsuccessful, the user receives no feedback or error messages.
This is because the error is assigned to the 'captcha' form element as part of the validation, which does not exist. And the ...If reCAPTCHA v3 is enabled, and the response is unsuccessful, the user receives no feedback or error messages.
This is because the error is assigned to the 'captcha' form element as part of the validation, which does not exist. And the assigned value is an array, rather than a string.
We can fix this. PR forthcoming.1.5https://lab.civicrm.org/extensions/formprotection/-/issues/15reCAPTCHA v3 validate fails when token is in $_POST['captcha'] but $_POST['g-...2023-04-12T13:18:03ZmessicareCAPTCHA v3 validate fails when token is in $_POST['captcha'] but $_POST['g-recaptcha-token'] contains empty stringAdmittedly didn't spend time looking into where/when/why the token got passed around, but on a client's site `$_POST['g-recaptcha-token']` was an empty string and the correct token was in `$_POST['captcha']`. However the code didn't reac...Admittedly didn't spend time looking into where/when/why the token got passed around, but on a client's site `$_POST['g-recaptcha-token']` was an empty string and the correct token was in `$_POST['captcha']`. However the code didn't reach that because `$_POST['g-recaptcha-token']` is technically set. Changing to `!empty` instead fixed this for me.https://lab.civicrm.org/extensions/firewall/-/issues/31Symfony Event class deprecated (Drupal 10 error fired)2023-04-12T12:53:15ZcalbasiSymfony Event class deprecated (Drupal 10 error fired)In a Drupal 10 CiviCRM instance I get this error using the Stripe extension:
Error: Class "Symfony\Component\EventDispatcher\Event" not found in include() (line 16 of .../firewall/Civi/Firewall/Event/FraudEvent.php).
The reason, here:
...In a Drupal 10 CiviCRM instance I get this error using the Stripe extension:
Error: Class "Symfony\Component\EventDispatcher\Event" not found in include() (line 16 of .../firewall/Civi/Firewall/Event/FraudEvent.php).
The reason, here:
https://www.drupal.org/node/3159012
I hotfixed it doing:
```
//class FraudEvent extends \Symfony\Component\EventDispatcher\Event {
class FraudEvent extends \Drupal\Component\EventDispatcher\Event {
```
but I think it's not a suitable solution to pach here, because the CMS agnosticy of CiviCRM.
Not sure if:
```
class FraudEvent extends \Symfony\Contracts\EventDispatcher\Event {
```
could be OK. I think it is OK for Symphony 4 and 5, but not sure.