Problem/Motivation

Runnig drupal-check command reports:

drupal-check realname
 10/10 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

 ------ ------------------------------------------------------------------------------------------------------- 
  Line   src/Tests/RealnameBasicTest.php                                                                        
 ------ ------------------------------------------------------------------------------------------------------- 
  13     Class Drupal\realname\Tests\RealnameBasicTest extends deprecated class Drupal\simpletest\WebTestBase:  
         in drupal:8.8.0 and is removed from drupal:9.0.0. Instead,                                             
         use \Drupal\Tests\BrowserTestBase. See https://www.drupal.org/node/3030340.                            
  27     Call to method setUp() of deprecated class Drupal\simpletest\WebTestBase:                              
         in drupal:8.8.0 and is removed from drupal:9.0.0. Instead,                                             
         use \Drupal\Tests\BrowserTestBase. See https://www.drupal.org/node/3030340.                            
 ------ ------------------------------------------------------------------------------------------------------- 
                                                                                                                        
 [ERROR] Found 2 errors

Thank's

Issue fork realname-3101961

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

gmangones created an issue. See original summary.

Gnanagowthaman sankar’s picture

Hi @gmangones,

Here by i attached the patch. Please review and let me know for changes.

Thanks & Regards,
Gnanagowthaman sankar

Gnanagowthaman sankar’s picture

Status: Needs work » Needs review
FileSize
550 bytes

Patch

Thanks & Regards,
Gnanagowthaman sankar

Manuel Garcia’s picture

MrPaulDriver’s picture

In addition to this issue, there are two othes tagged with Drupal 9 compatibility

Probably best if comments and contributions are focused here.

The project page says "Real Name 8.x-1.0-rc2+ supports Drupal 9. Enjoy."

However, when testing with Upgrade Status module, a number of problems are reported. Do these need further attention?

CONTRIBUTED PROJECTS
--------------------------------------------------------------------------------
Real name 8.x-1.0-rc2
Scanned on Tue, 05/19/2020 - 11:35.

5 errors found. 1 warning found. Avoid some manual work by using drupal-rector
for fixing issues automatically or Upgrade Rector to generate patches.

Real Name 8.x-1.0-rc2+ supports Drupal 9. Enjoy.

web/modules/contrib/realname/realname.module:
┌─────────┬──────┬──────────────────────────────────────────────────────────────┐
│ STATUS  │ LINE │                           MESSAGE                            │
├─────────┼──────┼──────────────────────────────────────────────────────────────┤
│ Fix now │ 65   │ Call to deprecated method strlen() of class                  │
│         │      │ Drupal\Component\Utility\Unicode. Deprecated in drupal:8.6.0 │
│         │      │ and is removed from drupal:9.0.0. Use mb_strlen() instead.   │
│         │      │                                                              │
│ Fix now │ 250  │ Call to deprecated method getStorage() of class              │
│         │      │ Drupal\Core\Entity\EntityManager. Deprecated in drupal:8.0.0 │
│         │      │ and is removed from drupal:9.0.0. Use                        │
│         │      │ Drupal\Core\Entity\EntityTypeManagerInterface::getStorage()  │
│         │      │ instead.                                                     │
│         │      │                                                              │
└─────────┴──────┴──────────────────────────────────────────────────────────────┘

web/modules/contrib/realname/src/Controller/RealnameAutocompleteController.php:
┌──────────┬──────┬──────────────────────────────────────────────────────────────┐
│  STATUS  │ LINE │                           MESSAGE                            │
├──────────┼──────┼──────────────────────────────────────────────────────────────┤
│ Fix with │ 32   │ Call to deprecated method strtolower() of class              │
│ rector   │      │ Drupal\Component\Utility\Unicode. Deprecated in drupal:8.6.0 │
│          │      │ and is removed from drupal:9.0.0. Use mb_strtolower()        │
│          │      │ instead.                                                     │
│          │      │                                                              │
└──────────┴──────┴──────────────────────────────────────────────────────────────┘

