Skip to content

Commit 577cd15

Browse files
authored
build: Upgrade PHP and dependencies (#55)
- Bump PHP requirement from 8.1 to 8.2. - Update various Composer dependencies to their latest compatible versions. - Enhance CI workflow: - Update `actions/upload-artifact` to v4. - Add `contents: read` permission. - Remove scheduled cron job. - Adjust PHP matrix to include 8.4. - Introduce `--silent` CLI option for suppressing all output except errors. - Refactor internal code: - Add `final` keyword to exception classes. - Improve type hints and add Psalm suppressions. - Apply minor string concatenation style fixes. - Update `action.yml` and `README.md` to reflect new CLI options.
1 parent 18ff76a commit 577cd15

26 files changed

Lines changed: 2851 additions & 1502 deletions

.github/workflows/main.yml

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
#
1212

1313
name: CI
14+
permissions:
15+
contents: read
1416

1517
on:
1618
pull_request:
@@ -19,8 +21,6 @@ on:
1921
push:
2022
branches:
2123
- 'master'
22-
schedule:
23-
- cron: '30 */8 * * *'
2424

2525
env:
2626
COLUMNS: 120
@@ -34,7 +34,7 @@ jobs:
3434
JBZOO_COMPOSER_UPDATE_FLAGS: ${{ matrix.composer_flags }}
3535
strategy:
3636
matrix:
37-
php-version: [ 8.1, 8.2, 8.3 ]
37+
php-version: [ 8.2, 8.3, 8.4 ]
3838
coverage: [ xdebug, none ]
3939
composer_flags: [ "--prefer-lowest", "" ]
4040
steps:
@@ -65,7 +65,7 @@ jobs:
6565
run: make report-coveralls --no-print-directory || true
6666

6767
- name: Upload Artifacts
68-
uses: actions/upload-artifact@v3
68+
uses: actions/upload-artifact@v4
6969
continue-on-error: true
7070
with:
7171
name: PHPUnit - ${{ matrix.php-version }} - ${{ matrix.coverage }}
@@ -77,7 +77,7 @@ jobs:
7777
runs-on: ubuntu-latest
7878
strategy:
7979
matrix:
80-
php-version: [ 8.1, 8.2, 8.3 ]
80+
php-version: [ 8.2, 8.3, 8.4 ]
8181
steps:
8282
- name: Checkout code
8383
uses: actions/checkout@v3
@@ -99,7 +99,7 @@ jobs:
9999
run: make codestyle --no-print-directory
100100

101101
- name: Upload Artifacts
102-
uses: actions/upload-artifact@v3
102+
uses: actions/upload-artifact@v4
103103
continue-on-error: true
104104
with:
105105
name: Linters - ${{ matrix.php-version }}
@@ -111,7 +111,7 @@ jobs:
111111
runs-on: ubuntu-latest
112112
strategy:
113113
matrix:
114-
php-version: [ 8.1, 8.2, 8.3 ]
114+
php-version: [ 8.2, 8.3, 8.4 ]
115115
steps:
116116
- name: Checkout code
117117
uses: actions/checkout@v3
@@ -133,7 +133,7 @@ jobs:
133133
run: make report-all --no-print-directory
134134

135135
- name: Upload Artifacts
136-
uses: actions/upload-artifact@v3
136+
uses: actions/upload-artifact@v4
137137
continue-on-error: true
138138
with:
139139
name: Reports - ${{ matrix.php-version }}
@@ -143,10 +143,9 @@ jobs:
143143
phar:
144144
name: Phar
145145
runs-on: ubuntu-latest
146-
needs: [ phpunit, linters, report ]
147146
strategy:
148147
matrix:
149-
php-version: [ 8.1, 8.2, 8.3 ]
148+
php-version: [ 8.2, 8.3, 8.4 ]
150149
steps:
151150
- name: Checkout code
152151
uses: actions/checkout@v3
@@ -171,7 +170,7 @@ jobs:
171170
run: ./build/ci-report-converter.phar convert --help
172171

173172
- name: Upload Artifacts
174-
uses: actions/upload-artifact@v3
173+
uses: actions/upload-artifact@v4
175174
continue-on-error: true
176175
with:
177176
name: Reports - ${{ matrix.php-version }}
@@ -181,7 +180,6 @@ jobs:
181180
docker:
182181
name: Docker
183182
runs-on: ubuntu-latest
184-
needs: [ phar ]
185183
steps:
186184
- name: Checkout code
187185
uses: actions/checkout@v3

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
# @see https://github.com/JBZoo/CI-Report-Converter
1111
#
1212

13-
FROM php:8.1-cli-alpine
13+
FROM php:8.2-cli-alpine
1414
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
1515

1616
ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/

README.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
11
# JBZoo / CI-Report-Converter
22

3-
[![CI](https://github.com/JBZoo/CI-Report-Converter/actions/workflows/main.yml/badge.svg?branch=master)](https://github.com/JBZoo/CI-Report-Converter/actions/workflows/main.yml?query=branch%3Amaster) [![Coverage Status](https://coveralls.io/repos/github/JBZoo/CI-Report-Converter/badge.svg?branch=master)](https://coveralls.io/github/JBZoo/CI-Report-Converter?branch=master) [![Psalm Coverage](https://shepherd.dev/github/JBZoo/CI-Report-Converter/coverage.svg)](https://shepherd.dev/github/JBZoo/CI-Report-Converter) [![Psalm Level](https://shepherd.dev/github/JBZoo/CI-Report-Converter/level.svg)](https://shepherd.dev/github/JBZoo/CI-Report-Converter) [![CodeFactor](https://www.codefactor.io/repository/github/jbzoo/ci-report-converter/badge)](https://www.codefactor.io/repository/github/jbzoo/ci-report-converter/issues)
4-
[![Stable Version](https://poser.pugx.org/jbzoo/ci-report-converter/version)](https://packagist.org/packages/jbzoo/ci-report-converter/) [![Total Downloads](https://poser.pugx.org/jbzoo/ci-report-converter/downloads)](https://packagist.org/packages/jbzoo/ci-report-converter/stats) [![Docker Pulls](https://img.shields.io/docker/pulls/jbzoo/ci-report-converter.svg)](https://hub.docker.com/r/jbzoo/ci-report-converter) [![Dependents](https://poser.pugx.org/jbzoo/ci-report-converter/dependents)](https://packagist.org/packages/jbzoo/ci-report-converter/dependents?order_by=downloads) [![GitHub License](https://img.shields.io/github/license/jbzoo/ci-report-converter)](https://github.com/JBZoo/CI-Report-Converter/blob/master/LICENSE)
3+
[![CI](https://github.com/JBZoo/CI-Report-Converter/actions/workflows/main.yml/badge.svg?branch=master)](https://github.com/JBZoo/CI-Report-Converter/actions/workflows/main.yml?query=branch%3Amaster)
4+
[![Coverage Status](https://coveralls.io/repos/github/JBZoo/CI-Report-Converter/badge.svg?branch=master)](https://coveralls.io/github/JBZoo/CI-Report-Converter?branch=master)
5+
[![Psalm Coverage](https://shepherd.dev/github/JBZoo/CI-Report-Converter/coverage.svg)](https://shepherd.dev/github/JBZoo/CI-Report-Converter)
6+
[![Psalm Level](https://shepherd.dev/github/JBZoo/CI-Report-Converter/level.svg)](https://shepherd.dev/github/JBZoo/CI-Report-Converter)
7+
[![CodeFactor](https://www.codefactor.io/repository/github/jbzoo/ci-report-converter/badge)](https://www.codefactor.io/repository/github/jbzoo/ci-report-converter/issues)
8+
9+
[![Stable Version](https://poser.pugx.org/jbzoo/ci-report-converter/version)](https://packagist.org/packages/jbzoo/ci-report-converter/)
10+
[![Total Downloads](https://poser.pugx.org/jbzoo/ci-report-converter/downloads)](https://packagist.org/packages/jbzoo/ci-report-converter/stats)
11+
[![Docker Pulls](https://img.shields.io/docker/pulls/jbzoo/ci-report-converter.svg)](https://hub.docker.com/r/jbzoo/ci-report-converter)
12+
[![Dependents](https://poser.pugx.org/jbzoo/ci-report-converter/dependents)](https://packagist.org/packages/jbzoo/ci-report-converter/dependents?order_by=downloads)
13+
[![GitHub License](https://img.shields.io/github/license/jbzoo/ci-report-converter)](https://github.com/JBZoo/CI-Report-Converter/blob/master/LICENSE)
514

615

716
<!--ts-->
@@ -230,7 +239,8 @@ Options:
230239
[default: "text"]
231240
--cron Alias for --output-mode=cron. Deprecated!
232241
-h, --help Display help for the given command. When no command is given display help for the list command
233-
-q, --quiet Do not output any message
242+
--silent Do not output any message
243+
-q, --quiet Only errors are displayed. All other output is suppressed
234244
-V, --version Display this application version
235245
--ansi|--no-ansi Force (or disable --no-ansi) ANSI output
236246
-n, --no-interaction Do not ask any interactive question
@@ -273,7 +283,8 @@ Options:
273283
[default: "text"]
274284
--cron Alias for --output-mode=cron. Deprecated!
275285
-h, --help Display help for the given command. When no command is given display help for the list command
276-
-q, --quiet Do not output any message
286+
--silent Do not output any message
287+
-q, --quiet Only errors are displayed. All other output is suppressed
277288
-V, --version Display this application version
278289
--ansi|--no-ansi Force (or disable --no-ansi) ANSI output
279290
-n, --no-interaction Do not ask any interactive question

action.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ inputs:
3636
default: github-cli
3737
required: true
3838
root-path:
39-
description: If option is set, all absolute file paths will be converted to relative once.
40-
default: "."
39+
description: 'If option is set, all absolute file paths will be converted to relative once.'
40+
default: .
4141
suite-name:
42-
description: 'Set custom name of root group/suite (if it''s possible).'
42+
description: "Set custom name of root group/suite (if it's possible)."
4343
required: true
4444

4545
runs:

composer.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,22 +41,22 @@
4141
"prefer-stable" : true,
4242

4343
"require" : {
44-
"php" : "^8.1",
44+
"php" : "^8.2",
4545
"ext-dom" : "*",
4646
"ext-simplexml" : "*",
4747
"ext-hash" : "*",
4848

49-
"jbzoo/data" : "^7.1",
50-
"jbzoo/utils" : "^7.1",
51-
"jbzoo/cli" : "^7.1.8",
52-
"jbzoo/markdown" : "^7.0",
49+
"jbzoo/data" : "^7.2",
50+
"jbzoo/utils" : "^7.3",
51+
"jbzoo/cli" : "^7.2.4",
52+
"jbzoo/markdown" : "^7.0.1",
5353

54-
"symfony/console" : ">=6.4"
54+
"symfony/console" : ">=7.3.4"
5555
},
5656

5757
"require-dev" : {
58-
"jbzoo/toolbox-dev" : "^7.1",
59-
"jbzoo/mermaid-php" : "^7.2",
58+
"jbzoo/toolbox-dev" : "^7.3",
59+
"jbzoo/mermaid-php" : "^7.2.4",
6060
"roave/security-advisories" : "dev-master"
6161
},
6262

0 commit comments

Comments
 (0)