Skip to content

Commit e1823e8

Browse files
authored
Merge pull request #26 from macocci7/upgrade_dependencies
Upgrade dependencies
2 parents 116e3c5 + 49d268f commit e1823e8

File tree

8 files changed

+62
-61
lines changed

8 files changed

+62
-61
lines changed

.github/workflows/tag_meged_pull_request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: Set up PHP
1919
uses: shivammathur/setup-php@v2
2020
with:
21-
php-version: 8.2
21+
php-version: 8.3
2222
coverage: xdebug
2323
tools: composer:v2
2424

.github/workflows/test_pull_request.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
- name: Set up PHP
1212
uses: shivammathur/setup-php@v2
1313
with:
14-
php-version: 8.2
14+
php-version: 8.3
1515
tools: composer:v2
1616

1717
- name: Checkout code
@@ -52,7 +52,7 @@ jobs:
5252
runs-on: ubuntu-latest
5353
strategy:
5454
matrix:
55-
php: ['8.1', '8.2', '8.3']
55+
php: ['8.1', '8.2', '8.3', '8.4']
5656

5757
steps:
5858
- name: Set up PHP
@@ -65,7 +65,7 @@ jobs:
6565
- name: Set up Node
6666
uses: actions/setup-node@v4
6767
with:
68-
node-version: '14.x'
68+
node-version: '20.x'
6969

7070
- name: Checkout code
7171
uses: actions/checkout@v4
@@ -88,10 +88,10 @@ jobs:
8888
#- name: Neon Lint
8989
# run: ./vendor/nette/neon/bin/neon-lint conf
9090

91-
- name: PHP MD
92-
run: |
93-
./vendor/bin/phpmd --version
94-
./vendor/bin/phpmd ./src/ ./examples/ ./tests/ text phpmd.xml
91+
#- name: PHP MD
92+
# run: |
93+
# ./vendor/bin/phpmd --version
94+
# ./vendor/bin/phpmd ./src/ ./examples/ ./tests/ text phpmd.xml
9595

9696
- name: PHP Code Sniffer
9797
run: |
@@ -115,7 +115,7 @@ jobs:
115115
runs-on: ubuntu-latest
116116
strategy:
117117
matrix:
118-
php: ['8.1']
118+
php: ['8.3']
119119

120120
steps:
121121
- name: Set up PHP
@@ -128,7 +128,7 @@ jobs:
128128
- name: Set up Node
129129
uses: actions/setup-node@v4
130130
with:
131-
node-version: '14.x'
131+
node-version: '20.x'
132132

133133
- name: Checkout code
134134
uses: actions/checkout@v4

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
/vendor/
22
composer.lock
3-
.php-version
3+
.php-version
4+
.tool-versions

PHP_VERSIONS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
8.4
12
8.3
23
8.2
34
8.1

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -980,6 +980,6 @@ with patterns of `size`, `color` and `amount`.
980980

981981
*Document Created: 2023/11/11*
982982

983-
*Document Updated: 2024/05/15*
983+
*Document Updated: 2025/01/04*
984984

985-
Copyright 2023 - 2024 macocci7
985+
Copyright 2023 - 2025 macocci7

bin/TestAndLint.sh

Lines changed: 7 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
#!/usr/bin/bash
22

33
# Script to Test and Lint
4-
# - for the repository: macocci7/php-combination
54
# requirement:
6-
# - phpenv/phpenv
5+
# - https://github.com/jdx/mise installed
76
# - PHP versions defined in ../PHP_VERSIONS installed
87

9-
CMD=phpenv
8+
CMD=mise
109
$CMD -v &> /dev/null
1110
if [ $? -ne 0 ]; then
1211
echo "command [${CMD}] not found!"
@@ -20,46 +19,13 @@ if [ $? -ne 0 ]; then
2019
exit 1
2120
fi
2221

