Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Call to a member function beginTransaction() on null #2113

Answered by Smolevich
vrvoicu asked this question in Q&A
Discussion options

  • Laravel-mongodb Version: 3.6.4
  • PHP Version: 7.4
  • Database Driver & Version: 3.2

Description:

When running jobs i get "Call to a member function beginTransaction() on null"
Tried to extend the class but laravel hooks dont work
I suggest adding a workaround by overriding the methods getPdo(), beginTransaction(), commit(), rollBack() to empty function in Connection class

Steps to reproduce

  1. Register a job
  2. Call php artisan queue:work

Expected behaviour

When it comes to mongo it shoud run the job

Actual behaviour

The getPdo() method returns null and beginTransaction() throws the error specified

Logs: Insert log.txt here (if necessary)
You must be logged in to vote

@vrvoicu what are settings in config/queue.php ?

Replies: 1 comment

Comment options

@vrvoicu what are settings in config/queue.php ?

You must be logged in to vote
0 replies
Answer selected by divine
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
Converted from issue

This discussion was converted from issue #2113 on October 13, 2020 19:44.

AltStyle によって変換されたページ (->オリジナル) /