How to fix push function in SQLBatch.php from Robert Lester's EloquentSalesForce package

How to fix push function in SQLBatch.php from Robert Lester's EloquentSalesForce package

How to fix push function in SQLBatch.php from Robert Lester's EloquentSalesForce package

"Declaration of Lester\EloquentSalesForce\Database\SOQLBatch::push(...$builders) should be compatible with Illuminate\Support\Collection::push($value)"

Have you encountered an error like this when using eloquent-sales-force package?

The possible cause for this issue is that the library is updated to a version higher than 2.6 (ex. 2.7).

The solution is to downgrade the version of eloquent-sales-force library back to 2.6 by running composer command

Running the command showed above will downgrade the version of eloquent-sales-force to 2.6 and will fix the problem of the push function in the SQLBatch file from the package.

Hope it helps