drupal-check web/modules/contrib/custom_search
6/6 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%
------ -------------------------------------------------------
Line custom_search.pages.inc
------ -------------------------------------------------------
165 Call to deprecated function format_date():
in Drupal 8.0.0, will be removed before Drupal 9.0.0.
Use \Drupal::service('date.formatter')->format().
------ -------------------------------------------------------
------ --------------------------------------------------------------------------
Line custom_search.post_update.php
------ --------------------------------------------------------------------------
23 Call to deprecated method entityManager() of class Drupal:
in Drupal 8.0.0 and will be removed before Drupal 9.0.0.
Use \Drupal::entityTypeManager() instead in most cases. If the needed
method is not on \Drupal\Core\Entity\EntityTypeManagerInterface, see the
deprecated \Drupal\Core\Entity\EntityManager to find the
correct interface or service.
------ --------------------------------------------------------------------------
------ -------------------------------------------------------------------------------
Line src/Form/CustomSearchBlockForm.php
------ -------------------------------------------------------------------------------
189 Call to deprecated method entityManager() of class Drupal:
in Drupal 8.0.0 and will be removed before Drupal 9.0.0.
Use \Drupal::entityTypeManager() instead in most cases. If the needed
method is not on \Drupal\Core\Entity\EntityTypeManagerInterface, see the
deprecated \Drupal\Core\Entity\EntityManager to find the
correct interface or service.
202 Call to deprecated method substr() of class Drupal\Component\Utility\Unicode:
in Drupal 8.6.0, will be removed before Drupal 9.0.0. Use
mb_substr() instead.
568 Call to deprecated method substr() of class Drupal\Component\Utility\Unicode:
in Drupal 8.6.0, will be removed before Drupal 9.0.0. Use
mb_substr() instead.
------ -------------------------------------------------------------------------------
------ ----------------------------------------------------------------
Line src/Plugin/Block/CustomSearchBlock.php
------ ----------------------------------------------------------------
854 Call to deprecated function file_prepare_directory():
in Drupal 8.7.0, will be removed before Drupal 9.0.0.
Use \Drupal\Core\File\FileSystemInterface::prepareDirectory().
855 Call to deprecated function file_unmanaged_copy():
in Drupal 8.7.0, will be removed before Drupal 9.0.0.
Use \Drupal\Core\File\FileSystemInterface::copy().
------ ----------------------------------------------------------------
[ERROR] Found 7 errors
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | 3087574-5.patch | 4.27 KB | suzymasri |
| #2 | custom_search-deprecated_code-3087574-2-8x_1x_dev.patch | 3.85 KB | dakruchko |
Comments
Comment #2
dakruchko commentedplease review
Comment #3
dakruchko commentedComment #4
aliaksandr_rozum commentedHi, @dakruchko! One error remains after applying your patch (it's a new error, not mentioned in the issue):
6/6 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%
------ -----------------------------------------------------------------------
Line src/Plugin/Block/CustomSearchBlock.php
------ -----------------------------------------------------------------------
270 Call to deprecated function file_uri_target():
in drupal:8.8.0 and is removed from drupal:9.0.0. Use
\Drupal\Core\StreamWrapper\StreamWrapperManagerInterface::getTarget()
instead.
------ -----------------------------------------------------------------------
[ERROR] Found 1 error
I created a child issue (Link)
Comment #5
suzymasriPatch from #2 in addition to #3106249: Drupal 9 Deprecated Code Report fixes all drupal-check errors.
Updated patch to include core_version_requirement key in the info file.
Comment #7
suzymasriComment #8
lvbeck commentedI got an PHP error after update the latest version for drupal 8.8.6:
PHP message: Error: Call to undefined method Drupal\Component\Utility\Unicode::mb_substr() in /var/www/cms/web/modules/contrib/custom_search/src/Form/CustomSearchBlockForm.php on line 202
I have to replace Unicode::mb_substr to mb_substr