Add types to all parameters

Created on 26 September 2024, 7 months ago

Problem/Motivation

Let's type all the parameters now that Drupal 8/9 support has been dropped. This change breaks backwards compatibility, so it should probably on the 4.x branch.

πŸ“Œ Task
Status

Active

Version

3.2

Component

Code

Created by

πŸ‡―πŸ‡΅Japan ptmkenny

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

Merge Requests

Comments & Activities

  • Issue created by @ptmkenny
  • Merge request !52type all parameters β†’ (Closed) created by ptmkenny
  • Pipeline finished with Failed
    7 months ago
    Total: 183s
    #292876
  • Pipeline finished with Failed
    7 months ago
    Total: 192s
    #292878
  • Pipeline finished with Failed
    7 months ago
    Total: 231s
    #292881
  • Pipeline finished with Failed
    7 months ago
    Total: 286s
    #292883
  • πŸ‡―πŸ‡΅Japan ptmkenny

    ptmkenny β†’ changed the visibility of the branch type_parameters to hidden.

  • πŸ‡―πŸ‡΅Japan ptmkenny

    ptmkenny β†’ changed the visibility of the branch type_all_the_things to hidden.

  • πŸ‡―πŸ‡΅Japan ptmkenny

    ptmkenny β†’ changed the visibility of the branch type_parameters to active.

  • πŸ‡―πŸ‡΅Japan ptmkenny

    ptmkenny β†’ changed the visibility of the branch type_parameters to hidden.

  • πŸ‡―πŸ‡΅Japan ptmkenny

    ptmkenny β†’ changed the visibility of the branch type_parameters to active.

  • πŸ‡―πŸ‡΅Japan ptmkenny

    ptmkenny β†’ changed the visibility of the branch type_parameters to hidden.

  • πŸ‡―πŸ‡΅Japan ptmkenny

    ptmkenny β†’ changed the visibility of the branch parameter_types to hidden.

  • Merge request !53Add param types β†’ (Merged) created by ptmkenny
  • πŸ‡―πŸ‡΅Japan ptmkenny

    Wow, what a mess. For some reason, GitLab didn't show my latest commit in the original branch. Then subsequent branches created on that branch said "branch does not exist" when trying to make an MR. So I created a new branch through the UI and cherry-picked my commits onto that.

  • πŸ‡―πŸ‡΅Japan ptmkenny

    It seems GitLab is not running tests on new MRs at the moment. I'll come back to this later when things are up and running again.

  • Pipeline finished with Failed
    7 months ago
    Total: 405s
    #293001
  • Pipeline finished with Failed
    7 months ago
    Total: 252s
    #293117
  • πŸ‡¬πŸ‡§United Kingdom alexpott πŸ‡ͺπŸ‡ΊπŸŒ

    Let's bump the PHPStan level to 6 in the 3.2.x branch and add generic ignores for any array shape stuff to the phpstan.neon file.

  • πŸ‡¬πŸ‡§United Kingdom alexpott πŸ‡ͺπŸ‡ΊπŸŒ
  • πŸ‡―πŸ‡΅Japan ptmkenny

    @alexpott Ok, I'll go ahead and type the params, returns, and then update phpstan to level 6.

  • Pipeline finished with Success
    7 months ago
    Total: 164s
    #293164
  • Pipeline finished with Success
    7 months ago
    Total: 166s
    #293169
  • Pipeline finished with Failed
    7 months ago
    Total: 171s
    #293183
  • πŸ‡¬πŸ‡§United Kingdom alexpott πŸ‡ͺπŸ‡ΊπŸŒ

    @ptmkenny if you bump it to 6 then gitlab ci will give you a nice list of things to fix :)

  • πŸ‡¬πŸ‡§United Kingdom alexpott πŸ‡ͺπŸ‡ΊπŸŒ

    If you have field_encrypt installed in modules/field_encrypt then you can edit the phpstan.neon file and then run ../../vendor/bin/phpstan analyse --debug --autoload-file=../../vendor/autoload.php ./ to run PHPStan locally.

  • Pipeline finished with Failed
    7 months ago
    Total: 153s
    #293188
  • πŸ‡―πŸ‡΅Japan ptmkenny

    @alexpott Thanks! I have a local setup for phpstan; I want to get the unit tests green again and then I'll start working on phpstan.

  • Pipeline finished with Failed
    7 months ago
    Total: 169s
    #293192
  • Pipeline finished with Failed
    7 months ago
    Total: 176s
    #293198
  • Pipeline finished with Canceled
    7 months ago
    Total: 125s
    #293291
  • Pipeline finished with Failed
    7 months ago
    Total: 149s
    #293292
  • Pipeline finished with Failed
    7 months ago
    Total: 158s
    #293308
  • Pipeline finished with Canceled
    7 months ago
    Total: 156s
    #293319
  • Pipeline finished with Failed
    7 months ago
    Total: 172s
    #293321
  • Pipeline finished with Failed
    7 months ago
    Total: 239s
    #293347
  • Pipeline finished with Failed
    7 months ago
    Total: 292s
    #293379
  • Pipeline finished with Canceled
    7 months ago
    Total: 192s
    #293387
  • Pipeline finished with Canceled
    7 months ago
    Total: 92s
    #293388
  • Pipeline finished with Failed
    7 months ago
    Total: 202s
    #293392
  • Pipeline finished with Failed
    7 months ago
    Total: 206s
    #293411
  • Pipeline finished with Failed
    7 months ago
    Total: 213s
    #293444
  • Pipeline finished with Failed
    7 months ago
    Total: 179s
    #293452
  • Pipeline finished with Failed
    7 months ago
    Total: 174s
    #293459
  • Pipeline finished with Failed
    7 months ago
    Total: 182s
    #293470
  • Pipeline finished with Failed
    7 months ago
    Total: 169s
    #293482
  • Pipeline finished with Failed
    7 months ago
    Total: 181s
    #293716
  • Pipeline finished with Failed
    7 months ago
    Total: 168s
    #293717
  • Pipeline finished with Failed
    7 months ago
    Total: 336s
    #293723
  • Pipeline finished with Failed
    7 months ago
    Total: 254s
    #293735
  • Pipeline finished with Failed
    7 months ago
    Total: 270s
    #293738
  • Pipeline finished with Failed
    7 months ago
    Total: 363s
    #293741
  • Pipeline finished with Failed
    7 months ago
    Total: 442s
    #293744
  • Pipeline finished with Failed
    7 months ago
    Total: 174s
    #294380
  • Pipeline finished with Failed
    7 months ago
    Total: 212s
    #294410
  • Pipeline finished with Failed
    7 months ago
    Total: 236s
    #294437
  • Pipeline finished with Failed
    7 months ago
    Total: 169s
    #294485
  • Pipeline finished with Failed
    7 months ago
    Total: 213s
    #294536
  • Pipeline finished with Failed
    7 months ago
    Total: 250s
    #294579
  • Pipeline finished with Failed
    7 months ago
    Total: 168s
    #294593
  • Pipeline finished with Failed
    7 months ago
    Total: 172s
    #294603
  • Pipeline finished with Failed
    7 months ago
    Total: 183s
    #294633
  • Pipeline finished with Success
    7 months ago
    Total: 163s
    #294638
  • Pipeline finished with Failed
    7 months ago
    Total: 192s
    #294648
  • Pipeline finished with Success
    7 months ago
    Total: 190s
    #294662
  • πŸ‡―πŸ‡΅Japan ptmkenny

    All tests are passing, so I'm moving this to "Needs review."

  • πŸ‡¬πŸ‡§United Kingdom alexpott πŸ‡ͺπŸ‡ΊπŸŒ

    Changed some small things:

    1. Moved to an assert instead of an instanceof check as we'd want it to break if $event->getConfig() did not return what we expect.
    2. Changed the hook return type back to undefined as this is a super tricky hook that is only interested if you return a FALSE.
  • πŸ‡¬πŸ‡§United Kingdom alexpott πŸ‡ͺπŸ‡ΊπŸŒ
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024