Drupal 10 compatibility

Created on 30 March 2022, about 3 years ago
Updated 23 June 2023, almost 2 years ago

Problem/Motivation

Testing Drupal\Tests\flag\Functional\AdminUITest
.                                                                   1 / 1 (100%)

Time: 00:12.733, Memory: 12.00 MB

OK (1 test, 58 assertions)

Remaining self deprecation notices (41)

  13x: AssertLegacyTrait::assertEqual() is deprecated in drupal:8.0.0 and is removed from drupal:10.0.0. Use $this->assertEquals() instead. See https://www.drupal.org/node/3129738
    13x in AdminUITest::testFlagAdmin from Drupal\Tests\flag\Functional

  12x: AssertLegacyTrait::assertText() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->responseContains() or $this->assertSession()->pageTextContains() instead. See https://www.drupal.org/node/3129738
    12x in AdminUITest::testFlagAdmin from Drupal\Tests\flag\Functional

  4x: Relying on entity queries to check access by default is deprecated in drupal:9.2.0 and an error will be thrown from drupal:10.0.0. Call \Drupal\Core\Entity\Query\QueryInterface::accessCheck() with TRUE or FALSE to specify whether access should be checked. See https://www.drupal.org/node/3201242
    4x in AdminUITest::testFlagAdmin from Drupal\Tests\flag\Functional

  2x: Not marking service definitions as public is deprecated in drupal:9.2.0 and is required in drupal:10.0.0. Call $definition->setPublic(TRUE) before calling ::setDefinition(). See https://www.drupal.org/node/3194517
    2x in AdminUITest::testFlagAdmin from Drupal\Tests\flag\Functional

  2x: AssertLegacyTrait::assertResponse() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->statusCodeEquals() instead. See https://www.drupal.org/node/3129738
    2x in AdminUITest::testFlagAdmin from Drupal\Tests\flag\Functional

  2x: Calling the Symfony\Component\EventDispatcher\EventDispatcherInterface::dispatch() method with a string event name as the first argument is deprecated in drupal:9.1.0, an Event object will be required instead in drupal:10.0.0. See https://www.drupal.org/node/3154407
    2x in AdminUITest::testFlagAdmin from Drupal\Tests\flag\Functional

  1x: Declaring ::setUp without a void return typehint in Drupal\Tests\flag\Functional\AdminUITest 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\flag\Functional\AdminUITest::$modules property must be declared protected. See https://www.drupal.org/node/2909426
    1x in DrupalListener::startTest from Drupal\Tests\Listeners

  1x: AssertLegacyTrait::assertNoText() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->responseNotContains() or $this->assertSession()->pageTextNotContains() instead. See https://www.drupal.org/node/3129738
    1x in AdminUITest::testFlagAdmin from Drupal\Tests\flag\Functional

  1x: The spaceless tag in "modules/contrib/flag/templates/flag.html.twig" at line 17 is deprecated since Twig 2.7, use the "spaceless" filter with the "apply" tag instead.
    1x in AdminUITest::testFlagAdmin from Drupal\Tests\flag\Functional

  1x: AssertLegacyTrait::assertLink() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->linkExists() instead. See https://www.drupal.org/node/3129738
    1x in AdminUITest::testFlagAdmin from Drupal\Tests\flag\Functional

  1x: AssertLegacyTrait::assertNoLink() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->linkNotExists() instead. See https://www.drupal.org/node/3129738
    1x in AdminUITest::testFlagAdmin from Drupal\Tests\flag\Functional
    
Testing Drupal\Tests\flag\Functional\AjaxLinkNoJsTest
.                                                                   1 / 1 (100%)

Time: 00:07.289, Memory: 10.00 MB

OK (1 test, 15 assertions)

