Problem/Motivation

When using the module with PHP 8.4 installed several deprecation notices are displayed:

NOTICE: PHP message: PHP Deprecated:  Drupal\select_or_other\Plugin\Field\FieldWidget\ReferenceWidget::__construct(): Implicitly marking parameter $entity_type as nullable is deprecated, the explicit nullable type must be used instead in src/Plugin/Field/FieldWidget/ReferenceWidget.php on line 72
NOTICE: PHP message: PHP Deprecated:  Drupal\select_or_other\Plugin\Field\FieldWidget\ReferenceWidget::__construct(): Implicitly marking parameter $bundle_info_service as nullable is deprecated, the explicit nullable type must be used instead in src/Plugin/Field/FieldWidget/ReferenceWidget.php on line 72
NOTICE: PHP message: PHP Deprecated:  Drupal\select_or_other\Plugin\Field\FieldWidget\ReferenceWidget::__construct(): Implicitly marking parameter $current_user as nullable is deprecated, the explicit nullable type must be used instead in src/Plugin/Field/FieldWidget/ReferenceWidget.php on line 72
NOTICE: PHP message: PHP Deprecated:  Drupal\select_or_other\Plugin\Field\FieldWidget\ReferenceWidget::getOptions(): Implicitly marking parameter $entity as nullable is deprecated, the explicit nullable type must be used instead in src/Plugin/Field/FieldWidget/ReferenceWidget.php on line 130
NOTICE: PHP message: PHP Deprecated:  Drupal\select_or_other\Plugin\Field\FieldWidget\WidgetBase::getOptions(): Implicitly marking parameter $entity as nullable is deprecated, the explicit nullable type must be used instead in select_or_other/src/Plugin/Field/FieldWidget/WidgetBase.php on line 207
NOTICE: PHP message: PHP Deprecated:  Drupal\select_or_other\Plugin\Field\FieldWidget\ListWidget::getOptions(): Implicitly marking parameter $entity as nullable is deprecated, the explicit nullable type must be used instead in select_or_other/src/Plugin/Field/FieldWidget/ListWidget.php on line 107
Command icon 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

intrafusion created an issue. See original summary.

intrafusion’s picture

Status: Active » Needs review
ivnish’s picture

Status: Needs review » Needs work

Tests failed. Please check it

lisotton made their first commit to this issue’s fork.

lisotton’s picture

Status: Needs work » Needs review

@instrafusion in your MR, you are changing the signature of the constructor, that's why the tests are failing. I have changed it, but I was not able to push to your MR, as you created a branch with colon.

@ivnish tests are green now.

  • ivnish committed bf1f1dd7 on 4.x authored by lisotton
    [#3536642] feat: PHP 8.4 deprecation notices
    
    By: intrafusion
    By: ivnish...

ivnish’s picture

Version: 4.2.0 » 4.x-dev
Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.