- Issue created by @adminazhar
- 🇨🇭Switzerland lomale@bluewin.ch Switzerland
I had the same experience.
I run Drupal 9.5.3 since a while.
Then i changed to PHP 8.2
and get a bunch of errorsDeprecated function: Creation of dynamic property Drupal\views\ManyToOneHelper::$handler is deprecated in Drupal\views\ManyToOneHelper->__construct() (Zeile 24 in /home/webXXX/www/test.istdp.ch/core/modules/views/src/ManyToOneHelper.php)
Deprecated function: Use of "static" in callables is deprecated in Drupal\user\Entity\Role::postLoad() (Zeile 172 in /home/webXXX/www/test.istdp.ch/core/modules/user/src/Entity/Role.php)
Deprecated function: Use of "static" in callables is deprecated in Drupal\Core\Asset\AssetResolver->getCssAssets() (Zeile 163 in /home/webXXX/www/test.istdp.ch/core/lib/Drupal/Core/Asset/AssetResolver.php)
I moved back to PHP 8.1.6 and these logs went away.
I'm not a PRO. So no idea. Maybe it will help the core maintainers.
- Status changed to Closed: works as designed
almost 2 years ago 12:04pm 24 February 2023 - 🇬🇧United Kingdom longwave UK
Drupal 9 does not support PHP 8.2; see https://www.drupal.org/docs/system-requirements/php-requirements#versions →
Use PHP 8.1 for now, then upgrade to Drupal 10 before upgrading to PHP 8.2.
- 🇭🇺Hungary djg_tram
@longwave That doesn't really help because D10 is also full of deprecated message (including this one).
Being warnings, things are not critical per se, but this makes the log practically unusable. So, some co-ordinated effort to root out these deprecated things would be very welcome. :-) Yes, I know, everybody is free to contribute but not all of us are actively participating in core. So, the question is whether you, who do, can at least inform us whether this is something that is currently undertaken or not.
- 🇬🇧United Kingdom longwave UK
@djg_tram please search for existing issues if you are finding PHP 8.2 deprecation messages in Drupal 10, and open a new issue if you can't find a relevant one - Drupal 10 has many deprecations already fixed compared to Drupal 9, and we are happy to fix more as they are found in the Drupal 10 branches.
- 🇺🇸United States pthurmond Overland Park, KS
Looks like Drupal 9 DOES support PHP 8.2. And anyway I get this error in PHP 7.4 and 8.1. So that isn't the problem. Why in the world was this deprecation setup without fixing all the places in core first? That seems like an oversight.
It seems to me that this ticket should be about fixing the cause of the deprecation by making all the right changes and not just reporting the issue.
These are PHP language deprecations, not something that Drupal deprecated. Drupal is subject to them, not causing them.