Remaining self deprecation notices (8)

  2x: Calling the Symfony\Component\EventDispatcher\EventDispatcherInterface::dispatch() method with a string event name as the first argument is deprecated in drupal:9.1.0, an Event object will be required instead in drupal:10.0.0. See https://www.drupal.org/node/3154407
    2x in AjaxLinkNoJsTest::testNoJsMessage from Drupal\Tests\flag\Functional

  1x: Declaring ::setUp without a void return typehint in Drupal\Tests\flag\Functional\AjaxLinkNoJsTest 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\flag\Functional\AjaxLinkNoJsTest::$modules property must be declared protected. See https://www.drupal.org/node/2909426
    1x in DrupalListener::startTest from Drupal\Tests\Listeners

  1x: Not marking service definitions as public is deprecated in drupal:9.2.0 and is required in drupal:10.0.0. Call $definition->setPublic(TRUE) before calling ::setDefinition(). See https://www.drupal.org/node/3194517
    1x in AjaxLinkNoJsTest::testNoJsMessage from Drupal\Tests\flag\Functional

  1x: Adding non-existent permissions to a role is deprecated in drupal:9.3.0 and triggers a runtime exception before drupal:10.0.0. The incorrect permissions are "access contextual links". Permissions should be defined in a permissions.yml file or a permission callback. See https://www.drupal.org/node/3193348
    1x in AjaxLinkNoJsTest::testNoJsMessage from Drupal\Tests\flag\Functional

  1x: The spaceless tag in "modules/contrib/flag/templates/flag.html.twig" at line 17 is deprecated since Twig 2.7, use the "spaceless" filter with the "apply" tag instead.
    1x in AjaxLinkNoJsTest::testNoJsMessage from Drupal\Tests\flag\Functional

  1x: Relying on entity queries to check access by default is deprecated in drupal:9.2.0 and an error will be thrown from drupal:10.0.0. Call \Drupal\Core\Entity\Query\QueryInterface::accessCheck() with TRUE or FALSE to specify whether access should be checked. See https://www.drupal.org/node/3201242
    1x in AjaxLinkNoJsTest::testNoJsMessage from Drupal\Tests\flag\Functional

Testing Drupal\Tests\flag\Functional\AnonymousFlagTest
.                                                                   1 / 1 (100%)

Time: 00:06.911, Memory: 10.00 MB

OK (1 test, 10 assertions)

Remaining self deprecation notices (7)

  2x: Calling the Symfony\Component\EventDispatcher\EventDispatcherInterface::dispatch() method with a string event name as the first argument is deprecated in drupal:9.1.0, an Event object will be required instead in drupal:10.0.0. See https://www.drupal.org/node/3154407
    2x in AnonymousFlagTest::testAnonymousFlagging from Drupal\Tests\flag\Functional

  1x: Declaring ::setUp without a void return typehint in Drupal\Tests\flag\Functional\AnonymousFlagTest 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\flag\Functional\AnonymousFlagTest::$modules property must be declared protected. See https://www.drupal.org/node/2909426
    1x in DrupalListener::startTest from Drupal\Tests\Listeners

  1x: Not marking service definitions as public is deprecated in drupal:9.2.0 and is required in drupal:10.0.0. Call $definition->setPublic(TRUE) before calling ::setDefinition(). See https://www.drupal.org/node/3194517
    1x in AnonymousFlagTest::testAnonymousFlagging from Drupal\Tests\flag\Functional

  1x: The spaceless tag in "modules/contrib/flag/templates/flag.html.twig" at line 17 is deprecated since Twig 2.7, use the "spaceless" filter with the "apply" tag instead.
    1x in AnonymousFlagTest::testAnonymousFlagging from Drupal\Tests\flag\Functional

  1x: Relying on entity queries to check access by default is deprecated in drupal:9.2.0 and an error will be thrown from drupal:10.0.0. Call \Drupal\Core\Entity\Query\QueryInterface::accessCheck() with TRUE or FALSE to specify whether access should be checked. See https://www.drupal.org/node/3201242
    1x in AnonymousFlagTest::testAnonymousFlagging from Drupal\Tests\flag\Functional
    
Testing Drupal\Tests\flag\Functional\FlagPermissionsTest
.                                                                   1 / 1 (100%)

Time: 00:08.143, Memory: 10.00 MB

OK (1 test, 23 assertions)

