Problem/Motivation

There are a number of deprecations I'm seeing when running tests:

$ ../vendor/phpunit/phpunit/phpunit -c core/ modules/contrib/codemirror_editor/ --verbose
PHPUnit 9.5.5 by Sebastian Bergmann and contributors.

Runtime:       PHP 7.3.25-1+0~20201130.73+debian10~1.gbp042074
Configuration: /var/www/html/web/core/phpunit.xml.dist
Warning:       Your XML configuration validates against a deprecated schema.
Suggestion:    Migrate your XML configuration using "--migrate-configuration"!

Testing /var/www/html/web/modules/contrib/codemirror_editor
..............                                                    14 / 14 (100%)

Time: 04:34.194, Memory: 8.00 MB

OK (14 tests, 177 assertions)

Remaining self deprecation notices (29)

  6x: The Drupal\Tests\codemirror_editor\Kernel\ModeManagerTest::$modules property must be declared protected. See https://www.drupal.org/node/2909426
    6x in DrupalListener::startTest from Drupal\Tests\Listeners

  6x: Declaring ::setUp without a void return typehint in Drupal\Tests\codemirror_editor\Kernel\ModeManagerTest is deprecated in drupal:9.0.0. Typehinting will be required before drupal:10.0.0. See https://www.drupal.org/node/3114724
    6x in DrupalListener::startTest from Drupal\Tests\Listeners

  3x: Calling Drupal\Tests\UiHelperTrait::drupalPostForm() with $path set to NULL is deprecated in drupal:9.2.0 and the method is removed in drupal:10.0.0. Use $this->submitForm() instead. See https://www.drupal.org/node/3168858
    2x in TextEditorTest::testTextEditor from Drupal\Tests\codemirror_editor\FunctionalJavascript
    1x in FilterTest::testFilter from Drupal\Tests\codemirror_editor\FunctionalJavascript

  1x: The Drupal\Tests\codemirror_editor\FunctionalJavascript\WidgetFormattedTest::$modules property must be declared protected. See https://www.drupal.org/node/2909426
    1x in DrupalListener::startTest from Drupal\Tests\Listeners

  1x: The Drupal\Tests\codemirror_editor\Kernel\LibraryBuilderTest::$modules property must be declared protected. See https://www.drupal.org/node/2909426
    1x in DrupalListener::startTest from Drupal\Tests\Listeners

  1x: Declaring ::setUp without a void return typehint in Drupal\Tests\codemirror_editor\Kernel\LibraryBuilderTest is deprecated in drupal:9.0.0. Typehinting will be required before drupal:10.0.0. See https://www.drupal.org/node/3114724
    1x in DrupalListener::startTest from Drupal\Tests\Listeners

  1x: The Drupal\Tests\codemirror_editor\FunctionalJavascript\WidgetStringTest::$modules property must be declared protected. See https://www.drupal.org/node/2909426
    1x in DrupalListener::startTest from Drupal\Tests\Listeners

  1x: Declaring ::setUp without a void return typehint in Drupal\Tests\codemirror_editor\FunctionalJavascript\WidgetStringTest is deprecated in drupal:9.0.0. Typehinting will be required before drupal:10.0.0. See https://www.drupal.org/node/3114724
    1x in DrupalListener::startTest from Drupal\Tests\Listeners

  1x: The Drupal\Tests\codemirror_editor\FunctionalJavascript\EditorTest::$modules property must be declared protected. See https://www.drupal.org/node/2909426
    1x in DrupalListener::startTest from Drupal\Tests\Listeners

  1x: Declaring ::setUp without a void return typehint in Drupal\Tests\codemirror_editor\FunctionalJavascript\WidgetFormattedTest is deprecated in drupal:9.0.0. Typehinting will be required before drupal:10.0.0. See https://www.drupal.org/node/3114724
    1x in DrupalListener::startTest from Drupal\Tests\Listeners

  1x: Declaring ::setUp without a void return typehint in Drupal\Tests\codemirror_editor\FunctionalJavascript\FilterTest is deprecated in drupal:9.0.0. Typehinting will be required before drupal:10.0.0. See https://www.drupal.org/node/3114724
    1x in DrupalListener::startTest from Drupal\Tests\Listeners

  1x: Declaring ::setUp without a void return typehint in Drupal\Tests\codemirror_editor\FunctionalJavascript\TextEditorTest is deprecated in drupal:9.0.0. Typehinting will be required before drupal:10.0.0. See https://www.drupal.org/node/3114724
    1x in DrupalListener::startTest from Drupal\Tests\Listeners

  1x: The Drupal\Tests\codemirror_editor\FunctionalJavascript\SettingsFormTest::$modules property must be declared protected. See https://www.drupal.org/node/2909426
    1x in DrupalListener::startTest from Drupal\Tests\Listeners

  1x: The Drupal\Tests\codemirror_editor\FunctionalJavascript\FormatterTest::$modules property must be declared protected. See https://www.drupal.org/node/2909426
    1x in DrupalListener::startTest from Drupal\Tests\Listeners

  1x: Declaring ::setUp without a void return typehint in Drupal\Tests\codemirror_editor\FunctionalJavascript\FormatterTest is deprecated in drupal:9.0.0. Typehinting will be required before drupal:10.0.0. See https://www.drupal.org/node/3114724
    1x in DrupalListener::startTest from Drupal\Tests\Listeners

  1x: The Drupal\Tests\codemirror_editor\FunctionalJavascript\FilterTest::$modules property must be declared protected. See https://www.drupal.org/node/2909426
    1x in DrupalListener::startTest from Drupal\Tests\Listeners

  1x: The Drupal\Tests\codemirror_editor\FunctionalJavascript\TextEditorTest::$modules property must be declared protected. See https://www.drupal.org/node/2909426
    1x in DrupalListener::startTest from Drupal\Tests\Listeners

Proposed resolution

Address deprecations.

Remaining tasks

Post patch.

User interface changes

None.

API changes

None.

Data model changes

None.

Comments

Chris Burge created an issue. See original summary.

chris burge’s picture

Status: Active » Needs review
StatusFileSize
new5.98 KB

Patch attached.

heddn’s picture

Status: Needs review » Reviewed & tested by the community

Changes here look reasonable.

  • heddn committed 3eabcee on 8.x-1.x authored by Chris Burge
    Issue #3221949 by Chris Burge, heddn: Address Deprecated Code in Tests
    
heddn’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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