the code should be updated to remove deprecated uses of REQUEST_TIME and time() and others.

For more information, see the change record.

Comments

Sivaprasad C created an issue. See original summary.

sivaprasadc’s picture

Assigned: sivaprasadc » Unassigned
StatusFileSize
new1.94 KB

Attaching the patch. Please review.

sivaprasadc’s picture

Category: Feature request » Task
Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, 2: REQUEST_TIME-2933395-2.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

arunkumark’s picture

Status: Needs work » Needs review
StatusFileSize
new1.55 KB

I have re-rolled the patch to resolve the testing.

berdir’s picture

+++ b/redirect.generate.inc
@@ -139,14 +139,15 @@ function redirect_generate_batch_generate($num, array &$context) {
 
     if (mt_rand(0, 1)) {
-    $query = \Drupal::database();
-    $query->update('redirect')
-      ->fields(array(
-        'count' => mt_rand(1, 500),
-        'access' => mt_rand(REQUEST_TIME - 31536000, REQUEST_TIME),
-      ))
-      ->condition('rid', $redirect->id())
-      ->execute();
+      $request_time = \Drupal::time()->getRequestTime();
+      $query = \Drupal::database();

this code has never been ported from 7.x, those fields simply don't exist anymore.

Wondering if we should completely remove that file instead of doing some random paretial conversions when the while concept is completely different now.

idebr’s picture

Filed #2947280: Port redirect.generate.inc to DevelGenerate plugin to port the integration with Devel generate

berdir’s picture

Status: Needs review » Closed (duplicate)