Problem/Motivation

Now that all phpstan scans are passing, let's type all the arguments for additional safety.

This issue was originally intended to type hint everything, but since that involves too many changes, I split it into two issues, this one and the follow-up #3471922: Add types for function returns.

Issue fork jsonrpc-3471349

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

ptmkenny created an issue. See original summary.

ptmkenny’s picture

Status: Active » Postponed

This is likely to cause breaking changes so it should be part of the 3.0 release.

ptmkenny’s picture

Tests are failing with errors like these:

        "data": "[Type Error] Attribute \"factory\" of @JsonRpcParameterDefinition declared on class Drupal\\jsonrpc_core\\Plugin\\jsonrpc\\Method\\ListPermissions expects a(n) string|null, but got string."

ptmkenny’s picture

Title: Type all the things » Type hint properties
Issue summary: View changes
ptmkenny’s picture

Version: 2.x-dev » 3.x-dev
ptmkenny’s picture

Title: Type hint properties » Add types for properties and arguments
Status: Postponed » Needs review
ptmkenny’s picture

  • ptmkenny committed edee293d on 3.x
    Issue #3471349 by ptmkenny: Add types for properties and arguments
    
ptmkenny’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.