This module have a deprecated methods(\Drupal::url(), \Drupal::entityManager()) and functions (db_insert(), db_update(), db_query(), drupal_render_children(), entity_get_form_display())
| Comment | File | Size | Author |
|---|---|---|---|
| #14 | 2855165-14-D8-deprecated_methods_and_function__replaced_REQUEST_TIME.patch | 2.99 KB | alunyov |
Comments
Comment #2
znak commentedComment #3
znak commentedPatch for fix this. Please, check up.
Comment #4
elachlan commentedCan you please link the change notices for each of the issues in the description?
Also all changes are to dev.
Comment #6
alunyov commentedHello Guys,
I have updated patch, because there were two critical issues were causing failing tests:
1st is about loading entity form display
2nd is about the way how drupal_render_children() was replaced
Additionally I have replaced \Drupal::database()->query() (where SELECT is called) with \Drupal::database()->select(), since that is more Drupal way.
Please review the patch,
Comment #7
alunyov commentedAnd here is patch to comment above (#6)
Comment #8
gg24 commentedTesting steps are as follows:-
Attaching screenshot for the captcha here too. #7 Patch works as expected. Issuing RTBC to this.
Thanks!
Comment #9
bapi_22 commentedAvoid static method call inside Class method, use dependency injection instead.
Comment #10
alunyov commentedI have updated patch. Added dependency injections to Captcha, CaptchaCachedSettingsSubscriber, CaptchaExamplesForm, CaptchaPointForm and CaptchaSettingsForm classes even that was not requested initially.
@gg24, @bapi_22 feel free to check it now.
P.S. locally tests are run without issues.
Comment #12
elachlan commentedI've committed the changes so the patches aren't so massive. So it should be easier to tweak if necessary.
Comment #13
bapi_22 commentedHi alunyov,
Looks good Now.
As REQUEST_TIME is deprecated, so try to use \Drupal::time()->getRequestTime() instead.
Thanks
Comment #14
alunyov commentedHey bapi_22,
Here is new patch to replace deprecated REQUEST_TIME. Tests run locally fine.
Comment #15
alunyov commentedMarking the issue as 'Needs review'
Comment #16
bapi_22 commented#14 Looks good
+1 to RTBC
Comment #18
elachlan commented