-
Notifications
You must be signed in to change notification settings - Fork 86
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
Lumen support #156
Lumen support #156
Conversation
@AndreyBrazhnyk Thank you so much for this! Can you run |
src/Helpers/SearchableFinder.php
Outdated
@@ -32,18 +32,17 @@ final class SearchableFinder | |||
private static $declaredClasses; | |||
|
|||
/** | |||
* @var \Illuminate\Foundation\Application | |||
* @var \Illuminate\Container\Container |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe here should be \Illuminate\Foundation\Application|\Laravel\Lumen\Application
.
src/Helpers/SearchableFinder.php
Outdated
* @return void | ||
*/ | ||
public function __construct(Application $app) | ||
public function __construct(Container $app) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would remove the type hint here.
src/Helpers/SearchableFinder.php
Outdated
*/ | ||
private $app; | ||
|
||
/** | ||
* SearchableModelsFinder constructor. | ||
* | ||
* @param \Illuminate\Foundation\Application $app | ||
* | ||
* @param \Illuminate\Container\Container $app |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe here should be \Illuminate\Foundation\Application|\Laravel\Lumen\Application
.
Hi, Nuno Certainly. I'll try to fix. |
Perfect. Thanks! |
Hi
PR adds support of Lumen #56.
Illuminate\Foundation\helpers
.SearchableFinder
uses\Illuminate\Foundation\Application
as DI now. Lumen uses own extension of Container -Laravel\Lumen\Application
. So I addedIlluminate\Container\Container
class as DI (not sure about it).In spite of the fixes extra Lumen specific setup steps are still required. Maybe it is worth to add these steps to the documentation. Something like that:
Enable Eloquent and Facades if you plan to use it:
Bind path to the configuration directory with the IOC container:
Manually copy configuration file from
vendor/laravel/scout/config/scout.php
toconfig/scout.php
.Load configuration file into the application:
Register service provider: