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

CommentFileSizeAuthor
#14 3272521-14.patch728 bytestim@lammar.be

Issue fork flag-3272521

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:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

larisse created an issue. See original summary.

Guilherme Rabelo’s picture

Assigned: Unassigned » Guilherme Rabelo
Status: Active » Needs work

Hi, i will work on this.

Guilherme Rabelo’s picture

Assigned: Guilherme Rabelo » Unassigned
Status: Needs work » Needs review

I solved some problems in the Deprecated notices on Tests. I couldn't solve all the issues, the ones below were missing:

Remaining self deprecation notices (78)

  66x: 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 FlagServiceTest::testGlobalFlaggingRetrieval from Drupal\Tests\flag\Kernel
    6x in FlagCountsTest::testUserDeletion from Drupal\Tests\flag\Kernel
    6x in FlagCountsTest::testEntityDeletion from Drupal\Tests\flag\Kernel
    6x in LinkTypeFieldEntryTest::testCreateFieldEntryFlag from Drupal\Tests\flag\Functional
    4x in AdminUITest::testFlagAdmin from Drupal\Tests\flag\Functional
    4x in FlagServiceTest::testFlagServiceFlagExceptions from Drupal\Tests\flag\Kernel
    4x in ShowOnEntityFormTest::testEntityForm from Drupal\Tests\flag\Functional
    4x in FlagActionTest::testFlagActionsCreation from Drupal\Tests\flag\Kernel
    4x in FlagCountsTest::testFlagCounts from Drupal\Tests\flag\Kernel
    3x in FlagActionTest::testFlaggingDeleteAction from Drupal\Tests\flag\Kernel
    2x in FlagActionTest::testFlagActions from Drupal\Tests\flag\Kernel
    2x in FlaggingStorageTest::testCacheReset from Drupal\Tests\flag\Kernel
    1x in AjaxLinkNoJsTest::testNoJsMessage from Drupal\Tests\flag\Functional
    1x in LinkTypeReloadTest::testFlagReloadLink from Drupal\Tests\flag\Functional
    1x in LinkTypeConfirmFormTest::testCreateConfirmFlag from Drupal\Tests\flag\Functional
    1x in LinkTypeAjaxTest::testNoJavascriptResponse from Drupal\Tests\flag\Functional
    1x in LinkHtmlTest::testHtmlLink from Drupal\Tests\flag\Functional
    1x in FlagServiceTest::testFlagServiceGetFlaggingUsers from Drupal\Tests\flag\Kernel
    1x in AnonymousFlagTest::testAnonymousFlagging from Drupal\Tests\flag\Functional

  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

  1x: Calling Drupal\Tests\WebAssert::responseContains with more than one argument is deprecated in drupal:9.1.0 and will throw an \InvalidArgumentException in drupal:10.0.0. See https://www.drupal.org/node/3162537
    1x in LinkTypeFieldEntryTest::testCreateFieldEntryFlag from Drupal\Tests\flag\Functional

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

  1x: Calling AssertLegacyTrait::assertUrl() with more than one argument is deprecated in drupal:8.2.0 and the method is removed from drupal:10.0.0. Use $this->assertSession()->addressEquals() instead. See https://www.drupal.org/node/3129738
    1x in LinkTypeFieldEntryTest::testCreateFieldEntryFlag from Drupal\Tests\flag\Functional

Kindly review.

tmaiochi’s picture

Assigned: Unassigned » tmaiochi

I'll review this!

tmaiochi’s picture

Assigned: tmaiochi » Unassigned

I removed some more deprecated functions. Kindly review it!

TR’s picture

Status: Needs review » Needs work

There are a lot of open issues that cover some of these things. For example #3265236: 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. and #3248173: [9.1] Symfony 4.4 event dispatcher parameter order change. If you want those things fixed, help out in the existing issues first. After that you can open new issues for the things that still need to be addressed.

The big problem right now is that this module isn't being actively maintained, so things are taking a long time to fix. Opening duplicate issues is not helping that problem.

I think trying to address ALL deprecations in one huge issue is the wrong thing to do. Each should have its own issue, that way they can be discussed and committed without interfering with each other. While most of the changes here are OK, some need work, which means this entire issue needs work even though some changes are ready to commit. Breaking the issue up would make it easier to get this finished.

This module is still declared to support Drupal 8.8, but some of the changes in the MR *require* Drupal 9.1 or 9.2. If these changes are going to be made, the module dependencies need to be updated as well.

Here are some more problems:

t() shouldn't be used in tests.

assertEqual() and assertEquals() have a different order of arguments.

There are many places where you should just be blindly replacing the old assertion with the new, but rather should use a more appropriate assertion instead. For example:
assertEqual(count() ...) should be replaced with assertCount()
Similarly, assert(empty() ...) should be replaced with assertEmpty() etc.

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

Berdir’s picture

Title: Deprecated notices on Tests » Drupal 10 compatibility
Status: Needs work » Needs review

Rebased, added explicit D10 compatibility and fixed a bunch of other things, mostly the twig extension. All tests pass on D10. Also updated the assert order and used assertCount() and assertEmpty() when appropriate.

Berdir’s picture

Status: Needs review » Fixed

Merged.

Status: Fixed » Closed (fixed)

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

claudiu.cristea’s picture

Could you, please, create a new beta release to include this change? Thank you

tim@lammar.be’s picture

FileSize
728 bytes

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.