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
Comment #2
a.dreichanHello, Mohammad Fayoumi!
Please review the attached patch.
Comment #3
a.dreichanHello, Mohammad Fayoumi!
Please review the attached patch.
Comment #4
a.dreichanSorry, its my mistake.
Please review patch #4.
Comment #5
holist commentedRan drupal-check over again, found more deprecations.
Comment #6
holist commentedComment #7
dinesh18 commentedHere is the updated patch and interdiff. Kindly review
Comment #8
holist commentedFixes look good, ran tests locally as testbot seems to have issues running them, got pass on both
Drupal\pathologic\Tests\PathologicTestandDrupal\pathologic\Tests\PathologicUITest.Comment #9
holist commentedOh, .info.yml still needs the version definitions.
Comment #10
dinesh18 commented@holist can you please guide, what exactly we need to do to make the patch green ?
Comment #11
holist commented@Dinesh18 Please add
core_version_requirement: ^8 || ^9to pathologic.info.yml.Comment #12
dinesh18 commentedHere is the updated patch and interdiff.txt as per #11
Comment #13
holist commentedGreat work @Dinesh18, it's all green with Upgrade Status module too.
Comment #14
holist commentedBut we should remember that with the latest deprecations fixed, the patch will require core 8.8.
Comment #15
daniel korte@holist Updated the
core_version_requirementto require core 8.8 or aboveAlso, the pathologic_test needs the same
core_version_requirementkey or else it causes an error in Drupal 9Comment #16
daniel korteThe 'core_version_requirement' constraint (^8.8 || ^9) requires the 'core' key not be set.
Comment #17
tjtj commenteddepreacted_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
Comment #18
tjtj commenteddepreacted_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
Comment #19
hctomI 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 goneComment #20
holist commentedChecks ok with both drupal-check and Upgrade Status module.
Comment #21
tjtj commentedI 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.
Comment #22
dwwThanks 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:
2) Trying to run the pathologic tests on a 9.0.x test site fails thusly:
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:
Comment #23
dwwLike so...
Comment #25
dwwWhoops. ;) I always run locally with phpunit. I forget to use run-tests.sh. Doing so reveals namespace bugs in #23. Let's try this.
Comment #27
dww@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
Comment #28
dwwHopefully the d.o testbot will work now that the .info.yml change that declares compatibility is in Git. Let's see if this works.
Comment #29
dwwSweet, glad that passed. ;) Sorry for the noise. I'm going to tag alpha2 now that we've got something D9 compatible.
Comment #30
dwwhttps://www.drupal.org/project/pathologic/releases/8.x-1.0-alpha2
Enjoy!
-Derek
Comment #31
damienmckennaThanks Derek!