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

Lumen compatibility #10

Merged
merged 4 commits into from
Jul 1, 2021
Merged

Lumen compatibility #10

merged 4 commits into from
Jul 1, 2021

Conversation

gpibarra
Copy link
Contributor

No description provided.

gpibarra and others added 4 commits June 23, 2021 18:41
@bilfeldt
Copy link
Owner

Dear @gpibarra

Thanks for submitting this PR. I have changed the wording of the README-md file updates to reflect that this package does not officially support Lumen.

Do I understand you correctly that the package seems to work with Lumen with the minor changes from helpers to facades that you are proposing in this PR?

@gpibarra
Copy link
Contributor Author

gpibarra commented Jun 24, 2021

Hello, sorry for my English. I have tested the package in a lumen app that I had and it worked correctly.
Unfortunately that app already had configurations made, that is, the installation in lumen is little more complex (just a little).
I have done the test in a new lumen app and everything works fine by following these steps:

  • Install the library composer require bilfeldt/laravel-http-client-logger and modify bootstrap/app.php to register the service provider.
  • Fix the helper config_path() (https://gist.github.com/mabasic/21d13eab12462e596120)[https://gist.github.com/mabasic/21d13eab12462e596120].
  • If you want to use the configuration, lumen does not have a publish command, copy the configuration file from vendor folder cp vendor/bilfeldt/laravel-http-client-logger/config/http-client-logger.php config and add modify bootstrap/app.php to load the configuration.
  • If you want to use the filesystem, install the package composer require "league/flysystem:^1.0", create file config/filesystems.php and modify bootstrap/app.php to load the configuration.
  • If you want to use the log file, create file config/logging.php and modify bootstrap/app.php to load the configuration.
  • If you want to run on the command line it will work correctly, but if you want it to work via api you have to activate the $app->withFacades(); in bootstrap/app.php

I think these instructions could be a separate file

@bilfeldt bilfeldt merged commit fe9de55 into bilfeldt:master Jul 1, 2021
@bilfeldt
Copy link
Owner

bilfeldt commented Jul 1, 2021

Thanks for the deailts @gpibarra . This seems to be the rather "standard" Lumen way, so I have merged your changes in order to provide an unofficial support of Lumen.

Thanks for your contribution.

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

Successfully merging this pull request may close these issues.

2 participants