Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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 CreditAttribution: Znak commentedComment #3
Znak CreditAttribution: Znak commentedPatch for fix this. Please, check up.
Comment #4
elachlan CreditAttribution: 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 CreditAttribution: alunyov at FFW 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 CreditAttribution: alunyov at FFW commentedAnd here is patch to comment above (#6)
Comment #8
gg24 CreditAttribution: gg24 as a volunteer and at QED42 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 CreditAttribution: bapi_22 at Cybage Software Pvt Ltd. commentedAvoid static method call inside Class method, use dependency injection instead.
Comment #10
alunyov CreditAttribution: alunyov at FFW 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 CreditAttribution: 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 CreditAttribution: bapi_22 at Cybage Software Pvt Ltd. commentedHi alunyov,
Looks good Now.
As REQUEST_TIME is deprecated, so try to use \Drupal::time()->getRequestTime() instead.
Thanks
Comment #14
alunyov CreditAttribution: alunyov at FFW commentedHey bapi_22,
Here is new patch to replace deprecated REQUEST_TIME. Tests run locally fine.
Comment #15
alunyov CreditAttribution: alunyov at FFW commentedMarking the issue as 'Needs review'
Comment #16
bapi_22 CreditAttribution: bapi_22 at Cybage Software Pvt Ltd. commented#14 Looks good
+1 to RTBC
Comment #18
elachlan CreditAttribution: elachlan commented