Remaining self deprecation notices (6)

  2x: Calling the Symfony\Component\EventDispatcher\EventDispatcherInterface::dispatch() method with a string event name as the first argument is deprecated in drupal:9.1.0, an Event object will be required instead in drupal:10.0.0. See https://www.drupal.org/node/3154407
    2x in FlagPermissionsTest::testPermissions from Drupal\Tests\flag\Functional

  1x: Declaring ::setUp without a void return typehint in Drupal\Tests\flag\Functional\FlagPermissionsTest 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\flag\Functional\FlagPermissionsTest::$modules property must be declared protected. See https://www.drupal.org/node/2909426
    1x in DrupalListener::startTest from Drupal\Tests\Listeners

  1x: Not marking service definitions as public is deprecated in drupal:9.2.0 and is required in drupal:10.0.0. Call $definition->setPublic(TRUE) before calling ::setDefinition(). See https://www.drupal.org/node/3194517
    1x in FlagPermissionsTest::testPermissions from Drupal\Tests\flag\Functional

  1x: The spaceless tag in "modules/contrib/flag/templates/flag.html.twig" at line 17 is deprecated since Twig 2.7, use the "spaceless" filter with the "apply" tag instead.
    1x in FlagPermissionsTest::testPermissions from Drupal\Tests\flag\Functional
    
Testing Drupal\Tests\flag\Unit\Ajax\ActionLinkFlashCommandTest
.                                                                   1 / 1 (100%)

Time: 00:00.033, Memory: 10.00 MB

OK (1 test, 1 assertion)

Remaining self deprecation notices (1)

  1x: Declaring ::setUp without a void return typehint in Drupal\Tests\flag\Unit\Ajax\ActionLinkFlashCommandTest 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
    
Testing Drupal\Tests\flag\Unit\Plugin\Action\FlagActionTest
..                                                                  2 / 2 (100%)

Time: 00:00.080, Memory: 12.00 MB

OK (2 tests, 6 assertions)

Remaining self deprecation notices (2)

  2x: Declaring ::setUp without a void return typehint in Drupal\Tests\flag\Unit\Plugin\Action\FlagActionTest is deprecated in drupal:9.0.0. Typehinting will be required before drupal:10.0.0. See https://www.drupal.org/node/3114724
    2x in DrupalListener::startTest from Drupal\Tests\Listeners

Testing Drupal\Tests\flag\Kernel\AccessTest
...                                                                 3 / 3 (100%)

Time: 00:04.814, Memory: 10.00 MB

OK (3 tests, 76 assertions)

Remaining self deprecation notices (9)

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

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

  3x: Not marking service definitions as public is deprecated in drupal:9.2.0 and is required in drupal:10.0.0. Call $definition->setPublic(TRUE) before calling ::setDefinition(). See https://www.drupal.org/node/3194517
    1x in AccessTest::testDefault from Drupal\Tests\flag\Kernel
    1x in AccessTest::testOwnersAccess from Drupal\Tests\flag\Kernel
    1x in AccessTest::testUserFlag from Drupal\Tests\flag\Kernel
    
Testing Drupal\Tests\flag\Kernel\FlagActionTest
...                                                                 3 / 3 (100%)

Time: 00:04.149, Memory: 10.00 MB

OK (3 tests, 49 assertions)

Remaining self deprecation notices (22)

  9x: Relying on entity queries to check access by default is deprecated in drupal:9.2.0 and an error will be thrown from drupal:10.0.0. Call \Drupal\Core\Entity\Query\QueryInterface::accessCheck() with TRUE or FALSE to specify whether access should be checked. See https://www.drupal.org/node/3201242
    4x in FlagActionTest::testFlagActionsCreation from Drupal\Tests\flag\Kernel
    3x in FlagActionTest::testFlaggingDeleteAction from Drupal\Tests\flag\Kernel
    2x in FlagActionTest::testFlagActions from Drupal\Tests\flag\Kernel

  4x: Calling the Symfony\Component\EventDispatcher\EventDispatcherInterface::dispatch() method with a string event name as the first argument is deprecated in drupal:9.1.0, an Event object will be required instead in drupal:10.0.0. See https://www.drupal.org/node/3154407
    2x in FlagActionTest::testFlagActions from Drupal\Tests\flag\Kernel
    2x in FlagActionTest::testFlaggingDeleteAction from Drupal\Tests\flag\Kernel

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

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

  3x: Not marking service definitions as public is deprecated in drupal:9.2.0 and is required in drupal:10.0.0. Call $definition->setPublic(TRUE) before calling ::setDefinition(). See https://www.drupal.org/node/3194517
    1x in FlagActionTest::testFlagActionsCreation from Drupal\Tests\flag\Kernel
    1x in FlagActionTest::testFlagActions from Drupal\Tests\flag\Kernel
    1x in FlagActionTest::testFlaggingDeleteAction from Drupal\Tests\flag\Kernel
    
