Please find the .patch file below.

Check performed by "drupal-check".

 4/4 [============================] 100%

 ------ ------------------------------------------------------------------------
  Line   tests\src\Kernel\SubPathautoKernelTest.php                             
 ------ ------------------------------------------------------------------------
  17     Usage of deprecated trait Drupal\simpletest\UserCreationTrait in class 
         Drupal\Tests\subpathauto\Kernel\SubPathautoKernelTest.                 
 ------ ------------------------------------------------------------------------

 ------ -------------------------------------------------------------------------
  Line   tests\src\Unit\SubPathautoTest.php                                     
 ------ -------------------------------------------------------------------------
  72     Call to deprecated method getMock() of class Drupal\Tests\UnitTestCase.
  77     Call to deprecated method getMock() of class Drupal\Tests\UnitTestCase.
  79     Call to deprecated method getMock() of class Drupal\Tests\UnitTestCase.
  81     Call to deprecated method getMock() of class Drupal\Tests\UnitTestCase.
 ------ -------------------------------------------------------------------------

                                                                                
 [ERROR] Found 5 errors

Comments

angela_G created an issue. See original summary.

angela_g’s picture

Issue summary: View changes
angela_g’s picture

angela_g’s picture

angela_g’s picture

Status: Active » Needs review
manafov_mehman’s picture

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

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs reroll

The patch doesn't apply anymore 😓

ravi.shankar’s picture

Status: Needs work » Needs review
StatusFileSize
new1.83 KB

I have re-rolled patch #4.

rpayanm’s picture

Issue tags: -Needs reroll
aliaksandr_rozum’s picture

Status: Needs review » Needs work

Hi @ravi.shankar!

There are some deperecated classes in the tests:

 36x: The \Drupal\Core\PathProcessor\PathProcessorAlias class is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Instead, use \Drupal\path_alias\PathProcessor\AliasPathProcessor. See https://drupal.org/node/3092086
    15x in SubPathautoFunctionalTest::testBasicIntegration from Drupal\Tests\subpathauto\Functional
    11x in SubPathautoFunctionalTest::testWithLanguagePrefix from Drupal\Tests\subpathauto\Functional
    10x in SubPathautoFunctionalTest::testNonExistingPath from Drupal\Tests\subpathauto\Functional

  3x: Drupal\Tests\BrowserTestBase::$defaultTheme is required in drupal:9.0.0 when using an install profile that does not set a default theme. See https://www.drupal.org/node/3083055, which includes recommendations on which theme to use.
    1x in SubPathautoFunctionalTest::testBasicIntegration from Drupal\Tests\subpathauto\Functional
    1x in SubPathautoFunctionalTest::testWithLanguagePrefix from Drupal\Tests\subpathauto\Functional
    1x in SubPathautoFunctionalTest::testNonExistingPath from Drupal\Tests\subpathauto\Functional

  3x: \Drupal\Core\Path\AliasStorage is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use the "path_alias.repository" service instead, or the entity storage handler for the "path_alias" entity type for CRUD methods. See https://www.drupal.org/node/3013865.
    1x in SubPathautoFunctionalTest::testBasicIntegration from Drupal\Tests\subpathauto\Functional
    1x in SubPathautoFunctionalTest::testWithLanguagePrefix from Drupal\Tests\subpathauto\Functional
    1x in SubPathautoFunctionalTest::testNonExistingPath from Drupal\Tests\subpathauto\Functional

And core_version_requirement key is need to be updated (https://www.drupal.org/node/3070687)

angela_g’s picture

Fixed deprecated classes in the tests.

angela_g’s picture

Fixed deprecated classes in the tests and added "core_version_requirement" to info.yml.

angela_g’s picture

angela_g’s picture

Status: Needs work » Needs review
aliaksandr_rozum’s picture

Status: Needs review » Reviewed & tested by the community

Hi @angela_G,
your patch look's good:

docker@cli:/var/www$ vendor/bin/phpunit -c web/core/ web/modules/contrib/subpathauto/
PHPUnit 7.5.20-3-gfc43f121f by Sebastian Bergmann and contributors.

Testing web/modules/contrib/subpathauto/
...........                                                       11 / 11 (100%)

Time: 3.62 minutes, Memory: 10.00 MB

OK (11 tests, 72 assertions)
docker@cli:/var/www$ drupal-check web/modules/contrib/subpathauto/
 6/6 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

 [OK] No errors
dave reid’s picture

StatusFileSize
new3.74 KB
new8.15 KB

Fixing some coding standards.

dave reid’s picture

  • Dave Reid committed 13b5d70 on 8.x-1.x
    Issue #3087355 by angela_G, Dave Reid, ravi.shankar, aliaksandr_rozum:...
dave reid’s picture

Status: Reviewed & tested by the community » Fixed

Committed #16 to 8.x-1.x. Thanks everyone!

  • Dave Reid committed 4ebdd29 on 8.x-1.x
    Issue #3087355 by Dave Reid: Replaced path.alias_whitelist with...
dave reid’s picture

I managed to run the automated tests against D9 and found we were still using the deprecated service path.alias_whitelist. I have replaced them with using path_alias.whitelist in the latest 8.x-1.x.

dave reid’s picture

Status: Fixed » Needs review
StatusFileSize
new13.24 KB

More fixes for Drupal 9 testing, and fixing variables that don't make sense.

  • Dave Reid committed e20527d on 8.x-1.x
    Issue #3087355 by Dave Reid: Fixing tests on Drupal 9.
    
dave reid’s picture

Status: Needs review » Fixed

Committed #22 to 8.x-1.x. Now tests are fully passing on Drupal 9, hooray!

dave reid’s picture

Status: Fixed » Closed (fixed)

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