Skip to content

Commit 319c3c5

Browse files
author
Benoit POLASZEK
committed
feat: PHP8.5 + SF 8+ support
1 parent 17f435f commit 319c3c5

File tree

8 files changed

+485
-384
lines changed

8 files changed

+485
-384
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ jobs:
2424
- "8.2"
2525
- "8.3"
2626
- "8.4"
27+
- "8.5"
2728
operating-system:
2829
- "ubuntu-latest"
2930

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
}
1616
],
1717
"require": {
18-
"php": "~8.2 || ~8.3 || ~8.4",
19-
"symfony/translation": "~5.4||~6.4||~7"
18+
"php": "~8.2 || ~8.3 || ~8.4 || ~8.5",
19+
"symfony/translation": "~5.4||~6.4||~7||~8"
2020
},
2121
"require-dev": {
2222
"thunderer/shortcode": "^0.7",

composer.lock

Lines changed: 30 additions & 100 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Coduo/PHPHumanizer/Collection/Formatter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function __construct(TranslatorInterface $translator, string $catalogue =
3030
*
3131
* @param array<string> $collection
3232
*/
33-
public function format(array $collection, int $limit = null) : string
33+
public function format(array $collection, ?int $limit = null) : string
3434
{
3535
$count = \count($collection);
3636

src/Coduo/PHPHumanizer/Collection/Oxford.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public function __construct(Formatter $formatter)
2323
/**
2424
* @param array<string> $collection
2525
*/
26-
public function format(array $collection, int $limit = null) : string
26+
public function format(array $collection, ?int $limit = null) : string
2727
{
2828
return $this->formatter->format($collection, $limit);
2929
}

src/Coduo/PHPHumanizer/CollectionHumanizer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ final class CollectionHumanizer
2020
/**
2121
* @param array<string> $collection
2222
*/
23-
public static function oxford(array $collection, int $limit = null, string $locale = 'en') : string
23+
public static function oxford(array $collection, ?int $limit = null, string $locale = 'en') : string
2424
{
2525
$oxford = new Oxford(
2626
new Formatter(Builder::build($locale))

src/Coduo/PHPHumanizer/String/BinarySuffix.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ final class BinarySuffix
3434
0 => '# bytes',
3535
];
3636

37-
public function __construct(int $number, string $locale = 'en', int $precision = null)
37+
public function __construct(int $number, string $locale = 'en', ?int $precision = null)
3838
{
3939
if (!\class_exists(\NumberFormatter::class)) {
4040
throw new \RuntimeException('Binary suffix converter requires intl extension!');

0 commit comments

Comments
 (0)