Testing Drupal\Tests\flag\Kernel\FlagCountsTest
.....                                                               5 / 5 (100%)

Time: 00:08.985, Memory: 10.00 MB

OK (5 tests, 95 assertions)

Remaining self deprecation notices (76)

  24x: Relying on entity queries to check access by default is deprecated in drupal:9.2.0 and an error will be thrown from drupal:10.0.0. Call \Drupal\Core\Entity\Query\QueryInterface::accessCheck() with TRUE or FALSE to specify whether access should be checked. See https://www.drupal.org/node/3201242
    8x in FlagCountsTest::testFlagDeletion from Drupal\Tests\flag\Kernel
    6x in FlagCountsTest::testEntityDeletion from Drupal\Tests\flag\Kernel
    6x in FlagCountsTest::testUserDeletion from Drupal\Tests\flag\Kernel
    4x in FlagCountsTest::testFlagCounts from Drupal\Tests\flag\Kernel

  19x: Calling the Symfony\Component\EventDispatcher\EventDispatcherInterface::dispatch() method with a string event name as the first argument is deprecated in drupal:9.1.0, an Event object will be required instead in drupal:10.0.0. See https://www.drupal.org/node/3154407
    6x in FlagCountsTest::testFlagCounts from Drupal\Tests\flag\Kernel
    4x in FlagCountsTest::testEntityDeletion from Drupal\Tests\flag\Kernel
    4x in FlagCountsTest::testUserDeletion from Drupal\Tests\flag\Kernel
    3x in FlagCountsTest::testFlagDeletion from Drupal\Tests\flag\Kernel
    2x in FlagCountsTest::testAnonymousFlagCount from Drupal\Tests\flag\Kernel

  16x: AssertLegacyTrait::assertEqual() is deprecated in drupal:8.0.0 and is removed from drupal:10.0.0. Use $this->assertEquals() instead. See https://www.drupal.org/node/3129738
    5x in FlagCountsTest::testFlagCounts from Drupal\Tests\flag\Kernel
    3x in FlagCountsTest::testAnonymousFlagCount from Drupal\Tests\flag\Kernel
    3x in FlagCountsTest::testFlagDeletion from Drupal\Tests\flag\Kernel
    3x in FlagCountsTest::testEntityDeletion from Drupal\Tests\flag\Kernel
    2x in FlagCountsTest::testUserDeletion from Drupal\Tests\flag\Kernel

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

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

  5x: Not marking service definitions as public is deprecated in drupal:9.2.0 and is required in drupal:10.0.0. Call $definition->setPublic(TRUE) before calling ::setDefinition(). See https://www.drupal.org/node/3194517
    1x in FlagCountsTest::testFlagCounts from Drupal\Tests\flag\Kernel
    1x in FlagCountsTest::testAnonymousFlagCount from Drupal\Tests\flag\Kernel
    1x in FlagCountsTest::testFlagDeletion from Drupal\Tests\flag\Kernel
    1x in FlagCountsTest::testEntityDeletion from Drupal\Tests\flag\Kernel
    1x in FlagCountsTest::testUserDeletion from Drupal\Tests\flag\Kernel

  2x: AssertLegacyTrait::assert() is deprecated in drupal:8.0.0 and is removed from drupal:10.0.0. Use $this->assertTrue() instead. See https://www.drupal.org/node/3129738
    1x in FlagCountsTest::testEntityDeletion from Drupal\Tests\flag\Kernel
    1x in FlagCountsTest::testUserDeletion from Drupal\Tests\flag\Kernel

Testing Drupal\Tests\flag\Kernel\FlaggingStorageTest
.                                                                   1 / 1 (100%)

Time: 00:01.304, Memory: 10.00 MB

OK (1 test, 14 assertions)

