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

Creation of dynamic property errors #103

Open
heikokrebs opened this issue Jan 25, 2024 · 5 comments
Open

Creation of dynamic property errors #103

heikokrebs opened this issue Jan 25, 2024 · 5 comments

Comments

@heikokrebs
Copy link

heikokrebs commented Jan 25, 2024

After upgrading to PHP 8.2 i get a lot of errors, because i am setting a gracetime, name or donotmonitor in the scheduler. For example:

Creation of dynamic property Illuminate\Console\Scheduling\Event::$monitorName is deprecated in …vendor/spatie/laravel-schedule-monitor/src/ScheduleMonitorServiceProvider.php on line 113

or

Creation of dynamic property Illuminate\Console\Scheduling\CallbackEvent::$monitorName is deprecated in …vendor/spatie/laravel-schedule-monitor/src/ScheduleMonitorServiceProvider.php on line 113

The fix from #93 does not work, because we try to get those props from Illuminate\Console\Scheduling\Event and Illuminate\Console\Scheduling\CallbackEvent.

As stated here https://www.php.net/manual/en/migration82.deprecated.php:

The creation of dynamic properties is deprecated, unless the class opts in by using the #[\AllowDynamicProperties] attribute.

Both Illuminate\Console\Scheduling\Event and Illuminate\Console\Scheduling\CallbackEvent do not support this right now.
So this cant be fixed within the scope of this package or are there any ideas?
Maybe this is fixed in Laravel 11 which will have a min. PHP version of 8.2?

@faizananwerali
Copy link

yeah 'monitorName' is not working for me as well

@nastoychev
Copy link

nastoychev commented Apr 25, 2024

Hey everyone, just wanted to give an update. Everything seems to be running smoothly with Laravel 10/11 PHP 8.2 on our end, but we're still encountering some log warnings.

image

@spatie-bot
Copy link

Dear contributor,

because this issue seems to be inactive for quite some time now, I've automatically closed it. If you feel this issue deserves some attention from my human colleagues feel free to reopen it.

@m-bymike
Copy link
Contributor

m-bymike commented Sep 4, 2024

Hi, sorry, the issue still persists and I'd like to ask to reopen it, especially since there is a related PR open here: #114

@nastoychev
Copy link

Since PR #114 was released, I don't see any warnings in laravel.log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants