Closed ChrisHardie closed 1 year ago
The change was made from dispatchAfterResponse
to dispatch
because the former cannot go to a queue, which is what is required for some handlers.
As for your examples, I'm not sure what code is yours or another package's, but I think you just need to make your object nullable? Seems like more of a PHP 8 thing.
abstract class AbstractUserEvent extends AbstractWoocommerceEvent
{
private WoocommerceHelpers|null $wooHelper = null;
public function __construct(public string $event, public array $data)
{
...
(Closing this until/unless I can provide more details showing it's actually an issue and not my misunderstanding.)
The change in v0.1.15 introduced in #18 created a fatal error for me when deployed to production. It may be my code, but here's what I saw:
The webhook event handling stopped happening synchronously, which was succeeding, and was moved to a queued job, which failed.
The code that ran to handle the webhook event is
and the parent class has this construction:
The error I started getting was:
So it appears that the
__construct
method inAbstractUserEvent
is not run following this release. Downgrading to 0.1.14 fixed it.Please let me know if there's any other information that would be helpful to understand or advise on what's happening. Thank you.