Framework: [5.8] Undefined property: Illuminate\Cache\Events\KeyWritten::$minutes

Created on 12 Mar 2019  路  9Comments  路  Source: laravel/framework

  • Laravel Version: 5.8.4
  • PHP Version: 7.3.3
  • Database Driver & Version:mysql

Description:

After update from 5.7 to 5.8 I'm receiving this error:
Undefined property: Illuminate\Cache\Events\KeyWritten::$minutes
almost on every request

Steps To Reproduce:

{
"message": "Undefined property: Illuminate\Cache\Events\KeyWritten::$minutes",
"exception": "ErrorException",
"file": "C:\laragon\www\logivicev2\vendor\itsgoingd\clockwork\Clockwork\DataSource\LaravelCacheDataSource.php",
"line": 65,
"trace": [
{
"file": "C:\laragon\www\logivicev2\vendor\sentry\sentry\src\ErrorHandler.php",
"line": 194,
"function": "handleError",
"class": "Illuminate\Foundation\Bootstrap\HandleExceptions",
"type": "->"
},
{
"file": "C:\laragon\www\logivicev2\vendor\itsgoingd\clockwork\Clockwork\DataSource\LaravelCacheDataSource.php",
"line": 65,
"function": "handleError",
"class": "Sentry\ErrorHandler",
"type": "->"
},
{
"file": "C:\laragon\www\logivicev2\vendor\laravel\framework\src\Illuminate\Events\Dispatcher.php",
"line": 347,
"function": "Clockwork\DataSource\{closure}",
"class": "Clockwork\DataSource\LaravelCacheDataSource",
"type": "->"
},
{
"file": "C:\laragon\www\logivicev2\vendor\laravel\framework\src\Illuminate\Events\Dispatcher.php",
"line": 196,
"function": "Illuminate\Events\{closure}",
"class": "Illuminate\Events\Dispatcher",
"type": "->"
},
{
"file": "C:\laragon\www\logivicev2\vendor\laravel\framework\src\Illuminate\Cache\Repository.php",
"line": 550,
"function": "dispatch",
"class": "Illuminate\Events\Dispatcher",
"type": "->"
},
{
"file": "C:\laragon\www\logivicev2\vendor\laravel\framework\src\Illuminate\Cache\Repository.php",
"line": 218,
"function": "event",
"class": "Illuminate\Cache\Repository",
"type": "->"
},
{
"file": "C:\laragon\www\logivicev2\vendor\laravel\framework\src\Illuminate\Cache\Repository.php",
"line": 320,
"function": "put",
"class": "Illuminate\Cache\Repository",
"type": "->"
},
{
"file": "C:\laragon\www\logivicev2\vendor\laravel\framework\src\Illuminate\Cache\RateLimiter.php",
"line": 60,
"function": "add",
"class": "Illuminate\Cache\Repository",
"type": "->"
},
{
"file": "C:\laragon\www\logivicev2\vendor\laravel\framework\src\Illuminate\Routing\Middleware\ThrottleRequests.php",
"line": 56,
"function": "hit",
"class": "Illuminate\Cache\RateLimiter",
"type": "->"
},
{
"file": "C:\laragon\www\logivicev2\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php",
"line": 163,
"function": "handle",
"class": "Illuminate\Routing\Middleware\ThrottleRequests",
"type": "->"
},
{
"file": "C:\laragon\www\logivicev2\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php",
"line": 53,
"function": "Illuminate\Pipeline\{closure}",
"class": "Illuminate\Pipeline\Pipeline",
"type": "->"
},
{
"file": "C:\laragon\www\logivicev2\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php",
"line": 104,
"function": "Illuminate\Routing\{closure}",
"class": "Illuminate\Routing\Pipeline",
"type": "->"
},
{
"file": "C:\laragon\www\logivicev2\vendor\laravel\framework\src\Illuminate\Routing\Router.php",
"line": 682,
"function": "then",
"class": "Illuminate\Pipeline\Pipeline",
"type": "->"
},
{
"file": "C:\laragon\www\logivicev2\vendor\laravel\framework\src\Illuminate\Routing\Router.php",
"line": 657,
"function": "runRouteWithinStack",
"class": "Illuminate\Routing\Router",
"type": "->"
},
{
"file": "C:\laragon\www\logivicev2\vendor\laravel\framework\src\Illuminate\Routing\Router.php",
"line": 623,
"function": "runRoute",
"class": "Illuminate\Routing\Router",
"type": "->"
},
{
"file": "C:\laragon\www\logivicev2\vendor\laravel\framework\src\Illuminate\Routing\Router.php",
"line": 612,
"function": "dispatchToRoute",
"class": "Illuminate\Routing\Router",
"type": "->"
},
{
"file": "C:\laragon\www\logivicev2\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php",
"line": 176,
"function": "dispatch",
"class": "Illuminate\Routing\Router",
"type": "->"
},
{
"file": "C:\laragon\www\logivicev2\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php",
"line": 30,
"function": "Illuminate\Foundation\Http\{closure}",
"class": "Illuminate\Foundation\Http\Kernel",
"type": "->"
},
{
"file": "C:\laragon\www\logivicev2\vendor\barryvdh\laravel-debugbar\src\Middleware\InjectDebugbar.php",
"line": 65,
"function": "Illuminate\Routing\{closure}",
"class": "Illuminate\Routing\Pipeline",
"type": "->"
},
{
"file": "C:\laragon\www\logivicev2\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php",
"line": 163,
"function": "handle",
"class": "Barryvdh\Debugbar\Middleware\InjectDebugbar",
"type": "->"
},
{
"file": "C:\laragon\www\logivicev2\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php",
"line": 53,
"function": "Illuminate\Pipeline\{closure}",
"class": "Illuminate\Pipeline\Pipeline",
"type": "->"
},
{
"file": "C:\laragon\www\logivicev2\vendor\barryvdh\laravel-cors\src\HandleCors.php",
"line": 58,
"function": "Illuminate\Routing\{closure}",
"class": "Illuminate\Routing\Pipeline",
"type": "->"
},
{
"file": "C:\laragon\www\logivicev2\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php",
"line": 163,
"function": "handle",
"class": "Barryvdh\Cors\HandleCors",
"type": "->"
},
{
"file": "C:\laragon\www\logivicev2\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php",
"line": 53,
"function": "Illuminate\Pipeline\{closure}",
"class": "Illuminate\Pipeline\Pipeline",
"type": "->"
},
{
"file": "C:\laragon\www\logivicev2\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\TransformsRequest.php",
"line": 21,
"function": "Illuminate\Routing\{closure}",
"class": "Illuminate\Routing\Pipeline",
"type": "->"
},
{
"file": "C:\laragon\www\logivicev2\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php",
"line": 163,
"function": "handle",
"class": "Illuminate\Foundation\Http\Middleware\TransformsRequest",
"type": "->"
},
{
"file": "C:\laragon\www\logivicev2\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php",
"line": 53,
"function": "Illuminate\Pipeline\{closure}",
"class": "Illuminate\Pipeline\Pipeline",
"type": "->"
},
{
"file": "C:\laragon\www\logivicev2\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\TransformsRequest.php",
"line": 21,
"function": "Illuminate\Routing\{closure}",
"class": "Illuminate\Routing\Pipeline",
"type": "->"
},
{
"file": "C:\laragon\www\logivicev2\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php",
"line": 163,
"function": "handle",
"class": "Illuminate\Foundation\Http\Middleware\TransformsRequest",
"type": "->"
},
{
"file": "C:\laragon\www\logivicev2\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php",
"line": 53,
"function": "Illuminate\Pipeline\{closure}",
"class": "Illuminate\Pipeline\Pipeline",
"type": "->"
},
{
"file": "C:\laragon\www\logivicev2\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\ValidatePostSize.php",
"line": 27,
"function": "Illuminate\Routing\{closure}",
"class": "Illuminate\Routing\Pipeline",
"type": "->"
},
{
"file": "C:\laragon\www\logivicev2\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php",
"line": 163,
"function": "handle",
"class": "Illuminate\Foundation\Http\Middleware\ValidatePostSize",
"type": "->"
},
{
"file": "C:\laragon\www\logivicev2\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php",
"line": 53,
"function": "Illuminate\Pipeline\{closure}",
"class": "Illuminate\Pipeline\Pipeline",
"type": "->"
},
{
"file": "C:\laragon\www\logivicev2\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode.php",
"line": 62,
"function": "Illuminate\Routing\{closure}",
"class": "Illuminate\Routing\Pipeline",
"type": "->"
},
{
"file": "C:\laragon\www\logivicev2\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php",
"line": 163,
"function": "handle",
"class": "Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode",
"type": "->"
},
{
"file": "C:\laragon\www\logivicev2\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php",
"line": 53,
"function": "Illuminate\Pipeline\{closure}",
"class": "Illuminate\Pipeline\Pipeline",
"type": "->"
},
{
"file": "C:\laragon\www\logivicev2\vendor\itsgoingd\clockwork\Clockwork\Support\Laravel\ClockworkMiddleware.php",
"line": 28,
"function": "Illuminate\Routing\{closure}",
"class": "Illuminate\Routing\Pipeline",
"type": "->"
},
{
"file": "C:\laragon\www\logivicev2\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php",
"line": 163,
"function": "handle",
"class": "Clockwork\Support\Laravel\ClockworkMiddleware",
"type": "->"
},
{
"file": "C:\laragon\www\logivicev2\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php",
"line": 53,
"function": "Illuminate\Pipeline\{closure}",
"class": "Illuminate\Pipeline\Pipeline",
"type": "->"
},
{
"file": "C:\laragon\www\logivicev2\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php",
"line": 104,
"function": "Illuminate\Routing\{closure}",
"class": "Illuminate\Routing\Pipeline",
"type": "->"
},
{
"file": "C:\laragon\www\logivicev2\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php",
"line": 151,
"function": "then",
"class": "Illuminate\Pipeline\Pipeline",
"type": "->"
},
{
"file": "C:\laragon\www\logivicev2\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php",
"line": 116,
"function": "sendRequestThroughRouter",
"class": "Illuminate\Foundation\Http\Kernel",
"type": "->"
},
{
"file": "C:\laragon\www\logivicev2\public\index.php",
"line": 53,
"function": "handle",
"class": "Illuminate\Foundation\Http\Kernel",
"type": "->"
}
]
}

