Problem/Motivation

#3376057: [META] Add declare(strict_types=1) to all tests

All tests must declare the use of strict types

Proposed resolution

Add strict_types to all test and code files to flag up bad variable typing during automated tests.

Fix all of the locations where such code changes will break things:

  • DB returns uid and expiration as strings, but they need to be ints
  • TicketValidationController passed bool as pgtIou string when there is none
  • TicketValidationController::loadUser() expects a string but is passed in int

Remaining tasks

  • ✅ File an issue
  • ✅ Addition/Change/Update/Fix
  • ✅ Release notes snippet
  • ❌ Release

User interface changes

  • N/A

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

Issue fork cas_server-3641391

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

elc created an issue. See original summary.

elc’s picture

Issue summary: View changes
Status: Active » Needs work

Update API changes because this will break some things.

elc’s picture

Issue summary: View changes

Fixed breakages. No public methods were broken though so no need for API changes note.

  • elc committed b68c95ee on 2.1.x
    task: #3641391 Add strict_types=1 declarations to all code and test...

  • elc committed 717758a0 on 3.0.x
    task: #3641391 Add strict_types=1 declarations to all code and test...
elc’s picture

Assigned: elc » Unassigned
Issue summary: View changes
Status: Needs work » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.