dispatchNow is not converted to dispatchSync
Closed this issue · 0 comments
jeff1326 commented
When i run rector laravel with this configuration, the dispatchNow is not replaced by dispatchSync.
In rector.php
return RectorConfig::configure()
->withPaths([
__DIR__ . '/app',
__DIR__ . '/config',
__DIR__ . '/database',
__DIR__ . '/modules',
__DIR__ . '/public',
__DIR__ . '/resources',
__DIR__ . '/tests',
])
->withSets([
LevelSetList::UP_TO_PHP_83,
LaravelLevelSetList::UP_TO_LARAVEL_100,
]);
(I tried with PHPUnitSetList::PHPUNIT_100 too)
In my code
// Arrange
$product = Product::factory()->create();
$user = auth()->user();
// Act
ExportProduct::dispatchNow($product->id, $user->email);
// Assert
The line with Product::factory()
has been changed by rector in this file, so it's parsed