Open eldair opened 1 week ago
Thank you for reporting this issue!
As Laravel is an open source project, we rely on the community to help us diagnose and fix issues as it is not possible to research and fix every issue reported to us via GitHub.
If possible, please make a pull request fixing the issue you have described, along with corresponding tests. All pull requests are promptly reviewed by the Laravel team.
Thank you!
In my opinion, the problem is that the serializable-closure library incorrectly handles the case when SerializableClosure is used as a property type inside another SerializableClosure.
This case is happening here https://github.com/laravel/framework/blob/94df3d60c9a6c2e6fdb47202d979fc92d339a5f8/src/Illuminate/Bus/ChainedBatch.php#L131
I fixed the issue in this pull request https://github.com/laravel/serializable-closure/pull/86
I think this bug will be fixed when my pull request is accepted
Laravel Version
11.11.1
PHP Version
8.3.8
Database Driver & Version
No response
Description
Closure in job Bus::chain is not called if it is after Bus::batch - exception is thrown but there is nothing in failed jobs.
Call to undefined method Closure::getClosure() {"exception":"[object] (Error(code: 0): Call to undefined method Closure::getClosure() at /home/eldair/code/bus_chain_test/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedClosure.php:107)
Steps To Reproduce
Batch setup
This will throw the exception and the closure will not be called
This works fine
Here is the reproduction repo https://github.com/eldair/bus_chain_test/tree/main, nothing was added except two jobs and console command to call the code above.