Skip to content

Commit 9bda792

Browse files
authored
Merge pull request #37 from JBZoo/release/8.0
8.0.0 — PHP 8.3+ floor & lock-step major
2 parents d1d80a9 + d66c014 commit 9bda792

7 files changed

Lines changed: 49 additions & 39 deletions

File tree

.github/workflows/main.yml

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,15 @@ permissions:
1515
contents: read
1616

1717
on:
18+
schedule:
19+
- cron: '0 4 * * *' # daily 04:00 UTC canary keepalive
1820
pull_request:
1921
branches:
2022
- "*"
2123
push:
2224
branches:
2325
- 'master'
26+
workflow_dispatch: {}
2427

2528
env:
2629
COLUMNS: 120
@@ -34,12 +37,12 @@ jobs:
3437
JBZOO_COMPOSER_UPDATE_FLAGS: ${{ matrix.composer_flags }}
3538
strategy:
3639
matrix:
37-
php-version: [ 8.2, 8.3, 8.4 ]
40+
php-version: [ 8.3, 8.4, 8.5 ]
3841
coverage: [ xdebug, none ]
3942
composer_flags: [ "--prefer-lowest", "" ]
4043
steps:
4144
- name: Checkout code
42-
uses: actions/checkout@v3
45+
uses: actions/checkout@v7
4346
with:
4447
fetch-depth: 0
4548

@@ -71,22 +74,23 @@ jobs:
7174
run: make report-coveralls --no-print-directory || true
7275

7376
- name: Upload Artifacts
74-
uses: actions/upload-artifact@v4
77+
uses: actions/upload-artifact@v7
7578
continue-on-error: true
7679
with:
7780
name: PHPUnit - ${{ matrix.php-version }} - ${{ matrix.coverage }}
7881
path: build/
82+
overwrite: true
7983

8084

8185
linters:
8286
name: Linters
8387
runs-on: ubuntu-latest
8488
strategy:
8589
matrix:
86-
php-version: [ 8.2, 8.3, 8.4 ]
90+
php-version: [ 8.3, 8.4, 8.5 ]
8791
steps:
8892
- name: Checkout code
89-
uses: actions/checkout@v3
93+
uses: actions/checkout@v7
9094
with:
9195
fetch-depth: 0
9296

@@ -105,22 +109,23 @@ jobs:
105109
run: make codestyle --no-print-directory
106110

107111
- name: Upload Artifacts
108-
uses: actions/upload-artifact@v4
112+
uses: actions/upload-artifact@v7
109113
continue-on-error: true
110114
with:
111115
name: Linters - ${{ matrix.php-version }}
112116
path: build/
117+
overwrite: true
113118

114119

115120
report:
116121
name: Reports
117122
runs-on: ubuntu-latest
118123
strategy:
119124
matrix:
120-
php-version: [ 8.2, 8.3, 8.4 ]
125+
php-version: [ 8.3, 8.4, 8.5 ]
121126
steps:
122127
- name: Checkout code
123-
uses: actions/checkout@v3
128+
uses: actions/checkout@v7
124129
with:
125130
fetch-depth: 0
126131

@@ -139,8 +144,9 @@ jobs:
139144
run: make report-all --no-print-directory
140145

141146
- name: Upload Artifacts
142-
uses: actions/upload-artifact@v4
147+
uses: actions/upload-artifact@v7
143148
continue-on-error: true
144149
with:
145150
name: Reports - ${{ matrix.php-version }}
146151
path: build/
152+
overwrite: true

CLAUDE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,15 +87,15 @@ class MyFeatureTest extends PHPUnit
8787

8888
## Dependencies
8989

90-
- PHP 8.2+ required
90+
- PHP 8.3+ required
9191
- PHPUnit ^9.6.29 as core testing framework
9292
- JBZoo toolbox ecosystem (codestyle, markdown, etc.)
9393
- Development dependencies managed via jbzoo/toolbox-dev
9494

9595
## CI/CD
9696

9797
GitHub Actions workflow runs:
98-
- PHPUnit tests across PHP 8.1, 8.2, 8.3
98+
- PHPUnit tests across PHP 8.3, 8.4, 8.5
9999
- Code quality checks (linters)
100100
- Coverage reporting to Coveralls
101101
- Matrix testing with different Composer flags (--prefer-lowest)

README.md

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

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

614
PHPUnit toolbox with short assertion aliases and useful testing utilities. This library provides a more concise and readable way to write tests by offering shorter function names for common PHPUnit assertions.
715

