-
-
Notifications
You must be signed in to change notification settings - Fork 10
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 - Registering Class in Service Provider #14
Comments
Registration of services in a DI Container is declarative and should not cause errors until the specified service is resolved. In this case, errors will occur when u call: But I did not understand the question. :D |
As you mentioned, "errors will occur when u call: $app->make(LogsasasagingAspect::class)", however, i do not receive any error message. Also, the aop functionality does not work. I am using Lumen 5.6. Can this be the reason why it doesn't work? |
To be honest, I did not check the package works for Lumen at all. Here you need the experience of other developers who have adapted it. Ping @lisachenko |
I have managed to make it work using some concepts from the slides by Chris Flynn and using the demo examples that was provided. I believed making this change in bootstrap/app.php made it work: use Go\Aop\Features; $applicationAspectKernel->init([
]); |
Right, so obviously I didn't finish testing after commit #11... 😖 Based on this issue testing the lumen integration and:
https://github.com/laravel/lumen-framework/pull/723/files should allow Lumen to have a more Laravel-like registration of ServiceProviders, i.e. the I'll look more into this to get it into a proper solutions, leaving this issue open |
I am registering an Aspect class in the AopServiceProvider. However, it does not seem to work.
Here is my code:
Now even if I have the code as this:
It still doesn't show any error.
This service provider has been registered as:
$app->register(App\Providers\AopServiceProvider::class);
Is this normal or is there any fix for this?
The text was updated successfully, but these errors were encountered: