Skip to content

Issue deleting Eloquent models in non Venture jobs on sync driver #90

Description

@simple-hacker

This is a follow on from a previously closed/stale issue #65 as I am also experiencing the issue.

I have created a minimal repository on a fresh Laravel application with one test, and one job that simply deletes the user. This job does not extend WorkflowableJob or interacts with Laravel Venture.

As discussed #65 it just seems to be when delete/forceDelete on Eloquent models that are passed in to jobs, and using QUEUE_CONNECTION=sync

I think the issue only occurs when forceDeleting as this is what's happening in my application. All other jobs that do soft deleting inside jobs seem to be fine. This minimal repository, the User model does not implement SoftDeletes and so it's failing when just using ->delete()

Here is the minimal repository

laravel/laravel: v10.45.1
sassnowski/venture: v5.2.0
PHP 8.1.27

After forking you will need to run the test suit php artisan test and you should expect this simple job to fail.

image

Normal Laravel job (not Workflowable job)

image

Test fails

image

As described in #65 seems to be an issue with the Base64WorkflowSerializer.php when using QUEUE_CONNECTION=sync, but this Base64WorkflowSerializer` is interfering with non Venture jobs :/

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions