Updated drupal-check report from commit hash d50e6430f3259afa9d79123825e6e4b7a5cf39a8 (tag 8.x-1.0-alpha1):

 ------ -------------------------------------------------------------------------------
  Line   pathologic.module
 ------ -------------------------------------------------------------------------------
  187    Call to deprecated function file_default_scheme():
         in drupal:8.8.0 and will be removed from drupal:9.0.0. Use
         \Drupal::config('system.file')->get('default_scheme') instead.
  222    Call to deprecated method strlen() of class Drupal\Component\Utility\Unicode:
         in Drupal 8.6.0, will be removed before Drupal 9.0.0. Use
         mb_strlen() instead.
  222    Call to deprecated method substr() of class Drupal\Component\Utility\Unicode:
         in Drupal 8.6.0, will be removed before Drupal 9.0.0. Use
         mb_substr() instead.
 ------ -------------------------------------------------------------------------------

 ------ ------------------------------------------------------------------------------------------------------
  Line   src/Tests/PathologicTest.php
 ------ ------------------------------------------------------------------------------------------------------
  16     Class Drupal\pathologic\Tests\PathologicTest extends deprecated class Drupal\simpletest\WebTestBase:
         in Drupal 8.8.0 and will be removed before Drupal 9.0.0. Instead,
         use \Drupal\Tests\BrowserTestBase. See https://www.drupal.org/node/3030340.
  186    Call to deprecated function file_default_scheme():
         in drupal:8.8.0 and will be removed from drupal:9.0.0. Use
         \Drupal::config('system.file')->get('default_scheme') instead.
  279    Call to deprecated method checkPlain() of class Drupal\Component\Utility\SafeMarkup:
         Will be removed before Drupal 9.0.0. Rely on Twig's
         auto-escaping feature, or use the @link theme_render #plain_text @endlink
         key when constructing a render array that contains plain text in order to
         use the renderer's auto-escaping feature. If neither of these are
         possible, \Drupal\Component\Utility\Html::escape() can be used in places
         where explicit escaping is needed.
  279    Call to method checkPlain() of deprecated class Drupal\Component\Utility\SafeMarkup:
         Will be removed before Drupal 9.0.0. Use the appropriate
  283    Call to deprecated method checkPlain() of class Drupal\Component\Utility\SafeMarkup:
         Will be removed before Drupal 9.0.0. Rely on Twig's
         auto-escaping feature, or use the @link theme_render #plain_text @endlink
         key when constructing a render array that contains plain text in order to
         use the renderer's auto-escaping feature. If neither of these are
         possible, \Drupal\Component\Utility\Html::escape() can be used in places
         where explicit escaping is needed.
  283    Call to method checkPlain() of deprecated class Drupal\Component\Utility\SafeMarkup:
         Will be removed before Drupal 9.0.0. Use the appropriate
  297    Call to deprecated function entity_create():
         in Drupal 8.0.x, will be removed before Drupal 9.0.0. Use
         The method overriding Entity::create() for the entity type, e.g.
         \Drupal\node\Entity\Node::create() if the entity type is known. If the
         entity type is variable, use the entity storage's create() method to
         construct a new entity:
 ------ ------------------------------------------------------------------------------------------------------

 ------ --------------------------------------------------------------------------------------------------------
  Line   src/Tests/PathologicUITest.php
 ------ --------------------------------------------------------------------------------------------------------
  12     Class Drupal\pathologic\Tests\PathologicUITest extends deprecated class Drupal\simpletest\WebTestBase:
         in Drupal 8.8.0 and will be removed before Drupal 9.0.0. Instead,
         use \Drupal\Tests\BrowserTestBase. See https://www.drupal.org/node/3030340.
  20     Call to method setUp() of deprecated class Drupal\simpletest\WebTestBase:
         in Drupal 8.8.0 and will be removed before Drupal 9.0.0. Instead,
         use \Drupal\Tests\BrowserTestBase. See https://www.drupal.org/node/3030340.
 ------ --------------------------------------------------------------------------------------------------------


 [ERROR] Found 12 errors

Comments

Mohammad Fayoumi created an issue. See original summary.

a.dreichan’s picture

Hello, Mohammad Fayoumi!
Please review the attached patch.

a.dreichan’s picture

Status: Active » Needs review
StatusFileSize
new723 bytes

Hello, Mohammad Fayoumi!
Please review the attached patch.

a.dreichan’s picture

Sorry, its my mistake.
Please review patch #4.

holist’s picture

Issue summary: View changes

Ran drupal-check over again, found more deprecations.

holist’s picture

Status: Needs review » Needs work
dinesh18’s picture

Status: Needs work » Needs review
StatusFileSize
new3.91 KB
new3.91 KB

Here is the updated patch and interdiff. Kindly review

holist’s picture

Status: Needs review » Reviewed & tested by the community

Fixes look good, ran tests locally as testbot seems to have issues running them, got pass on both Drupal\pathologic\Tests\PathologicTest and Drupal\pathologic\Tests\PathologicUITest.

holist’s picture

Status: Reviewed & tested by the community » Needs work

Oh, .info.yml still needs the version definitions.

dinesh18’s picture

@holist can you please guide, what exactly we need to do to make the patch green ?

holist’s picture

@Dinesh18 Please add core_version_requirement: ^8 || ^9 to pathologic.info.yml.

dinesh18’s picture

Status: Needs work » Needs review
StatusFileSize
new262 bytes
new4.16 KB

Here is the updated patch and interdiff.txt as per #11

holist’s picture

Status: Needs review » Reviewed & tested by the community

Great work @Dinesh18, it's all green with Upgrade Status module too.

holist’s picture

But we should remember that with the latest deprecations fixed, the patch will require core 8.8.

daniel korte’s picture

Status: Reviewed & tested by the community » Needs review
StatusFileSize
new4.68 KB
new640 bytes

@holist Updated the core_version_requirement to require core 8.8 or above

Also, the pathologic_test needs the same core_version_requirement key or else it causes an error in Drupal 9

daniel korte’s picture

The 'core_version_requirement' constraint (^8.8 || ^9) requires the 'core' key not be set.

tjtj’s picture

depreacted_code-3070355-16.patch did not work for me:
patch -p1 < depreacted_code-3070355-16.patch
patching file pathologic.info.yml
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file pathologic.info.yml.rej
patching file pathologic.module
patching file pathologic_test/pathologic_test.info.yml
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file pathologic_test/pathologic_test.info.yml.rej

tjtj’s picture

depreacted_code-3070355-16.patch did not work for me:
patch -p1 < depreacted_code-3070355-16.patch
patching file pathologic.info.yml
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file pathologic.info.yml.rej
patching file pathologic.module
patching file pathologic_test/pathologic_test.info.yml
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file pathologic_test/pathologic_test.info.yml.rej

hctom’s picture

I had to require the latest development release to get the patch applied, but with "drupal/pathologic": ">1.0-alpha1" this works like a charm and all deprecation errors/warnings are gone

holist’s picture

Status: Needs review » Reviewed & tested by the community

Checks ok with both drupal-check and Upgrade Status module.

tjtj’s picture

I have drupal/pathologic": ">1.0-alpha1 in my composer.json for D9.0.1, but still get prevented from installing it. Has the patch been applied?
drupal/pathologic 1.x-dev requires drupal/core ^8 -> satisfiable by drupal/core[8.0.x-dev, 8.1.x-dev, 8.2.x-dev, 8.3.x-dev, 8.4.x-dev, 8.5.x-dev, 8.7.x-dev, 8.8.x-dev, 8.9.x-dev].

Please out the patch into the distribution version and mark it 9.0 compatible.

dww’s picture

Status: Reviewed & tested by the community » Needs work

Thanks for working on this!

A few problems:

1) Drupal 8.7.x core is no longer officially supported, but I see nothing in here that actually requires 8.8.x and up. I think this would be fine with:

core: 8.x
core_version_requirement: ^8 || ^9

2) Trying to run the pathologic tests on a 9.0.x test site fails thusly:

1) Drupal\pathologic\Tests\PathologicTest::testPathologic
Exception: Drupal\Tests\BrowserTestBase::$defaultTheme is required. See https://www.drupal.org/node/3083055, which includes recommendations on which theme to use.
...
2) Drupal\pathologic\Tests\PathologicUITest::testPathologicUi
Exception: Drupal\Tests\BrowserTestBase::$defaultTheme is required. See https://www.drupal.org/node/3083055, which includes recommendations on which theme to use.

3) It's great this patch is converting the tests from SimpleTest to the modern BrowserTestBase (aka "Functional"). However, we should move the files around, too:

tests/modules/pathologic_test/pathologic_test.module
tests/modules/pathologic_test/pathologic_test.info.yml
tests/src/Functional/PathologicTest.php
tests/src/Functional/PathologicUITest.php
dww’s picture

Status: Needs work » Needs review
StatusFileSize
new5.78 KB
new1.84 KB

Like so...

Status: Needs review » Needs work

The last submitted patch, 23: 3070355-23.pathologic-d9.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

dww’s picture

Status: Needs work » Needs review
StatusFileSize
new5.93 KB
new992 bytes

Whoops. ;) I always run locally with phpunit. I forget to use run-tests.sh. Doing so reveals namespace bugs in #23. Let's try this.

  • dww committed d6df2f0 on 8.x-1.x
    Issue #3070355 by Daniel Korte, Dinesh18, dww, a.dreichan: Remove...
dww’s picture

Status: Needs review » Fixed

@holist: Sorry, didn't check the box before I pushed the commit, but you've contributed a lot, so giving you credit here.

@all: Thanks again!

Cheers,
-Derek

dww’s picture

StatusFileSize
new407 bytes

Hopefully the d.o testbot will work now that the .info.yml change that declares compatibility is in Git. Let's see if this works.

dww’s picture

Sweet, glad that passed. ;) Sorry for the noise. I'm going to tag alpha2 now that we've got something D9 compatible.

dww’s picture

damienmckenna’s picture

Thanks Derek!

Status: Fixed » Closed (fixed)

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