Skip to content

Commit adc6ccc

Browse files
authored
build(php): Bump minimum PHP version to 8.2 (#7)
- Update `composer.json` to require PHP `^8.2` and `jbzoo/toolbox-dev ^7.3`. - Adjust GitHub Actions CI workflows to: - Run tests and linters against PHP 8.2, 8.3, and 8.4. - Remove support for PHP 8.1 from the test matrix. - Upgrade `actions/upload-artifact` to v4. - Remove the scheduled CI trigger, relying on PRs and pushes. - Add `contents: read` permission for improved security.
1 parent 29ea721 commit adc6ccc

File tree

4 files changed

+21
-15
lines changed

4 files changed

+21
-15
lines changed

.github/workflows/main.yml

Lines changed: 8 additions & 8 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: '55 */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 }}

README.dist.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
# JBZoo / __PACKAGE__
22

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

814

915
### Installing

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@
1919
"prefer-stable" : true,
2020

2121
"require" : {
22-
"php" : "^8.1"
22+
"php" : "^8.2"
2323
},
2424

2525
"require-dev" : {
26-
"jbzoo/toolbox-dev" : "^7.1"
26+
"jbzoo/toolbox-dev" : "^7.3"
2727
},
2828

2929
"autoload" : {

src/Exception.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@
1616

1717
namespace JBZoo\__NS__;
1818

19-
class Exception extends \RuntimeException
19+
final class Exception extends \RuntimeException
2020
{
2121
}

0 commit comments

Comments
 (0)