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

can not install audit in laravel-lumen 5.5 "php artisan auditing:install" gives the following error. #364

Closed
gauravdeveloper96 opened this issue Dec 28, 2017 · 1 comment
Assignees
Labels
bug Issue, error or unexpected behavior

Comments

@gauravdeveloper96
Copy link

gauravdeveloper96 commented Dec 28, 2017

Q A
Bug? yes
New Feature? no
Framework Lumen
Framework version 5.5
Package version 5.5
PHP version 7.1

Actual Behaviour

Type error: Argument 1 passed to OwenIt\Auditing\AuditingServiceProvider::setupConfig() must be an instance of Illuminate\Contracts\Foundation\Application, instance of Laravel\Lumen\Application given, called in /my_project_folder/vendor/owen-it/laravel-auditing/src/AuditingServiceProvider.php in function boot on line $this->setupConfig($this->app);

Expected Behaviour

To not receive the error above.

Steps to Reproduce

I am installing audit in lumen 5.5 from laravel-lumen (" http://laravel-auditing.com/docs/5.0/installation ") documentation. I follow instruction step by step.
Step 0. Auditing package installation via composer:
composer require owen-it/laravel-auditing

Step 1. Edit the bootstrap/app.php file and add following line:
$app->register(OwenIt\Auditing\AuditingServiceProvider::class);

Step 2. And also enable Facades and Eloquent in bootstrap/app.php:
$app->withFacades();

$app->withEloquent();

Step 3. Installed an extra package according to given documentation via composer:
composer require laravelista/lumen-vendor-publish

Step 4. After the package is installed, I add following line in "app/Console/Kernel.php" :
protected $commands = [
\Laravelista\LumenVendorPublish\VendorPublishCommand::class,
];
Step 5. After configuring my framework, I publish the configuration settings using command:
php artisan auditing:install

This command gives above "Type error" that are mentioned in Actual Behaviour section.

Possible Solutions

Be an instance of Illuminate\Contracts\Foundation\Application instead of instance of Laravel\Lumen\Application.

@quetzyg quetzyg added the bug Issue, error or unexpected behavior label Dec 28, 2017
@quetzyg quetzyg self-assigned this Dec 28, 2017
@quetzyg
Copy link
Contributor

quetzyg commented Dec 28, 2017

Thanks for reporting @aminoacide.

It is indeed a bug, and I'll fix it ASAP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue, error or unexpected behavior
Projects
None yet
Development

No branches or pull requests

2 participants