Closed (fixed)
Project:
HTML Mail
Version:
8.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
5 Aug 2020 at 13:51 UTC
Updated:
8 Sep 2020 at 22:34 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
salvisThank you for the report and patch, umpire274!
Comment #3
salvisThe patch contains tabs and other non-standard white space and indenting.
Also, it doesn't follow the advice given in https://api.drupal.org/api/drupal/core%21includes%21file.inc/function/fi...
Comment #4
tr commentedThere are a lot more things that need to be fixed to make this module compatible with D9.
For example, the Simpletest needs to be ported to PHPUnit, as Simpletest is no longer supported in D9. See #2990651: Move tests from Simpletest/WebTestBase to PHPUnit/BrowserTestBase
If this is to be done, it would be best IMO to make a meta issue and address each problem individually BEFORE changing the core_version_requirement. It is best to keep the core dependency completely accurate so that people don't try to install this on D9.
Comment #5
tr commented@salvis: I don't know exactly what you meant in #3 when you said "it doesn't follow the advice given in..."
Aside from the patch format and the coding standards, what there something you thought was wrong about using scanDirectory() here?
Comment #6
tr commentedHere's a re-roll of #1 with only the file_scan_directory() change.
Comment #7
salvisThe documentation says to
Comment #8
tr commentedUnfortunately most deprecation messages are pretty vague and lacking specifics about exactly how to replace the deprecated code. These messages contain a lot of assumptions.
In this case, we can't call
FileSystemInterface::scanDirectory()directly -FileSystemInterfaceis an interface. So we need find and use an object that implementsFileSystemInterfacein order to callscanDirectory(). Specifically, we have to get thefile_systemservice class returned from\Drupal::service('file_system'), which is the object we need.So I think the patch in #6 is the right way to do this. We have to use
\Drupal::service()instead of injecting the service because we're doing this in procedural code in the htmlmail.module file.Comment #9
tr commentedCommitted #6 with the wrong commit message, which is why the commit doesn't show up here in this issue. That can't be fixed, as the commit is already pushed.
The commit is: 636563534897c1759