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


Comments

dakruchko created an issue. See original summary.

dakruchko’s picture

please review

dakruchko’s picture

Assigned: dakruchko » Unassigned
Status: Active » Needs review
aliaksandr_rozum’s picture

Status: Needs review » Reviewed & tested by the community

Hi, @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)

suzymasri’s picture

StatusFileSize
new4.27 KB

Patch 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.

  • suzymasri committed f53f88e on 8.x-1.x
    Issue #3087574 by dakruchko, suzymasri, aliaksandr_rozum: Drupal 9...
suzymasri’s picture

Status: Reviewed & tested by the community » Fixed
lvbeck’s picture

I 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

Status: Fixed » Closed (fixed)

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