web/modules/contrib/realname/src/Tests/RealnameBasicTest.php:
┌─────────┬──────┬────────────────────────────────────────────────────────────┐
│ STATUS  │ LINE │                          MESSAGE                           │
├─────────┼──────┼────────────────────────────────────────────────────────────┤
│ Fix now │ 13   │ Class Drupal\realname\Tests\RealnameBasicTest extends      │
│         │      │ deprecated class Drupal\simpletest\WebTestBase. Deprecated │
│         │      │ in drupal:8.8.0 and is removed from drupal:9.0.0. Instead, │
│         │      │ use Drupal\Tests\BrowserTestBase. See                      │
│         │      │ https://www.drupal.org/node/3030340. Replacement available │
│         │      │ from drupal:8.6.0.                                         │
│         │      │                                                            │
│ Fix now │ 27   │ Call to method setUp() of deprecated class                 │
│         │      │ Drupal\simpletest\WebTestBase. Deprecated in drupal:8.8.0  │
│         │      │ and is removed from drupal:9.0.0. Instead, use             │
│         │      │ Drupal\Tests\BrowserTestBase. See                          │
│         │      │ https://www.drupal.org/node/3030340. Replacement available │
│         │      │ from drupal:8.6.0.                                         │
│         │      │                                                            │
└─────────┴──────┴────────────────────────────────────────────────────────────┘

web/modules/contrib/realname/realname.info.yml:
┌──────────┬──────┬──────────────────────────────────────────────────────────────┐
│  STATUS  │ LINE │                           MESSAGE                            │
├──────────┼──────┼──────────────────────────────────────────────────────────────┤
│ Check    │ 0    │ Add <code>core_version_requirement: ^8 || ^9

to │
│ manually │ │ realname.info.yml to designate that the module is compatible │
│ │ │ with Drupal 9. See https://drupal.org/node/3070687. │
│ │ │ │
└──────────┴──────┴──────────────────────────────────────────────────────────────┘

zvonimirr’s picture

MrPaulDriver’s picture

Confirm this passes tests by Upgrade Status module when used with the additional patch mentioned in #6

MrPaulDriver’s picture

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

It still has errors and deprecated codes and I fixed it on the next patch:

Real name
Scanned on Tue, 06/30/2020 - 22:17.

2 errors found.

web/modules/contrib/realname/src/Tests/RealnameBasicTest.php:
┌─────────┬──────┬────────────────────────────────────────────────────────────┐
│ STATUS  │ LINE │                          MESSAGE                           │
├─────────┼──────┼────────────────────────────────────────────────────────────┤
│ Fix now │ 13   │ Class Drupal\realname\Tests\RealnameBasicTest extends      │
│         │      │ deprecated class Drupal\simpletest\WebTestBase. Deprecated │
│         │      │ in drupal:8.8.0 and is removed from drupal:9.0.0. Instead, │
│         │      │ use Drupal\Tests\BrowserTestBase. See                      │
│         │      │ https://www.drupal.org/node/3030340. Replacement available │
│         │      │ from drupal:8.6.0.                                         │
│         │      │                                                            │
│ Fix now │ 27   │ Call to method setUp() of deprecated class                 │
│         │      │ Drupal\simpletest\WebTestBase. Deprecated in drupal:8.8.0  │
│         │      │ and is removed from drupal:9.0.0. Instead, use             │
│         │      │ Drupal\Tests\BrowserTestBase. See                          │
│         │      │ https://www.drupal.org/node/3030340. Replacement available │
│         │      │ from drupal:8.6.0.                                         │
│         │      │                                                            │
└─────────┴──────┴────────────────────────────────────────────────────────────┘
heddn’s picture

Can someone manually run the tests on a D9 site? That would give me some greater assurance the module is functional in D9.

heddn’s picture

Status: Needs review » Needs work

If we update the composer.json to include drupal/core ^8.0 || ^9.0, then the testbot will let us run tests on D9. This is a recent change as of yesterday.

Eduardo Morales Alberti’s picture

Patch #9 applied using composer, review using module upgrade status, add a new test to the patch for test on drupal 9.

heddn’s picture

Status: Needs work » Reviewed & tested by the community

I've manually tested the patch. This is good to go now.

Sutharsan’s picture

Please create a new release that includes this patch. Much appreciated.

rp7’s picture

I've tested the patch. Looks good. Can we get this in?

Christopher Riley’s picture

Any idea when this will actually be committed?

seanB’s picture

When trying to update to D9 with the patch version I get the following error:

 Root composer.json requires drupal/core-recommended 9.1.0 -> satisfiable by drupal/core-recommended[9.1.0].
 drupal/realname 1.0.0-rc2 requires drupal/core ~8.0 -> satisfiable by drupal/core[8.0.0-beta6, ..., 8.9.x-dev].

I suspect it is because of the composer.json in the module. Do we really need the composer.json file?

jplana’s picture

Documentation states "Real Name 8.x-1.0-rc2+ supports Drupal 9" but the reality is that it currently doesn't.

drupal/realname 1.0.0-rc2 requires drupal/core ~8.0 -> found drupal/core[8.0.0-beta6, ..., 8.9.x-dev] but the package is fixed to 9.1.0 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.

Looking forward for this patch to be committed upstream 🤞

Bohus Ulrych’s picture

+1

MegaChriz’s picture

I think this module needs a new co-maintainer, because one of the current maintainers said that they are not actively monitoring issues: #3095041: Is Real Name still being maintained?.

The person who has been the most active maintainer for this module in recent years - hass - has been blocked.

Sutharsan’s picture

Looking at the state of the issue queue and the activity of the maintainers I agree with @MegaChriz, good suggestion. Do you want to maintain this module MegaChriz? Lets start https://www.drupal.org/docs/develop/managing-a-drupalorg-theme-module-or...

MegaChriz’s picture

Do you want to maintain this module MegaChriz?

Not right now. I'm focussing on getting other modules ready for Drupal 9 first. After that, I'm happy to help to get a D9 compatible release out - and make sure that tests are passing on Drupal 9. In the long run, I'm not planning to actively maintain this module because I already have my hands full on other modules.

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

ChaseOnTheWeb’s picture

Made a issue fork using the patch from #6. No further changes have been made.

I did not include the changes from #9 as they're already addressed in #3115617: Convert RealnameBasicTest to PHPUnit

This will help admins who want to use the Composer strategy from How to Fix the Catch-22 Problem of Drupal 9 Fixes in Composer. In brief:

  1. In the site's composer.json file, in the "repositories" section add a new item with two values:
           {
               "type": "git",
               "url": "https://git.drupalcode.org/issue/realname-3101961.git"
           }
  2. Look for the item in the "repositories" section that has "type" set to "composer". If it doesn't exist already, add an item called "exclude" and make it a list. Add the Composer name of the module, so that it looks like this:
           {
               "type": "composer",
               "url": "https://packages.drupal.org/8",
               "exclude": ["drupal/realname"]
           },
  3. Change the listing for the project in the "require" (or "require-dev") section to point to the branch name identified above, e.g. "drupal/realname": "dev-3101961-drupal-9-compatibility",
  4. Save the changes to the file.
  5. Update the project in composer, e.g. composer update drupal/realname

edit: fixed #25

Kristen Pol’s picture

Thanks for the steps but one typo:

dev-3150733-drupal-9-compatibility

should be:

dev-3101961-drupal-9-compatibility

philltran’s picture

Great work everyone. I can't wait to see this committed to the module.

rp7’s picture

What are the remaining steps to get this in? Are we missing a maintainer? If so I'm willing to step up.

Sutharsan’s picture

@rp7 I appreciate your offer. none of the past maintainers appear to be active, I suggest to contact them directly to see if they can provide you permissions. Either that or follow the abandoned module procedure.

rp7’s picture

I just noticed #3201029: Offering to co-maintain Real Name. Apparently other people willing to step up as well. I contacted NancyDru directly to have a look at that ticket & make someone maintainer. Hopefully it gets noticed.

philltran’s picture

I was just added as co-maintainer. I will work to get a D9 version committed this weekend.

philltran’s picture

Assigned: edycarreyes99 » Unassigned

Thanks for everyone's work on getting this D9 ready.

I will approve the merge request for patch 6 that was made into an issue fork by @chaseontheweb.

I will address in the update to the phpunit test in Issue #3031066

  • philltran committed dc7fbd5 on 8.x-1.x
    Issue #3101961 by ChaseOnTheWeb, edycarreyes99, Gnanagowthaman sankar,...
philltran’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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

P44T’s picture

Hi Phil, thank you for your effort in making this module D9 compatible!

I'm just wondering, is there any chance that this module will see a release anytime soon? I noticed there's a dev version, but of course that's only usable for development scenario's as this particular version can be updated anytime. It would be very useful if there would be a at least one alpha/beta/rc release that's D9 compatible in the mean time.

philltran’s picture

@P44T Sorry for the delay. I will try my best to get a beta release up this week.

MegaChriz’s picture

While a new release would be great, I see that the latest commit introduced syntax errors:
https://www.drupal.org/pift-ci-job/2049005
Better to fix these first before creating a new release.

philltran’s picture

@megaChriz Thanks for your attention to detail.

I plan on running coding standards listing and switching to somatic versioning for a D9 beta release.