Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when running artisan cli #6

Closed
msyahidin opened this issue Mar 26, 2019 · 2 comments
Closed

Error when running artisan cli #6

msyahidin opened this issue Mar 26, 2019 · 2 comments

Comments

@msyahidin
Copy link
Contributor

msyahidin commented Mar 26, 2019

Hi @mts88 thank you for the quick response, update and support. I hope I provided good report here.

Describe the bug
Got error when running artisan cli. Maybe because the format of config/gridfs changed from array to string.
I am using barry ide-helper package and run

 php artisan ide-helper:generate

Log

  Symfony\Component\Debug\Exception\FatalThrowableError  : Argument 1 passed to Mts88\MongoGrid\Services\MongoClient::hasDsnString() must be of the type array, null given, called in /vendor/mts88/mongogrid/src/Services/MongoClient.php on line 77

  at /vendor/mts88/mongogrid/src/Services/MongoClient.php:91
    87|      * Check if exists dsn url and if is valid
    88|      * 
    89|      * @input array $config Array with config
    90|      */
  > 91|     protected function hasDsnString(array $config)
    92|     {
    93|         return isset($config['dsn']) && ! empty($config['dsn']);
    94|     }
    95| 

  Exception trace:

  1   Mts88\MongoGrid\Services\MongoClient::hasDsnString()
      /vendor/mts88/mongogrid/src/Services/MongoClient.php:77

  2   Mts88\MongoGrid\Services\MongoClient::connectDB()
      /vendor/mts88/mongogrid/src/Services/MongoClient.php:37

Laravel:

  • 5.7.26
    MongoDB:
  • 3.6
@mts88
Copy link
Owner

mts88 commented Mar 26, 2019

Hi @msyahidin from the logs seems that config is null. Have you run composer dump-autoload ? Can you post your config/gridfs.php and config/database.php?

@msyahidin
Copy link
Contributor Author

@mts88 ok, it seems I type wrong connection name, sorry my bad. I closed it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants