Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
drupal-check results on commit hash:
source : [git] https://git.drupal.org/project/stage_file_proxy 4c3fa8d12703d8665032719ac002529d6d3a1c70
source : http://cgit.drupalcode.org/stage_file_proxy
------ ---------------------------------------------
Line src/EventSubscriber/ProxySubscriber.php
------ ---------------------------------------------
82 Call to deprecated method substr() of class
Drupal\Component\Utility\Unicode.
107 Call to deprecated method strlen() of class
Drupal\Component\Utility\Unicode.
107 Call to deprecated method substr() of class
Drupal\Component\Utility\Unicode.
------ ---------------------------------------------
------ ---------------------------------------------------
Line src/Form/SettingsForm.php
------ ---------------------------------------------------
97 Call to deprecated method substr() of class
Drupal\Component\Utility\Unicode.
120 Call to deprecated function drupal_set_message().
------ ---------------------------------------------------
------ ---------------------------------------------------
Line stage_file_proxy.drush.inc
------ ---------------------------------------------------
33 Call to deprecated function drupal_set_message().
66 Call to deprecated method strlen() of class
Drupal\Component\Utility\Unicode.
66 Call to deprecated method substr() of class
Drupal\Component\Utility\Unicode.
90 Call to deprecated function drupal_set_message().
98 Call to deprecated function drupal_set_message().
109 Call to deprecated function drupal_set_message().
------ ---------------------------------------------------
------ ---------------------------------------------------------
Line src/FetchManager.php
------ ---------------------------------------------------------
60 Call to deprecated function file_prepare_directory().
168 Call to deprecated function file_unmanaged_save_data().
------ ---------------------------------------------------------
[ERROR] Found 13 errors
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
Comment | File | Size | Author |
---|---|---|---|
#8 | drupal_9_deprecated_code-3042934-8.patch | 5.46 KB | Sergiu Stici |
Comments
Comment #2
Sergiu Stici CreditAttribution: Sergiu Stici at FFW commentedHere is the patch, please review.
Comment #4
Sergiu Stici CreditAttribution: Sergiu Stici at FFW commentedCorrected codesniffer.
Comment #6
JeroenTPatch looks good!
Since Drupal 8.7 there are 2 new calls to deprecated functions in this module:
Comment #7
JeroenTComment #8
Sergiu Stici CreditAttribution: Sergiu Stici at FFW commentedI updated the patch, please review.
Comment #10
JeroenTLooks good!
Comment #11
JeroenTThere are still some calls to \Drupal in the classes. Created #3054293: Remove \Drupal calls in classes. Use dependency injection instead as a follow-up.
Comment #12
BarisW CreditAttribution: BarisW at LimoenGroen commentedThanks for the patch and the review. It needed a re-roll, and the constants FILE_MODIFY_PERMISSIONS and FILE_CREATE_DIRECTORY needed to be replaced as well.
Comment #14
BarisW CreditAttribution: BarisW at LimoenGroen commentedComment #15
mfernea CreditAttribution: mfernea at AmeXio commented#6 makes the module incompatible with versions lower than 8.7 of Drupal core. I raised an issue here #3084611: prepareDirectory vs file_prepare_directory breaks with core <8.7.