Skip to content

Commit c3ecac7

Browse files
committed
upgrade: only tests on php 8.0+
1 parent 1fcb150 commit c3ecac7

File tree

5 files changed

+15
-10
lines changed

5 files changed

+15
-10
lines changed

.github/workflows/php.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,17 @@ jobs:
1616
strategy:
1717
fail-fast: true
1818
matrix:
19-
php: [7.3, 7.4, '8.0', 8.1] # 7.2,
19+
php: ['8.0', 8.1] # 7.2,
2020
# os: [ubuntu-latest] # , macOS-latest, windows-latest,
2121
coverage: ['none']
2222
include:
2323
- description: 'Log Code Coverage'
2424
php: '8.0'
2525
coverage: 'xdebug'
2626
# will not testing on php 7.2
27-
- os: 'ubuntu-latest'
28-
php: '7.2'
29-
phpunit: '8.5.13'
27+
# - os: 'ubuntu-latest'
28+
# php: '7.2'
29+
# phpunit: '8.5.13'
3030

3131
steps:
3232
- name: Checkout

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ Generic PHP command line flags parse library
3939

4040
## Install
4141

42+
- Require PHP 8.0+
43+
4244
**composer**
4345

4446
```bash

README.zh-CN.md

+2
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@
4040

4141
## 安装
4242

43+
- Require PHP 8.0+
44+
4345
**composer 安装**
4446

4547
```bash

composer.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,18 @@
33
"description": "Command line flag parse library of the php",
44
"type": "library",
55
"license": "MIT",
6-
"homepage": "https://github.com/php-toolkit/pflag.git",
6+
"homepage": "https://github.com/php-toolkit/pflag",
77
"authors": [
88
{
99
"name": "inhere",
1010
"email": "[email protected]"
1111
}
1212
],
1313
"require": {
14-
"php": ">7.2.0",
14+
"php": ">8.0.0",
1515
"ext-mbstring": "*",
16-
"toolkit/cli-utils":"~1.0",
17-
"toolkit/stdlib":"~1.0"
16+
"toolkit/cli-utils":"~2.0",
17+
"toolkit/stdlib":"~2.0"
1818
},
1919
"autoload": {
2020
"psr-4": {

src/CliApp.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
use Toolkit\Cli\Cli;
1010
use Toolkit\Cli\Color;
1111
use Toolkit\Stdlib\Arr;
12+
use Toolkit\Stdlib\Obj\Traits\AutoConfigTrait;
1213
use function array_merge;
1314
use function array_shift;
1415
use function basename;
@@ -32,10 +33,10 @@
3233
*/
3334
class CliApp
3435
{
35-
// use AutoConfigTrait;
36+
use AutoConfigTrait;
3637

3738
/** @var self|null */
38-
private static $global;
39+
private static self|null $global = null;
3940

4041
private const COMMAND_CONFIG = [
4142
'desc' => '',

0 commit comments

Comments
 (0)