web/modules/contrib/advanced_help/src/AdvancedHelpManager.php 136 Call to deprecated function file_scan_directory(). Deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use \Drupal\Core\File\FileSystemInterface::scanDirectory() instead.
web/modules/contrib/advanced_help/src/Plugin/Search/AdvancedHelpSearch.php 218 Call to deprecated function search_index(). Deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use \Drupal\search\SearchIndex::index() instead.
web/modules/contrib/advanced_help/src/Plugin/Search/AdvancedHelpSearch.php 235 Call to deprecated function search_index_clear(). Deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use \Drupal\search\SearchIndex::clear() instead.
web/modules/contrib/advanced_help/src/Plugin/Search/AdvancedHelpSearch.php 242 Call to deprecated function search_mark_for_reindex(). Deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use \Drupal\search\SearchIndex::markForReindex() instead.
Comment | File | Size | Author |
---|---|---|---|
#14 | 3133663-14.patch | 6 KB | gnuget |
#14 | 3133663-9-14-interdiff.txt | 5.56 KB | gnuget |
#9 | 3133663-9.patch | 5.33 KB | jyotimishra-developer |
#2 | 3133663-2.patch | 2.39 KB | mo_farhaz |
Comments
Comment #2
mo_farhaz CreditAttribution: mo_farhaz at Specbee commentedplease review.
Comment #3
mradcliffeI would probably combine #3133661: Drupal 9 readiness and this issue together because the former shouldn't be committed until this module is Drupal 9 ready.
This will fail because you are trying to use an interface like a class.
Instead, we should add the
file_system
service as a dependency for AdvancedHelpManager, and then we can typehint FileSystemInterface in the __construct method, and assign it to a protected class variable.This will fail because the SearchIndex class does not have static methods
index
,clear
, ormarkForReindex
. These are public methods that require an instance of the class to use.Similarly, we can add the
search.index
service as a dependency, and inject it in the __construct method, and then assign it to a protected class variable.Comment #4
mradcliffeI maintain freelinking, which depends on advanced_help and advanced_help_hint as test dependencies so at the moment my tests are failing in Drupal 9 without at least the patch in #3133661: Drupal 9 readiness.
Comment #5
Kristen PolComment #6
kkalashnikov CreditAttribution: kkalashnikov at Srijan | A Material+ Company for Drupal India Association commentedComment #7
kkalashnikov CreditAttribution: kkalashnikov at Srijan | A Material+ Company for Drupal India Association commentedComment #8
jyotimishra-developer CreditAttribution: jyotimishra-developer at Srijan | A Material+ Company for Drupal India Association commentedComment #9
jyotimishra-developer CreditAttribution: jyotimishra-developer at Srijan | A Material+ Company for Drupal India Association commentedChanges asked in #3, has been addressed in the uploaded patch.
Thanks!!
Comment #10
jyotimishra-developer CreditAttribution: jyotimishra-developer at Srijan | A Material+ Company for Drupal India Association commentedComment #11
jyotimishra-developer CreditAttribution: jyotimishra-developer at Srijan | A Material+ Company for Drupal India Association commentedComment #12
jyotimishra-developer CreditAttribution: jyotimishra-developer at Srijan | A Material+ Company for Drupal India Association commentedplease review the patch!!
Comment #13
gnugetThanks all for the work on this.
I checked this and as soon as we commit this the module will stop working on
Drupal 8.7.x
which is not something that we want.At least until Drupal 8.9/Drupal 9 be out we still want to support 8.7.x, so we need to add code for this, here how we can do it:
Preparing Drupal.org projects for Drupal 9
Comment #14
gnugetOk, I worked on this today.
First of all, @jyotimishra123, @mo_farhaz , next time please TEST your changes before to uploading them.
I tested #9 and the
file_system
service wasn't even being injected and therefore it was triggering an error as soon as the user visits the advanced help page.The same happened at #2, the changes aren't working at all.
The
Drupal 9 Porting Weekend
was created indeed to help Drupal to move forward but the event was also a big opportunity to learn and be mentored,In case of doubt, you can ask for help, In Slack, IRC, or even here, I will be super happy to help but uploading things that are broken is a bit inconsiderate with the person that is going to review your changes.
Next time if I can help let me know :-)
====
Ok, new patch, I injected the
file_system
service added code to keep this module compatible with Drupal 8.7 and lower. I had to do a trick to inject thesearch.index
service because it does not exists in drupal 8.7 and lower, I got the idea from this post.Patch attached.
Comment #16
gnuget