Remaining self deprecation notices (7)

  2x: Calling the Symfony\Component\EventDispatcher\EventDispatcherInterface::dispatch() method with a string event name as the first argument is deprecated in drupal:9.1.0, an Event object will be required instead in drupal:10.0.0. See https://www.drupal.org/node/3154407
    2x in FlaggingStorageTest::testCacheReset from Drupal\Tests\flag\Kernel

  2x: Relying on entity queries to check access by default is deprecated in drupal:9.2.0 and an error will be thrown from drupal:10.0.0. Call \Drupal\Core\Entity\Query\QueryInterface::accessCheck() with TRUE or FALSE to specify whether access should be checked. See https://www.drupal.org/node/3201242
    2x in FlaggingStorageTest::testCacheReset from Drupal\Tests\flag\Kernel

  1x: Declaring ::setUp without a void return typehint in Drupal\Tests\flag\Kernel\FlaggingStorageTest 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\flag\Kernel\FlaggingStorageTest::$modules property must be declared protected. See https://www.drupal.org/node/2909426
    1x in DrupalListener::startTest from Drupal\Tests\Listeners

  1x: Not marking service definitions as public is deprecated in drupal:9.2.0 and is required in drupal:10.0.0. Call $definition->setPublic(TRUE) before calling ::setDefinition(). See https://www.drupal.org/node/3194517
    1x in FlaggingStorageTest::testCacheReset from Drupal\Tests\flag\Kernel
    
Testing Drupal\Tests\flag\Kernel\FlagServiceTest
....                                                                4 / 4 (100%)

Time: 00:05.216, Memory: 10.00 MB

OK (4 tests, 60 assertions)

Remaining self deprecation notices (35)

  11x: Relying on entity queries to check access by default is deprecated in drupal:9.2.0 and an error will be thrown from drupal:10.0.0. Call \Drupal\Core\Entity\Query\QueryInterface::accessCheck() with TRUE or FALSE to specify whether access should be checked. See https://www.drupal.org/node/3201242
    6x in FlagServiceTest::testGlobalFlaggingRetrieval from Drupal\Tests\flag\Kernel
    4x in FlagServiceTest::testFlagServiceFlagExceptions from Drupal\Tests\flag\Kernel
    1x in FlagServiceTest::testFlagServiceGetFlaggingUsers from Drupal\Tests\flag\Kernel

  9x: AssertLegacyTrait::pass() is deprecated in drupal:8.0.0 and is removed from drupal:10.0.0. PHPUnit interrupts a test as soon as a test assertion fails, so there is usually no need to call this method. If a test's logic relies on this method, refactor the test. See https://www.drupal.org/node/3129738
    9x in FlagServiceTest::testFlagServiceFlagExceptions from Drupal\Tests\flag\Kernel

  6x: Calling the Symfony\Component\EventDispatcher\EventDispatcherInterface::dispatch() method with a string event name as the first argument is deprecated in drupal:9.1.0, an Event object will be required instead in drupal:10.0.0. See https://www.drupal.org/node/3154407
    2x in FlagServiceTest::testFlagServiceFlagExceptions from Drupal\Tests\flag\Kernel
    2x in FlagServiceTest::testFlagServiceGetFlaggingUsers from Drupal\Tests\flag\Kernel
    2x in FlagServiceTest::testGlobalFlaggingRetrieval from Drupal\Tests\flag\Kernel

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

  4x: Not marking service definitions as public is deprecated in drupal:9.2.0 and is required in drupal:10.0.0. Call $definition->setPublic(TRUE) before calling ::setDefinition(). See https://www.drupal.org/node/3194517
    1x in FlagServiceTest::testFlagServiceGetFlag from Drupal\Tests\flag\Kernel
    1x in FlagServiceTest::testFlagServiceFlagExceptions from Drupal\Tests\flag\Kernel
    1x in FlagServiceTest::testFlagServiceGetFlaggingUsers from Drupal\Tests\flag\Kernel
    1x in FlagServiceTest::testGlobalFlaggingRetrieval from Drupal\Tests\flag\Kernel

  1x: AssertLegacyTrait::assertIdentical() is deprecated in drupal:8.0.0 and is removed from drupal:10.0.0. Use $this->assertSame() instead. See https://www.drupal.org/node/3129738
    1x in FlagServiceTest::testFlagServiceGetFlag from Drupal\Tests\flag\Kernel

Steps to reproduce

Run the tests.

Proposed resolution

Fix the deprecated notices.

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Fixed

Version

4.0

Component

Flag core

Created by

🇧🇷Brazil larisse Belo Horizonte - MG

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.

  • 🇧🇪Belgium Tim Lammar

    Upgrade status module, gave me error on missing accessCheck() even though it was there.
    I figured it should be relocated, and then after a new scan, the warning was gone.
    Sharing patch here.

Production build 0.71.5 2024