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

config file was not loaded #74

Closed
guuhgalvao opened this issue Oct 14, 2020 · 1 comment
Closed

config file was not loaded #74

guuhgalvao opened this issue Oct 14, 2020 · 1 comment

Comments

@guuhgalvao
Copy link

  • Tenanti Version: 5.0.0
  • Laravel Version: 7.0.0 (Lumen)
  • PHP Version: 7.4.10
  • Database Driver & Version:

Description:

After configure this lib in lumen, the config file in path "config/orchestra/tenanti.php" was not loaded by default and response from the log I have is:

[2020-10-14 18:47:17] local.ERROR: InvalidArgumentException: Driver [company] not supported. in /mnt/c/Users/Gustavo/Documents/dev/nomadlog/vendor/orchestra/tenanti/src/TenantiManager.php:37
Stack trace:
#0 /mnt/c/Users/Gustavo/Documents/dev/nomadlog/vendor/illuminate/support/Manager.php(90): Orchestra\Tenanti\TenantiManager->createDriver()
#1 /mnt/c/Users/Gustavo/Documents/dev/nomadlog/vendor/illuminate/support/Facades/Facade.php(261): Illuminate\Support\Manager->driver()
#2 /mnt/c/Users/Gustavo/Documents/dev/nomadlog/app/Utils/ClientManager.php(27): Illuminate\Support\Facades\Facade::__callStatic()
#3 /mnt/c/Users/Gustavo/Documents/dev/nomadlog/app/Utils/ClientManager.php(68): App\Utils\ClientManager::set()
#4 /mnt/c/Users/Gustavo/Documents/dev/nomadlog/app/Http/Middleware/HandleCompany.php(27): App\Utils\ClientManager::setCurrentCompany()
#5 /mnt/c/Users/Gustavo/Documents/dev/nomadlog/vendor/illuminate/pipeline/Pipeline.php(167): App\Http\Middleware\HandleCompany->handle()
#6 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#7 /mnt/c/Users/Gustavo/Documents/dev/nomadlog/vendor/laravel/lumen-framework/src/Routing/Pipeline.php(30): call_user_func()
#8 /mnt/c/Users/Gustavo/Documents/dev/nomadlog/app/Http/Middleware/Authenticate.php(42): Laravel\Lumen\Routing\Pipeline->Laravel\Lumen\Routing{closure}()
#9 /mnt/c/Users/Gustavo/Documents/dev/nomadlog/vendor/illuminate/pipeline/Pipeline.php(167): App\Http\Middleware\Authenticate->handle()
#10 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#11 /mnt/c/Users/Gustavo/Documents/dev/nomadlog/vendor/laravel/lumen-framework/src/Routing/Pipeline.php(30): call_user_func()
#12 /mnt/c/Users/Gustavo/Documents/dev/nomadlog/vendor/illuminate/pipeline/Pipeline.php(103): Laravel\Lumen\Routing\Pipeline->Laravel\Lumen\Routing{closure}()
#13 /mnt/c/Users/Gustavo/Documents/dev/nomadlog/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php(413): Illuminate\Pipeline\Pipeline->then()
#14 /mnt/c/Users/Gustavo/Documents/dev/nomadlog/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php(259): Laravel\Lumen\Application->sendThroughPipeline()
#15 /mnt/c/Users/Gustavo/Documents/dev/nomadlog/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php(165): Laravel\Lumen\Application->handleFoundRoute()
#16 /mnt/c/Users/Gustavo/Documents/dev/nomadlog/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php(416): Laravel\Lumen\Application->Laravel\Lumen\Concerns{closure}()
#17 /mnt/c/Users/Gustavo/Documents/dev/nomadlog/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php(171): Laravel\Lumen\Application->sendThroughPipeline()
#18 /mnt/c/Users/Gustavo/Documents/dev/nomadlog/vendor/hhxsv5/laravel-s/src/Illuminate/Laravel.php(144): Laravel\Lumen\Application->dispatch()
#19 /mnt/c/Users/Gustavo/Documents/dev/nomadlog/vendor/hhxsv5/laravel-s/src/LaravelS.php(209): Hhxsv5\LaravelS\Illuminate\Laravel->handleDynamic()
#20 /mnt/c/Users/Gustavo/Documents/dev/nomadlog/vendor/hhxsv5/laravel-s/src/LaravelS.php(155): Hhxsv5\LaravelS\LaravelS->handleDynamicResource()
#21 [internal function]: Hhxsv5\LaravelS\LaravelS->onRequest()
#22 /mnt/c/Users/Gustavo/Documents/dev/nomadlog/vendor/hhxsv5/laravel-s/src/Swoole/Server.php(347): Swoole\Server->start()
#23 /mnt/c/Users/Gustavo/Documents/dev/nomadlog/vendor/hhxsv5/laravel-s/src/Console/Portal.php(158): Hhxsv5\LaravelS\Swoole\Server->run()
#24 /mnt/c/Users/Gustavo/Documents/dev/nomadlog/vendor/hhxsv5/laravel-s/src/Console/Portal.php(59): Hhxsv5\LaravelS\Console\Portal->start()
#25 /mnt/c/Users/Gustavo/Documents/dev/nomadlog/vendor/symfony/console/Command/Command.php(258): Hhxsv5\LaravelS\Console\Portal->execute()
#26 /mnt/c/Users/Gustavo/Documents/dev/nomadlog/bin/laravels(164): Symfony\Component\Console\Command\Command->run()

Steps To Reproduce:

  • Install and configure this lib in lumen
  • Copy the vendor config lib to config folder in path "config/orchestra/tenanti.php"
  • Set new driver in config file
  • Test

My orchestra/tenanti config file:

env('TENANTI_QUEUE_CONNECTION', 'default'), /* |---------------------------------------------------------------------- | Driver Configuration |---------------------------------------------------------------------- | | Setup your driver configuration to let us match the driver name to | a Model and path to migration. | */ 'drivers' => [ 'user' => [ 'model' => 'App\User', 'paths' => [ database_path('tenant/users'), ], 'shared' => true, ], 'company' => [ 'model' => 'App\Data\Entities\Company', 'paths' => [ database_path('tenant/companies'), ], 'shared' => false, ], ], ];
@crynobone
Copy link
Member

I personally doesn't use it with Lumen and AFAIK Lumen configuration isn't as robust as Laravel (doesn't support sub-directory). That being said, Tenanti isn't officially support Lumen and doesn't have any plan to do so.

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