web/modules/contrib/search_api_page/search_api_page.module 122 Call to deprecated method url() of class Drupal\file\Entity\File. Deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Please use toUrl() instead.
web/modules/contrib/search_api_page/src/Controller/SearchApiPageController.php 303 Call to deprecated function pager_default_initialize(). Deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use \Drupal\Core\Pager\PagerManagerInterface->defaultInitialize() instead.
web/modules/contrib/search_api_page/src/Form/SearchApiPageBlockForm.php 149 Call to deprecated method getUrlGenerator() of class Drupal\Core\Form\FormBase. Deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Use the url_generator service instead.
Comment | File | Size | Author |
---|---|---|---|
#20 | 3123705-20.patch | 3.62 KB | s_leu |
#20 | 3123705-20.interdiff.txt | 2.18 KB | s_leu |
#16 | search_api_pages.png | 27.62 KB | abhijeet.kumar2107 |
Comments
Comment #2
mo_farhaz CreditAttribution: mo_farhaz at Specbee commentedComment #3
karishmaamin CreditAttribution: karishmaamin commentedplease review.
Comment #5
BerdirThere is a reason this is in a file entity specific check. So the replacement here is then createFileUrl().
this means requiring 8.8, so we need to update .info.yml files.
There's also #3073604: Missing `config_export` in `search_api_page` entity definition. which doesn't show up with drupal-check.
this isn't the correct fix, should use Url::fromRoute()->toString()
And the url generator trait should be removed from the class.
Comment #6
abhijeet.kumar2107 CreditAttribution: abhijeet.kumar2107 as a volunteer and at Srijan | A Material+ Company for Drupal India Association commentedComment #7
abhijeet.kumar2107 CreditAttribution: abhijeet.kumar2107 as a volunteer and at Srijan | A Material+ Company for Drupal India Association commentedComment #8
abhijeet.kumar2107 CreditAttribution: abhijeet.kumar2107 as a volunteer and at Srijan | A Material+ Company for Drupal India Association commentedComment #9
abhijeet.kumar2107 CreditAttribution: abhijeet.kumar2107 as a volunteer and at Srijan | A Material+ Company for Drupal India Association commentedAttached patche please review
Comment #10
abhijeet.kumar2107 CreditAttribution: abhijeet.kumar2107 as a volunteer and at Srijan | A Material+ Company for Drupal India Association commentedPatch Attached
Comment #11
abhijeet.kumar2107 CreditAttribution: abhijeet.kumar2107 as a volunteer and at Srijan | A Material+ Company for Drupal India Association commented../../../vendor/bin/drupal-check -d .
23/23 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%
[OK] No errors
Patch attached please review
Comment #12
abhijeet.kumar2107 CreditAttribution: abhijeet.kumar2107 as a volunteer and at Srijan | A Material+ Company for Drupal India Association commented../../../vendor/bin/drupal-check -d .
23/23 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%
[OK] No errors
Patch attached please review
Comment #13
abhijeet.kumar2107 CreditAttribution: abhijeet.kumar2107 as a volunteer and at Srijan | A Material+ Company for Drupal India Association commentedComment #14
abhijeet.kumar2107 CreditAttribution: abhijeet.kumar2107 as a volunteer and at Srijan | A Material+ Company for Drupal India Association commentedComment #15
abhijeet.kumar2107 CreditAttribution: abhijeet.kumar2107 as a volunteer and at Srijan | A Material+ Company for Drupal India Association commentedComment #16
abhijeet.kumar2107 CreditAttribution: abhijeet.kumar2107 as a volunteer and at Srijan | A Material+ Company for Drupal India Association commentedCreated patch and passed at #15 which remove all deprecated code, Please check below screenshot attached
https://www.drupal.org/files/issues/2020-05-14/search_api_pages.png
./../../vendor/bin/drupal-check -d .
23/23 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%
[OK] No errors
Comment #17
abhijeet.kumar2107 CreditAttribution: abhijeet.kumar2107 as a volunteer and at Srijan | A Material+ Company for Drupal India Association commentedComment #18
richgerdesTested the patch, it looks good against drupal check.
Comment #19
s_leu CreditAttribution: s_leu as a volunteer and commentedRegarding the patch in #15:
This should use the method on FileInterface as already pointed out in #5
The pager.manager service should be injected for this, as it was already the case in the patch posted in #3.
Also as already mentioned in #5 too, a requirement for ^8.8 has to be added to the .info.yml file as the service was only introduced on Drupal 8.8.
Also mentioned in #5, the Url::fromRoute() should be used here instead.
Comment #20
s_leu CreditAttribution: s_leu as a volunteer and commentedHere's a patch that takes all things mentioned in the last post and #5 into account, as well as an interdiff to the patch posted in #3.
Comment #21
richgerdes@s_leu, thanks for the feedback and verifying that the comments from #5 was incorporated. I glanced over some of those and was working off the latest patch.
I've tested your updated patch and everything looks good here. Moving back to RTBC.
Comment #22
richgerdesComment #23
oknateNote: I also needed this patch for Drupal 9: #3073604: Missing `config_export` in `search_api_page` entity definition.
Without it, I couldn't save the config without an error.
Comment #25
borisson_Committed and pushed, thanks!