Drupal 9 deprecated code report

20/20 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

 ------ ----------------------------------------------------------------------
  Line   src/EventSubscriber/ConfigSubscriber.php
 ------ ----------------------------------------------------------------------
  172    Call to deprecated function drupal_set_message():
         in drupal:8.5.0 and is removed from drupal:9.0.0.
         Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
 ------ ----------------------------------------------------------------------

 ------ ----------------------------------------------------------------------
  Line   src/Form/FieldEncryptUpdateForm.php
 ------ ----------------------------------------------------------------------
  171    Call to deprecated function drupal_set_message():
         in drupal:8.5.0 and is removed from drupal:9.0.0.
         Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
  176    Call to deprecated function drupal_set_message():
         in drupal:8.5.0 and is removed from drupal:9.0.0.
         Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
 ------ ----------------------------------------------------------------------

 ------ -------------------------------------------------------------------------
  Line   tests/src/Unit/FieldEncryptProcessEntitiesTest.php
 ------ -------------------------------------------------------------------------
  162    Call to deprecated method getMock() of class Drupal\Tests\UnitTestCase:
         in drupal:8.5.0 and is removed from drupal:9.0.0.
         Use \Drupal\Tests\PhpunitCompatibilityTrait::createMock() instead.
 ------ -------------------------------------------------------------------------                                                                                             

 [ERROR] Found 4 errors                                                                                                
  

Comments

drupalfox created an issue. See original summary.

kir lazur’s picture

Assigned: Unassigned » kir lazur
kir lazur’s picture

Status: Active » Needs review
StatusFileSize
new12.47 KB

All mandatory fixes of deprecations in source code are done and tested.
I guess that test cases deprecations will require more attention and test actualization, probably me or someone can check them later.

kir lazur’s picture

StatusFileSize
new13.83 KB

Updated version of patch.

Status: Needs review » Needs work

The last submitted patch, 4: 3111904-4.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

jcnventura’s picture

Issue tags: -

Also missing the core_version_requirements line in the module's .info.yml file.

drupalviking’s picture

Assigned: kir lazur » drupalviking

Reviewing and fixing the last problems with failed tests.

drupalviking’s picture

Assigned: drupalviking » Unassigned
Status: Needs work » Needs review
StatusFileSize
new2.38 KB
new16.21 KB

Fixed the last errors regarding deprecated function calls in the Test classes. Added dependency to Drupal 8.8 or higher.

jcnventura’s picture

Status: Needs review » Needs work

The last submitted patch, 8: 3111904-8.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

jeroent’s picture

Status: Needs work » Postponed

We should probably postpone this on #3124830: Fix project on Drupal ^8.7 and fix failing tests on 8.x-2.x. Since the tests are currently failing which makes it hard to check the compatibilty and some of the deprecations are already fixed in that issue.

suzymasri’s picture

Patch #8 fixes all drupal-check errors.

#3142988: D9 readiness Should fix the failing D9 test, and the changes in #3124830: Fix project on Drupal ^8.7 and fix failing tests on 8.x-2.x will fix all other failing tests when released.

suzymasri’s picture

Issue tags: +Needs reroll
alexpott’s picture

Status: Postponed » Needs review
Issue tags: -Needs reroll
StatusFileSize
new22.69 KB
alexpott’s picture

+++ b/composer.json
@@ -3,7 +3,7 @@
-        "drupal/core": "^8",
+        "drupal/core": "^8.7.7 || ^9",

This is the same the key module which is a dependency so seems fine.

alexpott’s picture

StatusFileSize
new1.29 KB
new21.62 KB
alexpott’s picture

We can't run tests on D9 until this is committed because DrupalCI does things interesting ways around. tests pass on D9 locally.

vijaycs85’s picture

Issue summary: View changes
StatusFileSize
new47.08 KB

I guess some of the deprecated issues fixed. we got 4 issues(updated in issue summary) in the current head and all of them fixed by the latest patch.
Only local images are allowed.

vijaycs85’s picture

Status: Needs review » Reviewed & tested by the community
alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Thanks @vijaycs85

  • alexpott committed 4a50d90 on 8.x-2.x authored by Kiril Lazur
    Issue #3111904 by alexpott, Kiril Lazur, drupalviking, vijaycs85,...

Status: Fixed » Closed (fixed)

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