23-
test_and_lint() {
22+
switch_version() {
2423
echo "==========================================================="
25-
echo "[PHP $1][phpenv local $1]"
26-
phpenv local $1
27-
if [ $? -ne 0 ]; then
28-
echo "Failed to switch version to $i. skipped."
29-
return 1
30-
fi
31-
echo "-----------------------------------------------------------"
32-
echo "[PHP $1][php -v]"
33-
php -v
34-
echo "-----------------------------------------------------------"
35-
echo "[PHP $1][parallel-lint]"
36-
./vendor/bin/parallel-lint src tests examples
37-
#echo "-----------------------------------------------------------"
38-
#echo "[PHP $1][neon-lint]"
39-
#./vendor/nette/neon/bin/neon-lint conf
40-
echo "-----------------------------------------------------------"
41-
echo "[PHP $1][phpcs]"
42-
./vendor/bin/phpcs --ignore=vendor \
43-
--standard=phpcs.xml \
44-
-p \
45-
-s \
46-
.
47-
echo "-----------------------------------------------------------"
48-
echo "[PHP $1][phpmd]"
49-
./vendor/bin/phpmd \
50-
./src/ ./examples/ ./tests/ text \
51-
phpmd.xml
52-
echo "-----------------------------------------------------------"
53-
echo "[PHP $1][phpstan]"
54-
./vendor/bin/phpstan analyze -c phpstan.neon
55-
echo "-----------------------------------------------------------"
56-
echo "[PHP $1][phpunit]"
57-
./vendor/bin/phpunit ./tests/ \
58-
--color=auto
59-
echo "-----------------------------------------------------------"
24+
echo "[PHP $1][Switching PHP version to $1]"
25+
mise x php@$1 -- bash bin/TestAndLintSub.sh $1;
6026
}
6127

62-
echo "[[TesAndLint.sh]]"
28+
echo "[[TestAndLint.sh]]"
6329

6430
SUPPORTED_PHP_VERSIONS=PHP_VERSIONS
6531
if [ ! -f $SUPPORTED_PHP_VERSIONS ]; then
@@ -74,6 +40,6 @@ if [ ! -r $SUPPORTED_PHP_VERSIONS ]; then
7440
fi
7541
STR_CMD=''
7642
while read version ; do
77-
STR_CMD="$STR_CMD test_and_lint $version;"
43+
STR_CMD="$STR_CMD switch_version $version;"
7844
done < $SUPPORTED_PHP_VERSIONS
7945
eval $STR_CMD

bin/TestAndLintSub.sh

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#!/usr/bin/bash
2+
3+
# Script to Test and Lint
4+
# requirement:
5+
# - PHP versions defined in ../PHP_VERSIONS installed
6+
7+
echo "-----------------------------------------------------------"
8+
echo "[PHP $1][php -v]"
9+
php -v
10+
echo "-----------------------------------------------------------"
11+
echo "[PHP $1][parallel-lint]"
12+
./vendor/bin/parallel-lint src tests examples
13+
#echo "-----------------------------------------------------------"
14+
#echo "[PHP $1][neon-lint]"
15+
#./vendor/nette/neon/bin/neon-lint conf
16+
echo "-----------------------------------------------------------"
17+
echo "[PHP $1][phpcs]"
18+
./vendor/bin/phpcs --ignore=vendor \
19+
--standard=phpcs.xml \
20+
-p \
21+
-s \
22+
.
23+
#echo "-----------------------------------------------------------"
24+
#echo "[PHP $1][phpmd]"
25+
#./vendor/bin/phpmd \
26+
# ./src/ ./examples/ ./tests/ text \
27+
# phpmd.xml
28+
echo "-----------------------------------------------------------"
29+
echo "[PHP $1][phpstan]"
30+
./vendor/bin/phpstan analyze -c phpstan.neon
31+
echo "-----------------------------------------------------------"
32+
echo "[PHP $1][phpunit]"
33+
./vendor/bin/phpunit ./tests/
34+
echo "-----------------------------------------------------------"

composer.json

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "macocci7/php-combination",
3-
"version": "1.1.0",
4-
"description": "a simple PHP library to make combinations",
3+
"version": "1.1.1",
4+
"description": "A simple PHP library to make combinations from array elements.",
55
"type": "library",
66
"license": "MIT",
77
"autoload": {
@@ -17,12 +17,11 @@
1717
],
1818
"minimum-stability": "stable",
1919
"require-dev": {
20-
"squizlabs/php_codesniffer": "^3.7",
20+
"squizlabs/php_codesniffer": "^3.11",
2121
"phpunit/phpunit": "^10.5",
22-
"phpmd/phpmd": "^2.15",
23-
"phpstan/phpstan": "^1.10",
24-
"php-parallel-lint/php-parallel-lint": "^1.3",
25-
"monolog/monolog": "^3.5"
22+
"phpstan/phpstan": "^2.1",
23+
"php-parallel-lint/php-parallel-lint": "^1.4",
24+
"monolog/monolog": "^3.8"
2625
},
2726
"require": {
2827
"php": ">=8.1"

0 commit comments

Comments
 (0)