Skip to content

Commit e42f807

Browse files
committed
Version 3.x prep. PHP 8.2 now min version
1 parent e912892 commit e42f807

File tree

6 files changed

+22
-15
lines changed

6 files changed

+22
-15
lines changed

.github/workflows/php.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,19 @@ jobs:
1616

1717
strategy:
1818
matrix:
19-
php: [8.3, 8.2, 8.1]
19+
php: [8.5, 8.4, 8.3, 8.2]
2020
# prefer-lowest is causing unit tests to fail when php 7.2 is run against PHPunit 7.x,
2121
# PHPUnit 8.x is the latest stable release that supports PHP 7.2 and that runs fine
2222
# dependency-version: [prefer-lowest, prefer-stable]
2323
dependency-version: [prefer-stable]
24-
os: [ubuntu-20.04, ubuntu-22.04]
25-
include:
26-
- os: ubuntu-20.04
27-
php: 8.1
28-
- os: ubuntu-22.04
29-
php: 8.1
30-
- os: ubuntu-22.04
31-
php: 8.2
24+
os: [ubuntu-latest]
25+
# include:
26+
# - os: ubuntu-20.04
27+
# php: 8.1
28+
# - os: ubuntu-22.04
29+
# php: 8.1
30+
# - os: ubuntu-22.04
31+
# php: 8.2
3232
#exclude:
3333
#- os: ubuntu-20.04
3434
# php: 7.3

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ These are the branches in this repository:
3636

3737
- **main:** contains code for the latest major version of this package
3838
- **1.x:** contains code for the **1.x** version of this package
39+
- **2.x:** contains code for the **1.x** version of this package
3940

4041
## Introduction
4142

composer.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@
1111
}
1212
],
1313
"require": {
14-
"php": ">=8.1.0"
14+
"php": ">=8.2.0"
1515
},
1616
"require-dev": {
17-
"phpunit/phpunit": "^10.0",
17+
"phpunit/phpunit": "^11.0",
1818
"php-coveralls/php-coveralls": "^2.0",
19-
"rector/rector": "^1.0.0",
20-
"vimeo/psalm": "^5.4"
19+
"vimeo/psalm": "^6.0",
20+
"rector/rector": "^2.0.17"
2121
},
2222
"autoload": {
2323
"classmap": [ "src/" ]
@@ -32,7 +32,7 @@
3232
"vendor/bin/phpunit --coverage-text"
3333
],
3434
"rector-clear": "vendor/bin/rector --clear-cache",
35-
"rector": "vendor/bin/rector process src --dry-run -vvv",
35+
"rector": "vendor/bin/rector process src --dry-run",
3636
"psalm-clear-cache": "vendor/bin/psalm --clear-global-cache && vendor/bin/psalm --clear-cache",
3737
"psalm": "composer psalm-clear-cache && vendor/bin/psalm --threads=1",
3838
"qa": "composer test && composer rector && composer psalm"

rector.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@
1919
$rectorConfigurator->import(SetList::PHP_74);
2020
$rectorConfigurator->import(SetList::PHP_80);
2121
$rectorConfigurator->import(SetList::PHP_81);
22+
$rectorConfigurator->import(SetList::PHP_82);
2223
$rectorConfigurator->import(SetList::DEAD_CODE);
23-
//$rectorConfigurator->import(SetList::PSR_4);
24+
$rectorConfigurator->import(SetList::CODE_QUALITY);
2425
$rectorConfigurator->import(SetList::TYPE_DECLARATION);
2526

2627
$rectorConfigurator->skip([

src/CallableExecutionTimer.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
/**
77
* A class that can be used to call any function or method while tracking the execution time of each call
88
*
9+
* @psalm-suppress ClassMustBeFinal
910
* @psalm-suppress MixedAssignment
1011
*
1112
*
@@ -74,6 +75,7 @@ public function getCalleeBacktraceData(): array {
7475
*
7576
* @throws \Exception from ObjectifiedCallable::__call
7677
*/
78+
#[\Override]
7779
public function __call(string $method, array $args): mixed {
7880

7981
if($this->calleeBacktraceData === []) {
@@ -101,6 +103,7 @@ public function __call(string $method, array $args): mixed {
101103
*
102104
* @return mixed result returned from executing function / method registered on an instance of this class
103105
*/
106+
#[\Override]
104107
public function __invoke(array $args): mixed {
105108

106109
$argsCopy = [];

src/Utils.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55

66
/**
77
* Description of Utils
8+
*
9+
* @psalm-suppress ClassMustBeFinal
810
*
911
* @author Rotimi Ade
1012
*/

0 commit comments

Comments
 (0)