Executing php artisan schedule-monitor:sync with Laravel 7 crashes
simonschaufi opened this issue · 2 comments
simonschaufi commented
Executing php artisan schedule-monitor:sync
with Laravel 7 and spatie/laravel-schedule-monitor version 2.0.1 crashes:
php artisan schedule-monitor:sync
Start syncing schedule...
Start syncing schedule with database...
Error
Object of class DateTimeZone could not be converted to string
at vendor/spatie/laravel-schedule-monitor/src/Support/ScheduledTasks/Tasks/Task.php:161
157| }
158|
159| public function timezone(): string
160| {
> 161| return (string)$this->event->timezone;
162| }
163|
164| public function humanReadableCron(): string
165| {
+1 vendor frames
2 [internal]:0
Spatie\ScheduleMonitor\Commands\SyncCommand::Spatie\ScheduleMonitor\Commands\{closure}()
+17 vendor frames
20 artisan:37
Illuminate\Foundation\Console\Kernel::handle()
freekmurze commented
I think it's something specific to your project. Our test suite proves that the package is working as intended. Please PR a fix with tests that works for you.
simonschaufi commented
Does it depend on the PHP version? I have php 7.4