Problem/Motivation
Getting following deprecation error with php 8.2
Deprecated function: Creation of dynamic property Drupal\amp\Asset\AmpCssCollectionRenderer::$state is deprecated in Drupal\amp\Asset\AmpCssCollectionRenderer->__construct() (line 95 of modules/contrib/amp/src/Asset/AmpCssCollectionRenderer.php).
Issue fork amp-3417787
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
sonvir249 commentedComment #4
s3b0un3tTested with version 3.8 of the AMP module in PHP 8.3.
The Merge Request resolves the deprecated issue and does not result in a new issue.
I update the issue in RTBC.
Thanks for your fix !
Comment #5
kurttrowbridgeAlso confirmed that the supplied MR resolved the issue for my site using PHP 8.2 and the dev version of the module. Thank you!
Comment #6
flyke commentedAfter this patch, I got the following notices in my console after for example a
drush updbcommand:I fixed this by adding this patch in my projects composer.json file:
Comment #7
nicobot commentedI also confirm the patch fixes the issue as described. Also comment #6 makes sense as well. Thank you all!