driftingly / rector-laravel

Rector upgrades rules for Laravel
http://getrector.org
MIT License
529 stars 51 forks source link

Rule DispatchNonShouldQueueToDispatchSyncRector will wrongly convert `dispatch` to `dispatch_sync` on Closures #205

Closed j3j5 closed 5 months ago

j3j5 commented 5 months ago

Laravel supports queuing closures using dispatch(). Currently the rule DispatchNonShouldQueueToDispatchSyncRector would wrongly convert those dispatch calls to dispatch_sync .

Example:

- dispatch(function () {
+ dispatch_sync(function () {
    info('test');
});

206 should fix that.