Problem/Motivation

Split from manual fixes from #3444232: [8.4] Fix implicitly nullable type declarations for phpstan job (manual ones)

Steps to reproduce

$ docker run --rm -v $(pwd):/var/www/html drupalci/php-8.4-ubuntu-apache:dev php -d error_reporting="E_ALL" -l core/modules/content_moderation/src/Form/ContentModerationConfigureEntityTypesForm.php
...
PHP Deprecated:  Drupal\content_moderation\Form\ContentModerationConfigureEntityTypesForm::buildForm(): Implicitly marking parameter $workflow as nullable is deprecated, the explicit nullable type must be used instead in core/modules/content_moderation/src/Form/ContentModerationConfigureEntityTypesForm.php on line 101
PHP Deprecated:  Drupal\content_moderation\Form\ContentModerationConfigureEntityTypesForm::getTitle(): Implicitly marking parameter $workflow as nullable is deprecated, the explicit nullable type must be used instead in core/modules/content_moderation/src/Form/ContentModerationConfigureEntityTypesForm.php on line 221
No syntax errors detected in core/modules/content_moderation/src/Form/ContentModerationConfigureEntityTypesForm.php

Proposed resolution

As both arguments are required according to route definition make $workflow required too

content_moderation.workflow_type_edit_form:
  path: '/admin/config/workflow/workflows/manage/{workflow}/type/{entity_type_id}'

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Issue fork drupal-3445788

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

andypost created an issue. See original summary.

andypost’s picture

andypost’s picture

Status: Active » Needs review
amateescu’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me :)

alexpott’s picture

Version: 11.x-dev » 10.3.x-dev
Status: Reviewed & tested by the community » Fixed

Committed and pushed 7deaa481d9 to 11.x and b00ae16892 to 11.0.x and 2d27a17771 to 10.4.x and 91b7e66dd3 to 10.3.x. Thanks!

This seems simple enough to backport all the way to 10.3.x

alexpott’s picture

  • alexpott committed 91b7e66d on 10.3.x
    Issue #3445788 by andypost: [PHP 8.4] Fix phpstan job for...

  • alexpott committed 2d27a177 on 10.4.x
    Issue #3445788 by andypost: [PHP 8.4] Fix phpstan job for...

  • alexpott committed b00ae168 on 11.0.x
    Issue #3445788 by andypost: [PHP 8.4] Fix phpstan job for...

  • alexpott committed 7deaa481 on 11.x
    Issue #3445788 by andypost: [PHP 8.4] Fix phpstan job for...

andypost’s picture

Thank you! Looks the remaining manual changes also backportable #3444232-13: [8.4] Fix implicitly nullable type declarations for phpstan job (manual ones)

Status: Fixed » Closed (fixed)

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