Skip to content

Should getDateTime return a concrete class of DateTime or DateTimeImmutable? #48

Description

@g105b

the getDateTime function currently returns a type of ?DateTimeInterface, which could be a DateTime or DateTimeImmutable or other DateTime-derived class. Would it make more sense to decide on which concrete class to return? Maybe DateTimeImmutable would be the best choice? Maybe DateTime would be easier and better DX for people?

Activity

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

    help wantedExtra input or contributions neededquestionUsage questions or clarification requests

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions