Problem/Motivation

This test is blocked by #3589063 and is postponed on completion of it.

When fixing tests in accordance with #3589063, many of the tests trigger deprecations. The deprecations relate to forms. There are various different deprecations relating to annotations that need to be replaced with attributes. The most frequent examples are 2x deprecations that can be fixed for each form:

1 test triggered 14 deprecations:

1) /var/www/html/vendor/symfony/error-handler/DebugClassLoader.php:363
Method "Drupal\Core\Form\FormInterface::getFormId()" might add "string" as a native return type declaration in the future. Do the same in implementation "Drupal\ajax_example\Form\Simplest" now to avoid errors or add an explicit @return annotation to suppress this message.

Triggered by:

* Drupal\Tests\ajax_example\Functional\DynamicFormSectionsTest::testDynamicFormSections
  /var/www/html/modules/contrib/examples/modules/ajax_example/tests/src/Functional/DynamicFormSectionsTest.php:35

2) /var/www/html/vendor/symfony/error-handler/DebugClassLoader.php:363
Method "Drupal\Core\Form\FormInterface::buildForm()" might add "array" as a native return type declaration in the future. Do the same in implementation "Drupal\ajax_example\Form\Simplest" now to avoid errors or add an explicit @return annotation to suppress this message.

Steps to reproduce

Run the functional tests and view deprecations.

Proposed resolution

Explicitly define the required return types for the 2x form methods. And replace deprecated annotations with the required attributes.

Remaining tasks

User interface changes

N/A

API changes

N/A

Data model changes

N/A

Comments

oily created an issue. See original summary.

oily’s picture

Issue summary: View changes
oily’s picture

Status: Active » Postponed
avpaderno’s picture