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

L5.6 Issue with Illuminate\Contracts\Logging\Log #1626

Closed
bellwood opened this issue Feb 14, 2018 · 4 comments
Closed

L5.6 Issue with Illuminate\Contracts\Logging\Log #1626

bellwood opened this issue Feb 14, 2018 · 4 comments
Labels

Comments

@bellwood
Copy link

The Laravel 5.5 -> 5.6 upgrade guide outlines that Illuminate\Contracts\Logging\Log has been removed and to use Psr\Log\LoggerInterface

https://laravel.com/docs/5.6/upgrade

[2018-02-14 20:58:53] local.ERROR: Class Illuminate\Contracts\Logging\Log does not exist {"userId":1,"email":"foo@bar.net","exception":"[object] (ReflectionException(code: -1): Class Illuminate\\Contracts\\Logging\\Log does not exist at /app/vendor/laravel/framework/src/Illuminate/Container/Container.php:767)
[stacktrace]
#0 /app/vendor/laravel/framework/src/Illuminate/Container/Container.php(767): ReflectionClass->__construct('Illuminate\\\\Cont...')
#1 /app/vendor/laravel/framework/src/Illuminate/Container/Container.php(646): Illuminate\\Container\\Container->build('Illuminate\\\\Cont...')
#2 /app/vendor/laravel/framework/src/Illuminate/Container/Container.php(601): Illuminate\\Container\\Container->resolve('Illuminate\\\\Cont...', Array)
#3 /app/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(740): Illuminate\\Container\\Container->make('Illuminate\\\\Cont...', Array)
#4 /app/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php(110): Illuminate\\Foundation\\Application->make('Illuminate\\\\Cont...', Array)
#5 /app/vendor/yajra/laravel-datatables-oracle/src/DataTableAbstract.php(727): app('Illuminate\\\\Cont...')
...

Simply making this change inside /vendor/yajra/laravel-datatables-oracle/src/DataTableAbstract.php does not rectify the issue.

  • OSX
  • PHP 7.1.14
  • Laravel v5.6.3
  • Laravel-Datatables v8.4.0
@bellwood
Copy link
Author

@dgbrunoh over at the laravel repo was kind enough to provide a work around until @yajra can sort it officially.

Simply change line 7 in:

/vendor/yajra/laravel-datatables-oracle/src/DataTableAbstract.php

From:

use Illuminate\Contracts\Logging\Log;

To:

use Psr\Log\LoggerInterface as Log;

@yajra
Copy link
Owner

yajra commented Feb 15, 2018

Thanks fo reporting. This will be fixed on #1624 but we may need to do a major bump if this not backward compatible.

@yajra yajra added the bug label Feb 15, 2018
@bellwood
Copy link
Author

bellwood commented Feb 15, 2018

use Illuminate\Contracts\Logging\Log; is depreciated as of L5.6:

The Illuminate\Contracts\Logging\Log Interface

This interface has been removed since this interface was a total duplication of the Psr\Log\LoggerInterface interface. You should type-hint the Psr\Log\LoggerInterface interface instead.

@yajra
Copy link
Owner

yajra commented Feb 16, 2018

Patch released on v8.4.1, thanks!

@yajra yajra closed this as completed Feb 16, 2018
@github-actions github-actions bot locked and limited conversation to collaborators Oct 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants