- First commit to issue fork.
- 🇺🇸United States loopy1492
Patch #4 busted
> The website encountered an unexpected error. Please try again later.
TypeError: Drupal\business_rules\EventSubscriber\KernelRequestListener::onKernelRequest(): Argument #1 ($event) must be of type Symfony\Contracts\EventDispatcher\Event, Symfony\Component\HttpKernel\Event\RequestEvent given in Drupal\business_rules\EventSubscriber\KernelRequestListener->onKernelRequest() (line 37 of modules/contrib/business_rules/src/EventSubscriber/KernelRequestListener.php). - @loopy1492 opened merge request.
- Merge request !13Issue #3286389: Automated Drupal 10 compatibility fixes → (Open) created by loopy1492
- 🇺🇸United States loopy1492
Uploading a patch of the MR diff for posterity...
- 🇺🇸United States loopy1492
Had to fix another TerminateEvent. I strongly recommend a maintainer do the testing on this because I'm not 100% sure these are the correct edits.
- 🇺🇸United States loopy1492
#15 switches to a union type so the functions can handle both RequestEvents and TerminateEvents.
- First commit to issue fork.
- 🇺🇸United States loopy1492
After updating a site to Drupal 10, additional issues were revealed that hadn't been reported by rector.
- First commit to issue fork.
- 🇬🇧United Kingdom belazoth
#20 fixes an error I was getting when trying to run the cron
Error: Call to undefined method Drupal\Core\Entity\EntityTypeManager::accessCheck() in Drupal\business_rules\Entity\Schedule::executeSchedule() (line 409 of /var/www/html/docroot/modules/contrib/business_rules/src/Entity/Schedule.php)
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.15.1, cannot fix all Drupal 10 compatibility problems.
Therefore 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 #12554This patch was created using these packages:
- mglaman/phpstan-drupal: 1.1.35
- palantirnet/drupal-rector: 0.15.1
- First commit to issue fork.
#23 added accessCheck() to ScheduleListBuilder.php queries to fix:
Drupal\Core\Entity\Query\QueryException: Entity queries must explicitly set whether the query should be access checked or not. See Drupal\Core\Entity\Query\QueryInterface::accessCheck(). in Drupal\Core\Entity\Query\Sql\Query->prepare() (line 141 of core/lib/Drupal/Core/Entity/Query/Sql/Query.php).
Went through most rules, actions, and variables. Fixing any bug I found. Could someone test the fixes, I think there might be many more that I have not encountered.
- 🇧🇾Belarus alexdoma
@admirlju
i got an error on drupal 9.5
TypeError: Drupal\business_rules\EventSubscriber\KernelRequestListener::onKernelRequest(): Argument #1 ($event) must be of type Symfony\Contracts\EventDispatcher\Event, Symfony\Component\HttpKernel\Event\RequestEvent given in Drupal\business_rules\EventSubscriber\KernelRequestListener->onKernelRequest() (line 37 of modules/contrib/business_rules/src/EventSubscriber/KernelRequestListener.php).
@alexdoma when using the issue repository, make sure to checkout the correct branch (3286389-drupal-10-compatibility). It was fixed in the mentioned branch.
- 🇮🇳India avinashm
Uploading the new patch file after fixing more issues found during the testing.
One of the major ones is the usage of the deprecated hook: hook_field_widget_form_alter in the module file.
Link for reference: https://api.drupal.org/api/drupal/core%21modules%21field%21field.api.php... - 🇮🇳India Vinodhini.E chennai
Hi Team,
I am Working on upgrading Drupal 10 but this module is incompatible with Drupal 10 and after applying the #28 patch also shows incompatible
Attached screenshot for reference.Can anyone help with this
@Vinodhini.E could you also please try using the fixes from the issue fork, specifically branch
3286389-drupal-10-compatibility
? You can either clone the whole repository and checkout the correct branch or if it's easier for you on the merge request click code > patches. This will create a patch file from changes compared to the main branch.So I don't know if one fix brought this problem or if it's because I'm now testing on 10.5.x, but
BusinessRulesProcessorTest.php
is failing. Because of EventDispatcher mock, returning null instead of object.- 🇬🇧United Kingdom lexsoft London
Added a new merge request at 🌱 Business Rules 2.0.0-beta2 release plan D10 compatible Needs work
It contains all patches we have used in production for years plus the D10 upgrade.
- Status changed to Needs work
12 months ago 11:06am 28 December 2023 - Status changed to Closed: outdated
9 months ago 6:58pm 25 March 2024