- Issue created by @classiccut
- π¨π¦Canada classiccut
Patch that explicitly declares type and key as public member properties.
- π¨π¦Canada crawleyde
This solves many deprecated function warnings for me as well. Thank you.
-
arnested β
committed c88b325b on 7.x-2.x
Issue #3489049 by classiccut: Prevent excessive warnings with php 8.2
-
arnested β
committed c88b325b on 7.x-2.x
- π©π°Denmark arnested
Thank you for the patch!
It has been committed and released in the 7.x-2.10 β release.
- π¨π¦Canada classiccut
Amazing! Thanks for the quick turnaround. Much appreciated.
- πΊπΈUnited States narkoff
Even after adding this patch, I still have the following message in my logs:
Deprecated function: Creation of dynamic property UltimateCronJob::$sort is deprecated in ultimate_cron_run_launchers() (line 1643 of /code/sites/all/modules/ultimate_cron/ultimate_cron.module).
Should this patch have addressed this too?
- πΊπΈUnited States narkoff
Thank you, @arnested.
Yes, patch in #10 works. But I noticed I was also getting messages for $disabled, $hook, $table, $description, $title, $export_type, $name, $jid, $type, $progress, $lock_id, $log_entry. Adding these to class UltimateCronJob worked.
Or, the other option is to add
#[\AllowDynamicProperties]
in front of the class (though I assume explicitly defining all dynamic properties is better). - π©π°Denmark arnested
Yes, I think adding the properties are the way forward.
On the other hand, Drupal 7 is soon too be unsupported. So I think both approaches are valid now.
Would you mind creating a patch?
I'm not using Drupal 7 anymore myself, so I would just end up blindly adding what you suggest anyway :)
- π©π°Denmark arnested
Maybe a combination?
This patch declares the properties that are actually used in the class itself.
And then it declares AllowDynamicProperties for all the other properties to not emit warnings.
- πΊπΈUnited States narkoff
Patch that adds properties that were generating messages to the UltimateCronJob and CropRule classes.
-
arnested β
committed 700340c8 on 7.x-2.x
Issue #3489049 by narkoff: Prevent excessive warnings with php 8.2
-
arnested β
committed 700340c8 on 7.x-2.x
- π©π°Denmark arnested
Thank you for the patch, @narkoff.
I have committed it and released it as version 7.x-2.11 β .
Automatically closed - issue fixed for 2 weeks with no activity.