Skip to content

Commit 3fe1021

Browse files
committed
Remove support for PHP8.3
1 parent 80f2661 commit 3fe1021

2 files changed

Lines changed: 2 additions & 11 deletions

File tree

src/Identifiers.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public function __construct(Identifiers|HasIdentifiers|iterable|string $items =
7474
private static function filterIdentifiers(Identifiers|HasIdentifiers|iterable|string $data): array
7575
{
7676
if ($data instanceof HasIdentifiers) {
77-
return $data->identifiers()->all();
77+
return $data->identifiers->all();
7878
}
7979

8080
if ($data instanceof self) {
@@ -159,7 +159,7 @@ public function isEmpty(): bool
159159
public function equals(HasIdentifiers|Identifiers $other): bool
160160
{
161161
$currentLabels = $this->items;
162-
$otherLabels = $other instanceof HasIdentifiers ? $other->identifiers()->items : $other->items;
162+
$otherLabels = $other instanceof HasIdentifiers ? $other->identifiers->items : $other->items;
163163

164164
sort($currentLabels, SORT_STRING);
165165
sort($otherLabels, SORT_STRING);

src/LocaleTimeFormatter.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
namespace Bakame\Tokei;
66

7-
use DateTimeImmutable;
87
use DateTimeZone;
98
use IntlDateFormatter;
109
use Throwable;
@@ -50,14 +49,6 @@ private static function createFormatter(string $locale, LocaleVerbosity $verbosi
5049
},
5150
timezone: $timezone,
5251
);
53-
54-
// For PHP83 only we are required to test the instantiated instance to
55-
// validate that it is in a valid state. An error is only thrown with
56-
// the following message "Found unconstructed IntlDateFormatter"
57-
// when format is called,
58-
if (PHP_VERSION_ID < 80400) {
59-
$formatter->format(new DateTimeImmutable());
60-
}
6152
} catch (Throwable $exception) {
6253
throw new ValueError('Unable to instantiate '.self::class.'; verify the locale.', previous: $exception);
6354
}

0 commit comments

Comments
 (0)