The method name system_get_info is deprecated and this needs to be updated for Drupal 9 Upgrade.
Line src/Plugin/Purge/DiagnosticCheck/AcquiaPurgeCheck.php
------ --------------------------------------------------------------------------
61 Call to deprecated function system_get_info():
in drupal:8.8.0 and is removed from drupal:9.0.0. Use
------ --------------------------------------------------------------------------
The module version is not available using system_get_info details.
| Comment | File | Size | Author |
|---|---|---|---|
| #13 | 3111033-12-Call-to-deprecated-function-system_get_info.patch | 3.19 KB | guptahemant |
Comments
Comment #2
drupalfox commentedComment #3
drupalfox commentedComment #4
drupalfox commentedComment #5
avpadernoComment #6
japerryUpdating this to reflect this issue will cover all code needed for D9 readiness.
Comment #7
sushylFixed both warnings found by
Upgrade status2 warnings found.
web/modules/contrib/acquia_purge/src/Plugin/Purge/DiagnosticCheck/AcquiaCloudCheck.php:
─────────────────────────────────────────────────────────────────────
STATUS LINE MESSAGE
─────────────────────────────────────────────────────────────────────
Fix later 63 Call to deprecated function system_get_info(). Deprecated in
drupal:8.8.0 and is removed from drupal:9.0.0. Use
\Drupal::service('extension.list.$type')->getExtensionInfo()
or
\Drupal::service('extension.list.$type')->getAllInstalledInfo() instead.
─────────────────────────────────────────────────────────────────────
web/modules/contrib/acquia_purge/acquia_purge.info.yml:
─────────────────────────────────────────────────────────────────────
STATUS LINE MESSAGE
─────────────────────────────────────────────────────────────────────
Check 0 Add
core_version_requirement: ^8 || ^9tomanually acquia_purge.info.yml to designate that the module is
compatible with Drupal 9. See https://www.drupal.org/node/3070687.
─────────────────────────────────────────────────────────────────────
Comment #8
sushylComment #9
msutharsComment #10
msuthars@sushyl The patch looks fine. I reviewed and tested it and it works as expected.
Comment #11
guptahemant commentedhi @drupalfox and @sushyl
Since we are using a service here, we should be using dependency injection, Hence setting this to needs work
Comment #12
guptahemant commentedComment #13
guptahemant commentedHere is an updated patch,
Please review
Comment #14
guptahemant commentedComment #15
jaykandariComment #16
jaykandariApplied the patch in #13
Ran Drupal-check & Rector. Below are the results. Thus marking it RTBC.
Comment #17
suzymasriPatch #13 works for me too. It would be great if we can have it committed to dev so we're able to test the module on D9 projects.
Comment #18
recrit commentedThe patch in #13 will fail for 1.1+ since the changes have been made already.
Comment #19
guptahemant commentedI think this issue can be marked as closed (outdated), since all the relevant changes are already committed in the latest version of codebase.
Comment #20
japerry