Skip to content

Commit

Permalink
Removed DateTimeImmutable::createFromInterface() from stubs
Browse files Browse the repository at this point in the history
While there is value in declaring `DateTimeImmutable::createFromInterface()` as mutation-free in
a stub, this method was introduced in PHP 8.0, so we cannot really declare it in a stub.

For now, we drop it, as the value of its stub declaration is much lower than the problems it
introduces through its conditional existence.
  • Loading branch information
Ocramius committed Aug 5, 2022
1 parent 68ffae0 commit 1382877
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions stubs/CoreImmutableClasses.phpstub
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,6 @@ class DateTimeImmutable implements DateTimeInterface
* @return static
*/
public static function createFromMutable(DateTime $object) {}

/**
* @psalm-mutation-free
* @return self
*/
public static function createFromInterface(DateTimeInterface $object) {}
}

/**
Expand Down

0 comments on commit 1382877

Please sign in to comment.