aungwinthant / apilogger

Small laravel package for viewing api logs which can be used in debugging.
MIT License
346 stars 61 forks source link

[Laravel 6.0.4] Auto-Discovery and config Publish didn't work #18

Closed ghost closed 4 years ago

ghost commented 4 years ago

Hi,

First of all, thank you for your work.

I am using Laravel version 6.0.4 and composer version 1.9.0.

I followed the README and add apilogger to composer. But the apilogger service provider didn't show on package discovery. That's my first issue.

I executed the command to publish the vendor. The apilog.php file has not been added to the config Laravel's folder. That's my second issue. It might be link to the first issue.

So i add manualy the config file and the apilogger service provider and it works.

I hope it will help.

aungwinthant commented 4 years ago

Hi. Thanks for the feedback. We will check and release update in coming weekends including this.

mikeerickson commented 4 years ago

@aungwinthant willing to PR this as well if needed?

aungwinthant commented 4 years ago

That would be a lot helpful thanks alot. Sorry I have a lot to do during this week and have to focus on somethings.

lloy0076 commented 4 years ago
C:\laragon\webroots\github\api-6.0>php artisan package:discover --no-ansi
Discovered Package: awt/apilogger
Discovered Package: facade/ignition
Discovered Package: fideloper/proxy
Discovered Package: laravel/tinker
Discovered Package: laravel/ui
Discovered Package: nesbot/carbon
Discovered Package: nunomaduro/collision
Package manifest generated successfully.
name     : laravel/framework
descrip. : The Laravel Framework.
keywords : framework, laravel
versions : * v6.2.0
type     : library
license  : MIT License (MIT) (OSI approved) https://spdx.org/licenses/MIT.html#licenseText
source   : [git] https://github.com/laravel/framework.git cacce5a77fa94793cf25345d67387632134d75dd
dist     : [zip] https://api.github.com/repos/laravel/framework/zipball/cacce5a77fa94793cf25345d67387632134d75dd cacce5a77fa94793cf25345d67387632134d75dd
path     : C:\laragon\webroots\github\api-6.0\vendor\laravel\framework
names    : laravel/framework, illuminate/auth, illuminate/broadcasting, illuminate/bus, illuminate/cache, illuminate/config, illuminate/console, illuminate/container, illuminate/contracts, illuminate/cookie, illuminate/database, illuminate/encryption, illuminate/ev
ents, illuminate/filesystem, illuminate/hashing, illuminate/http, illuminate/log, illuminate/mail, illuminate/notifications, illuminate/pagination, illuminate/pipeline, illuminate/queue, illuminate/redis, illuminate/routing, illuminate/session, illuminate/support,
illuminate/translation, illuminate/validation, illuminate/view
C:\laragon\webroots\github\api-6.0>php artisan vendor:publish --no-ansi

 Which provider or tag's files would you like to publish?:
  [0 ] Publish files from all providers and tags listed below
  [1 ] Provider: AWT\Providers\ApiLogServiceProvider
  [2 ] Provider: Facade\Ignition\IgnitionServiceProvider
  [3 ] Provider: Fideloper\Proxy\TrustedProxyServiceProvider
  [4 ] Provider: Illuminate\Foundation\Providers\FoundationServiceProvider
  [5 ] Provider: Illuminate\Mail\MailServiceProvider
  [6 ] Provider: Illuminate\Notifications\NotificationServiceProvider
  [7 ] Provider: Illuminate\Pagination\PaginationServiceProvider
  [8 ] Provider: Laravel\Tinker\TinkerServiceProvider
  [9 ] Tag: config
  [10] Tag: flare-config
  [11] Tag: ignition-config
  [12] Tag: laravel-errors
  [13] Tag: laravel-mail
  [14] Tag: laravel-notifications
  [15] Tag: laravel-pagination
 > 1
1?[K

Copied File [\vendor\awt\apilogger\config\apilog.php] To [\config\apilog.php]
Publishing complete.

C:\laragon\webroots\github\api-6.0>ls config\apilog.php
'config\apilog.php'
lloy0076 commented 4 years ago

i.e. it seems to work on Windows under 6.0.2 if one pulls in via source.

lloy0076 commented 4 years ago
name     : laravel/framework
descrip. : The Laravel Framework.
keywords : framework, laravel
versions : * v5.8.35
type     : library
license  : MIT License (MIT) (OSI approved) https://spdx.org/licenses/MIT.html#licenseText
source   : [git] https://github.com/laravel/framework.git 5a9e4d241a8b815e16c9d2151e908992c38db197
dist     : [zip] https://api.github.com/repos/laravel/framework/zipball/5a9e4d241a8b815e16c9d2151e908992c38db197 5a9e4d241a8b815e16c9d2151e908992c38db197
path     : C:\laragon\webroots\github\api-5.8\vendor\laravel\framework
names    : laravel/framework, illuminate/auth, illuminate/broadcasting, illuminate/bus, illuminate/cache, illuminate/config, illuminate/console, illuminate/container, illuminate/contracts, illuminate/cookie, illuminate/database, illuminate/encryption, illuminate/ev
ents, illuminate/filesystem, illuminate/hashing, illuminate/http, illuminate/log, illuminate/mail, illuminate/notifications, illuminate/pagination, illuminate/pipeline, illuminate/queue, illuminate/redis, illuminate/routing, illuminate/session, illuminate/support,
illuminate/translation, illuminate/validation, illuminate/view

autoload
files
psr-4
Illuminate\ => src/Illuminate/
C:\laragon\webroots\github\api-5.8>composer require awt/apilogger @dev -o -vv
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Dependency resolution completed in 0.401 seconds
Analyzed 14627 packages to resolve dependencies
Analyzed 395459 rules to resolve dependencies
Dependency resolution completed in 0.001 seconds
Package operations: 1 install, 0 updates, 0 removals
Installs: awt/apilogger:dev-master f4b6876
  - Installing awt/apilogger (dev-master f4b6876): Cloning f4b6876b05b6e7fdb2f995df215d92141e25de1a from cache
    REASON: Required by the root package: Install command rule (install awt/apilogger dev-master)

Writing lock file
Generating optimized autoload files
> post-autoload-dump: Illuminate\Foundation\ComposerScripts::postAutoloadDump
> post-autoload-dump: @php artisan package:discover --ansi
Discovered Package: awt/apilogger
Discovered Package: beyondcode/laravel-dump-server
Discovered Package: fideloper/proxy
Discovered Package: laravel/tinker
Discovered Package: nesbot/carbon
Discovered Package: nunomaduro/collision
Package manifest generated successfully.
C:\laragon\webroots\github\api-5.8>php artisan vendor:publish --tag=config --no-ansi -vv
Copied File [\vendor\awt\apilogger\config\apilog.php] To [\config\apilog.php]
Copied File [\vendor\beyondcode\laravel-dump-server\config\config.php] To [\config\debug-server.php]
Publishing complete.

This is L5.8 - L5.8 is pulled by source.

lloy0076 commented 4 years ago

@alijem What's the output of:

composer show awt/apilogger

???

ghost commented 4 years ago

Hi,

Sorry for the late answer. I didn't have my working computer this week. I tried again this morning with fresh composer install and, it worked. I might did something wrong last week.

Thanks for your help. I really appreciate that.

Best regards,