Deprecation Error on PHP8.1

Created on 14 March 2022, over 2 years ago
Updated 7 September 2023, 10 months ago

Problem/Motivation

Deprecated: Required parameter $form_state follows optional parameter $input in /data/app/modules/contrib/svg_icon/src/Plugin/Field/FieldWidget/SvgIconWidget.php on line 196

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Postponed: needs info

Version

1.0

Component

Code

Created by

🇦🇺Australia larowlan 🇦🇺🏝.au GMT+10

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 8.1 & MySQL 5.7 updated deps
    last update 11 months ago
    Waiting for branch to pass
  • 🇮🇳India dineshkumarbollu

    Created patch for this issue.please review

  • Status changed to Needs work 10 months ago
  • 🇦🇺Australia larowlan 🇦🇺🏝.au GMT+10

    Changing the order of the arguments isn't the correct fix here - thanks

  • 🇮🇳India dineshkumarbollu

    optional parameter set as $input=NULL or $input=False will fix the deprecated warning that's reason i applied the patch.Can you suggest other way i can work on it. Thanks

  • Status changed to Postponed: needs info 10 months ago
  • 🇦🇺Australia larowlan 🇦🇺🏝.au GMT+10

    Hi @dineshkumarbollu the code looks like this in HEAD
    public static function value($element, $input, FormStateInterface $form_state) {

    I.e. none of the parameters are optional that I can see.

    I'm not sure where the error is coming from

Production build 0.69.0 2024