Most helpful comment

This is an issue with the Clockwork package, the necessary fixes for 5.8 compatibilities were made in this commit https://github.com/itsgoingd/clockwork/commit/e7bd05b9a9edd586381c81187c9aa0ef25538499, update to Clockwork 3.13

All 9 comments

Have you applied the necessary changes from the upgrade guide?

This is an issue with the Clockwork package, the necessary fixes for 5.8 compatibilities were made in this commit https://github.com/itsgoingd/clockwork/commit/e7bd05b9a9edd586381c81187c9aa0ef25538499, update to Clockwork 3.13

I had this on one of my upgrades.

Have you run php artisan cache:clear? - does that solve it?

I had this on one of my upgrades.

Have you run php artisan cache:clear? - does that solve it?

I've tried but no success

Fixed thanks to @ajoy39 !

If the above solutions doesn't work for anyone, I had this problem because of Telescope.

You're right, @yamenarahman, this was fixed in https://github.com/laravel/telescope/pull/583 and released for the v2

I had this problem as well. I have done a shift from Laravel 5.7 to 5.8 and suddenly had this issue. Copying and pasting themsaid words:

Everyone, please make sure to use Telescope 2.0 on Laravel 5.8, or Telescope 1.0 on Laravel 5.7.

https://github.com/laravel/telescope/issues/568

I had the same problem with Laravel 5.8 and Telescope 2.1. It was solved by updating Clockwork package: I had clockwork v.2.2 and it was upgraded to 4.0

composer require itsgoingd/clockwork

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lzp819739483 picture lzp819739483  路  3Comments

ghost picture ghost  路  3Comments

PhiloNL picture PhiloNL  路  3Comments

SachinAgarwal1337 picture SachinAgarwal1337  路  3Comments

YannPl picture YannPl  路  3Comments