Make typehinting in constructor and createInstance for TypedData consistent

Created on 24 September 2018, about 6 years ago
Updated 31 January 2023, almost 2 years ago

Now the argument type hints in the method definition for the createInstance singleton method and the constructor are not the same:

public static function createInstance($definition, $name = NULL, TraversableTypedDataInterface $parent = NULL)
vs
public function __construct(DataDefinitionInterface $definition, $name = NULL, TypedDataInterface $parent = NULL)

These should be the same, so the createInstance should have the DataDefinitionInterface type hint for the first argument and the constructor should have the TraversableTypedDataInterface type hint for the third argument.

πŸ› Bug report
Status

Needs work

Version

10.1 ✨

Component
Typed dataΒ  β†’

Last updated 16 days ago

  • Maintained by
  • πŸ‡¦πŸ‡ΉAustria @fago
Created by

πŸ‡§πŸ‡ͺBelgium daften

Live updates comments and jobs are added and updated live.
  • Needs change record

    A change record needs to be drafted before an issue is committed. Note: Change records used to be called change notifications.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

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

    let me ask is there a chance something other then the types we think could of been sent? If so then won't we need a trigger_error?

    Tagging for a change record.

Production build 0.71.5 2024