Skip to content

Trait variables are accessed in a way that isn't null-safe #24

Open

Description

@KorvinSzanto

The problem is we don't have either:

  • A way to guarantee that $this->output is not null
  • The ability to use PHP 8 null safe operator like $this-output?->foo()

so ideally if we wanted this to be type safe we'd use getter methods on traits to access variables in a way that guarantees an object is returned and not null.

Originally posted by @KorvinSzanto in #22 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions