Skip to content

Commit 77ea7a6

Browse files
authored
Merge pull request #1051 from bavix/php85
Update PHP versions in GitHub Actions workflow to include 8.5
2 parents 4248aa6 + 7f9aaa7 commit 77ea7a6

30 files changed

+47
-22
lines changed

.github/workflows/phpunits.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818

1919
strategy:
2020
matrix:
21-
php-versions: [8.3, 8.4]
21+
php-versions: [8.3, 8.4, 8.5]
2222
databases: [testing, pgsql, mysql, mariadb]
2323
caches: [array, redis, memcached, database]
2424
locks: [redis, memcached]

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ laravel-wallet - It's easy to work with a virtual wallet.
2020

2121
| Version | Laravel | PHP | Release date | End of improvements | End of support |
2222
|------------|----------------|-----------------|--------------|---------------------|----------------|
23-
| 11.x [LTS] | ^11.0, ^12.0 | 8.2,8.3,8.4 | Mar 14, 2024 | May 1, 2026 | Sep 6, 2026 |
23+
| 11.x [LTS] | ^11.0, ^12.0 | 8.3,8.4,8.5 | Mar 14, 2024 | May 1, 2026 | Sep 6, 2026 |
2424

2525
### Upgrade Guide
2626

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
}
2323
],
2424
"require": {
25-
"php": "^8.2",
25+
"php": "^8.3",
2626
"ext-json": "*",
2727
"ext-pdo": "*",
2828
"brick/math": "~0.10",
@@ -41,7 +41,7 @@
4141
"phpstan/phpstan": "^2.1",
4242
"phpunit/phpunit": "^11.0",
4343
"rector/rector": "^2.0",
44-
"symplify/easy-coding-standard": "^12.1"
44+
"symplify/easy-coding-standard": "^13.0"
4545
},
4646
"suggest": {
4747
"bavix/laravel-wallet-swap": "Addition to the laravel-wallet library for quick setting of exchange rates",

rector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@
2929
$config->import(SetList::INSTANCEOF);
3030
$config->import(SetList::CODE_QUALITY);
3131
$config->import(SetList::DEAD_CODE);
32-
$config->import(SetList::PHP_82);
32+
$config->import(SetList::PHP_83);
3333
};

src/Internal/Assembler/ExtraDtoAssembler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ public function create(ExtraDtoInterface|array|null $data): ExtraDtoInterface
2222

2323
$option = $this->optionDtoAssembler->create($data);
2424

25-
return new Extra($option, $option, null);
25+
return new Extra($option, $option);
2626
}
2727
}

src/Internal/Service/LockService.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010

1111
final class LockService implements LockServiceInterface
1212
{
13-
private const LOCK_KEY = 'wallet_lock::';
13+
private const string LOCK_KEY = 'wallet_lock::';
1414

15-
private const INNER_KEYS = 'inner_keys::';
15+
private const string INNER_KEYS = 'inner_keys::';
1616

1717
private ?LockProvider $lockProvider = null;
1818

src/Internal/Service/StateService.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,27 @@
99

1010
final readonly class StateService implements StateServiceInterface
1111
{
12-
private const RANDOM_BYTES = 3;
12+
private const int RANDOM_BYTES = 3;
1313

1414
/**
1515
* Keeps the state of balance
1616
*/
17-
private const PREFIX_STATE = 'wallet_s::';
17+
private const string PREFIX_STATE = 'wallet_s::';
1818

1919
/**
2020
* Stores a callback reference
2121
*/
22-
private const PREFIX_FORK_REF = 'wallet_f::';
22+
private const string PREFIX_FORK_REF = 'wallet_f::';
2323

2424
/**
2525
* Stores a pair of uuid with forkId
2626
*/
27-
private const PREFIX_FORK_ID = 'wallet_fc::';
27+
private const string PREFIX_FORK_ID = 'wallet_fc::';
2828

2929
/**
3030
* Stores all uuids for a particular forkId
3131
*/
32-
private const PREFIX_HASHMAP = 'wallet_hm::';
32+
private const string PREFIX_HASHMAP = 'wallet_hm::';
3333

3434
private CacheRepository $store;
3535

src/Internal/Service/StorageService.php

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

1111
final readonly class StorageService implements StorageServiceInterface
1212
{
13-
private const PREFIX = 'wallet_sg::';
13+
private const string PREFIX = 'wallet_sg::';
1414

1515
public function __construct(
1616
private MathServiceInterface $mathService,

src/Models/Transaction.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ class Transaction extends Model
4141
{
4242
use SoftDeletes;
4343

44-
final public const TYPE_DEPOSIT = 'deposit';
44+
final public const string TYPE_DEPOSIT = 'deposit';
4545

46-
final public const TYPE_WITHDRAW = 'withdraw';
46+
final public const string TYPE_WITHDRAW = 'withdraw';
4747

4848
/**
4949
* @var array<int, string>
@@ -73,6 +73,7 @@ public function casts(): array
7373
];
7474
}
7575

76+
#[\Override]
7677
public function getTable(): string
7778
{
7879
if ((string) $this->table === '') {
@@ -125,6 +126,7 @@ public function setAmountFloatAttribute(float|int|string $amount): void
125126
$this->amount = $math->round($math->mul($amount, $decimalPlaces));
126127
}
127128

129+
#[\Override]
128130
protected static function boot(): void
129131
{
130132
parent::boot();

src/Models/Transfer.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,15 @@ class Transfer extends Model
3838
{
3939
use SoftDeletes;
4040

41-
final public const STATUS_EXCHANGE = 'exchange';
41+
final public const string STATUS_EXCHANGE = 'exchange';
4242

43-
final public const STATUS_TRANSFER = 'transfer';
43+
final public const string STATUS_TRANSFER = 'transfer';
4444

45-
final public const STATUS_PAID = 'paid';
45+
final public const string STATUS_PAID = 'paid';
4646

47-
final public const STATUS_REFUND = 'refund';
47+
final public const string STATUS_REFUND = 'refund';
4848

49-
final public const STATUS_GIFT = 'gift';
49+
final public const string STATUS_GIFT = 'gift';
5050

5151
/**
5252
* @var array<int, string>
@@ -77,6 +77,7 @@ public function casts(): array
7777
];
7878
}
7979

80+
#[\Override]
8081
public function getTable(): string
8182
{
8283
if ((string) $this->table === '') {
@@ -118,6 +119,7 @@ public function withdraw(): BelongsTo
118119
return $this->belongsTo(config('wallet.transaction.model', Transaction::class), 'withdraw_id');
119120
}
120121

122+
#[\Override]
121123
protected static function boot(): void
122124
{
123125
parent::boot();

0 commit comments

Comments
 (0)