@@ -11,7 +19,7 @@ PHPUnit toolbox with short assertion aliases and useful testing utilities. This
1119
- **Extended assertions** - Additional assertions for emails, dates, amounts, file contents
1220
- **Environment detection** - Detect if running under TeamCity, Travis, PhpStorm
1321
- **Built-in utilities** - Tools for test organization and debugging
14-
- **PHP 8.2+ support** - Modern PHP features and strict typing
22+
- **PHP 8.3+ support** - Modern PHP features and strict typing
1523

1624
## Installation
1725

@@ -152,7 +160,7 @@ class PackageTest extends PHPUnit
152160

153161
## Requirements
154162

155-
- PHP 8.2 or higher
163+
- PHP 8.3 or higher
156164
- PHPUnit ^9.6.29
157165
- ext-filter, ext-mbstring
158166

composer.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,21 +26,21 @@
2626
"prefer-stable" : true,
2727

2828
"require" : {
29-
"php" : "^8.2",
29+
"php" : "^8.3",
3030
"ext-filter" : "*",
3131
"ext-mbstring" : "*",
3232

3333
"phpunit/phpunit" : "^11.5.41",
3434
"ulrichsg/getopt-php" : ">=4.0.4",
35-
"jbzoo/markdown" : "^7.0.1"
35+
"jbzoo/markdown" : "^8.0"
3636
},
3737

3838
"require-dev" : {
39-
"jbzoo/toolbox-dev" : "^7.1",
40-
"jbzoo/codestyle" : "^7.1.6",
41-
"jbzoo/http-client" : "^7.1",
42-
"jbzoo/data" : "^7.1",
43-
"jbzoo/utils" : "^7.2",
39+
"jbzoo/toolbox-dev" : "^8.0",
40+
"jbzoo/codestyle" : "^8.0",
41+
"jbzoo/data" : "^8.0",
42+
"jbzoo/utils" : "^8.0",
43+
"jbzoo/http-client" : "^8.0",
4444

4545
"guzzlehttp/guzzle" : ">=7.10.0",
4646
"symfony/process" : ">=7.3.4"
@@ -66,7 +66,7 @@
6666

6767
"extra" : {
6868
"branch-alias" : {
69-
"dev-master" : "7.x-dev"
69+
"dev-master" : "8.x-dev"
7070
}
7171
}
7272
}

phpunit.xml.dist

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,8 @@
1010
@copyright Copyright (C) JBZoo.com, All rights reserved.
1111
@see https://github.com/JBZoo/PHPUnit
1212
-->
13-
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
14-
bootstrap="tests/autoload.php"
15-
verbose="true"
16-
colors="true"
17-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
18-
>
19-
<coverage processUncoveredFiles="true">
20-
<include>
21-
<directory suffix=".php">src</directory>
22-
</include>
13+
<phpunit bootstrap="tests/autoload.php" colors="true">
14+
<coverage>
2315
<report>
2416
<clover outputFile="build/coverage_xml/main.xml"/>
2517
<html outputDirectory="build/coverage_html" lowUpperBound="75" highLowerBound="95"/>
@@ -37,4 +29,10 @@
3729
<logging>
3830
<junit outputFile="build/coverage_junit/main.xml"/>
3931
</logging>
32+
33+
<source>
34+
<include>
35+
<directory suffix=".php">src</directory>
36+
</include>
37+
</source>
4038
</phpunit>

src/fake-index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777

7878
$cliOptions->process(Env::string('PHPUNINT_ARGUMENTS'));
7979

80-
$realIndex = (string)($realIndex ?? \realpath($cliOptions->getOption('index')));
80+
$realIndex = (string)($realIndex ?? \realpath((string)$cliOptions->getOption('index')));
8181

8282
if (\class_exists(CovCatcher::class) && Sys::hasXdebug()) {
8383
$testname = (string)data($_REQUEST)->get('testname');

src/functions/aliases.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,10 @@ function isFalse(mixed $value, string $message = ''): void
7878
}
7979

8080
/**
81-
* @param string $expected
82-
* @param mixed $className
81+
* @param class-string $expected
82+
* @param mixed $className
8383
*
84-
* @psalm-template ExpectedType of object
85-
* @psalm-param class-string<ExpectedType> $expected
86-
* @phan-suppress PhanPluginCanUseParamType
84+
* @phan-suppress PhanPluginCanUseParamType
8785
*/
8886
function isClass($expected, $className, string $message = ''): void
8987
{

0 commit comments

Comments
 (0)