Move helpers in batch_test.module and delete it

Created on 2 January 2025, 27 days ago

Problem/Motivation

.module files are only necessary when there are preprocess functions now that almost all hooks can be OOP

Steps to reproduce

Open file

Proposed resolution

Move batch callbacks to the controller

Remaining tasks

None

User interface changes

N/A

Introduced terminology

N/A

API changes

N/A

Data model changes

N/A

Release notes snippet

N/A

πŸ“Œ Task
Status

Active

Version

11.0 πŸ”₯

Component

batch system

Created by

πŸ‡ΊπŸ‡ΈUnited States nicxvan

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @nicxvan
  • πŸ‡ΊπŸ‡ΈUnited States nicxvan

    Not sure what I'm missing, but there are errors, there were a lot of changes. I tried using static, and using the class directly like I've done in projects and it still fails.

  • πŸ‡·πŸ‡ΊRussia zniki.ru

    Add parent issue.

  • πŸ‡ΊπŸ‡ΈUnited States nicxvan

    I didn't want to create the MR cause all of the batch tests fail, I'll create it so you can see though.

  • Merge request !10768First pass β†’ (Open) created by nicxvan
  • Pipeline finished with Failed
    26 days ago
    Total: 87s
    #384121
  • Pipeline finished with Failed
    26 days ago
    Total: 130s
    #384130
  • Pipeline finished with Failed
    26 days ago
    Total: 115s
    #384138
  • Pipeline finished with Failed
    26 days ago
    Total: 441s
    #384148
  • πŸ‡ΊπŸ‡ΈUnited States nicxvan

    Ok you can see the failures now

  • πŸ‡·πŸ‡ΊRussia zniki.ru

    I install batch_test module on local and visit batch-test/no-form. Here the error.
    'Fatal error: A void function must not return a value in /var/www/html/core/modules/system/tests/modules/batch_test/src/BatchTestHelper.php on line 244'

  • πŸ‡ΊπŸ‡ΈUnited States nicxvan

    Thank you so much! I knew I was missing something obvious!

  • πŸ‡ΊπŸ‡ΈUnited States nicxvan
  • Pipeline finished with Failed
    26 days ago
    Total: 247s
    #384235
  • Pipeline finished with Failed
    26 days ago
    Total: 169s
    #384238
  • Pipeline finished with Failed
    26 days ago
    Total: 1094s
    #384246
  • Pipeline finished with Success
    26 days ago
    Total: 690s
    #384264
  • πŸ‡ΊπŸ‡ΈUnited States nicxvan
  • πŸ‡·πŸ‡ΊRussia zniki.ru

    Thanks for MR, please check my feedback.

  • Pipeline finished with Failed
    25 days ago
    Total: 608s
    #385360
  • πŸ‡ΊπŸ‡ΈUnited States nicxvan

    Addressed it all, I'll wait on tests.

  • Pipeline finished with Failed
    23 days ago
    Total: 238s
    #386827
  • Pipeline finished with Failed
    23 days ago
    Total: 1055s
    #386832
  • Pipeline finished with Success
    23 days ago
    Total: 1591s
    #386860
  • πŸ‡·πŸ‡ΊRussia zniki.ru

    Thanks, LGTM.

  • πŸ‡¬πŸ‡§United Kingdom catch

    Went to commit this, however phpstan isn't happy. Not sure why this didn't show up in the pipeline.

    FILE: ...al/core/modules/system/tests/modules/batch_test/src/BatchTestCallbacks.php
    --------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    --------------------------------------------------------------------------------
     194 | WARNING | t() calls should be avoided in classes, use
         |         | \Drupal\Core\StringTranslation\StringTranslationTrait and
         |         | $this->t() instead
    --------------------------------------------------------------------------------
    
  • πŸ‡ΊπŸ‡ΈUnited States nicxvan

    That is weird, I ran the baseline locally and it didn't show up.

    I added string translation trait and rebased.

  • Pipeline finished with Failed
    5 days ago
    Total: 400s
    #404045
  • πŸ‡ΊπŸ‡ΈUnited States nicxvan
  • πŸ‡ΊπŸ‡ΈUnited States nicxvan
  • Pipeline finished with Failed
    5 days ago
    Total: 559s
    #404063
  • πŸ‡·πŸ‡ΊRussia zniki.ru

    Looks like some random fails. Please double check.

  • πŸ‡ΊπŸ‡ΈUnited States nicxvan

    Failure is on head, I can rebase once πŸ“Œ Move helpers in ajax_forms_test.module and delete it Needs work is in.

  • πŸ‡·πŸ‡ΊRussia zniki.ru

    Thanks, in this case LGTM.

Production build 0.71.5 2024