Skip to content

Commit f899846

Browse files
authored
Release/1.3.0 (#19)
1 parent 70bafb5 commit f899846

File tree

8 files changed

+23
-26
lines changed

8 files changed

+23
-26
lines changed

.github/workflows/ci.yml

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,49 +7,44 @@ on:
77
permissions:
88
contents: read
99

10+
env:
11+
PHP_VERSION: '8.3'
12+
1013
jobs:
1114
auto-review:
1215
name: Auto review
1316
runs-on: ubuntu-latest
1417

1518
steps:
1619
- name: Checkout
17-
uses: actions/checkout@v3
20+
uses: actions/checkout@v4
1821

19-
- name: Use PHP 8.2
22+
- name: Configure PHP
2023
uses: shivammathur/setup-php@v2
2124
with:
22-
php-version: '8.2'
25+
php-version: ${{ env.PHP_VERSION }}
2326

2427
- name: Install dependencies
2528
run: composer update --no-progress --optimize-autoloader
2629

27-
- name: Run phpcs
28-
run: composer phpcs
29-
30-
- name: Run phpmd
31-
run: composer phpmd
30+
- name: Run review
31+
run: composer review
3232

3333
tests:
3434
name: Tests
3535
runs-on: ubuntu-latest
3636

3737
steps:
3838
- name: Checkout
39-
uses: actions/checkout@v3
39+
uses: actions/checkout@v4
4040

41-
- name: Use PHP 8.2
41+
- name: Use PHP ${{ env.PHP_VERSION }}
4242
uses: shivammathur/setup-php@v2
4343
with:
44-
php-version: '8.2'
44+
php-version: ${{ env.PHP_VERSION }}
4545

4646
- name: Install dependencies
4747
run: composer update --no-progress --optimize-autoloader
4848

49-
- name: Run unit tests
50-
env:
51-
XDEBUG_MODE: coverage
52-
run: composer test
53-
54-
- name: Run mutation tests
55-
run: composer test-mutation
49+
- name: Run tests
50+
run: composer tests

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
DOCKER_RUN = docker run --rm -it --net=host -v ${PWD}:/app -w /app gustavofreze/php:8.2
1+
DOCKER_RUN = docker run --rm -it --net=host -v ${PWD}:/app -w /app gustavofreze/php:8.3
22

33
.PHONY: configure test test-file test-no-coverage review show-reports clean
44

composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,18 +41,18 @@
4141
}
4242
},
4343
"require": {
44-
"php": "^8.2",
45-
"tiny-blocks/encoder": "^2"
44+
"php": "^8.3",
45+
"tiny-blocks/encoder": "^3"
4646
},
4747
"require-dev": {
4848
"phpmd/phpmd": "^2.15",
4949
"phpunit/phpunit": "^11",
5050
"phpstan/phpstan": "^1",
5151
"infection/infection": "^0.29",
52-
"squizlabs/php_codesniffer": "^3.10"
52+
"squizlabs/php_codesniffer": "^3.11"
5353
},
5454
"suggest": {
55-
"ext-gmp": "Enables faster math with arbitrary-precision integers using GMP."
55+
"ext-bcmath": "Enables the extension which is an interface to the GNU implementation as a Basic Calculator utility library."
5656
},
5757
"scripts": {
5858
"phpcs": "phpcs --standard=PSR12 --extensions=php ./src",

src/Internal/Exceptions/InvalidKsuidForInspection.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ final class InvalidKsuidForInspection extends RuntimeException
1111
public function __construct(private readonly string $ksuid)
1212
{
1313
$template = 'The KSUID <%s> is not valid for inspection.';
14+
1415
parent::__construct(message: sprintf($template, $this->ksuid));
1516
}
1617
}

src/Internal/Exceptions/InvalidPayloadSize.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ final class InvalidPayloadSize extends RuntimeException
1111
public function __construct(private readonly int $currentSize, private readonly int $payloadBytes)
1212
{
1313
$template = 'Current length is <%s> bytes. Payload size must be exactly <%s> bytes.';
14+
1415
parent::__construct(message: sprintf($template, $this->currentSize, $this->payloadBytes));
1516
}
1617
}

src/Internal/Payload.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
final readonly class Payload
1111
{
12-
public const PAYLOAD_BYTES = 16;
12+
public const int PAYLOAD_BYTES = 16;
1313

1414
private function __construct(private string $value)
1515
{

src/Internal/Timestamp.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
final readonly class Timestamp
1212
{
13-
public const EPOCH = 1400000000;
13+
public const int EPOCH = 1400000000;
1414

1515
private function __construct(private int $value)
1616
{

src/Ksuid.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
final readonly class Ksuid
1313
{
14-
public const ENCODED_SIZE = 27;
14+
public const int ENCODED_SIZE = 27;
1515

1616
private function __construct(private Payload $payload, private Timestamp $timestamp)
1717
{

0 commit comments

Comments
 (0)