Skip to content

Commit bce1c65

Browse files
committed
Merge branch 'develop'
* develop: specify next release fix readme use more expressive int type use promoted properties add NoDiscard attribute on mutation free methods update dependencies add workflow to create releases reuse CI workflow use innmind/static-analysis replace phpunit by blackbox use date range for the license copyright fix php 8.4 deprecations CS
2 parents a21d6b1 + 7ed2c67 commit bce1c65

28 files changed

+207
-222
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,16 @@
11
name: CI
22

3-
on: [push]
3+
on: [push, pull_request]
44

55
jobs:
6-
phpunit:
7-
runs-on: ${{ matrix.os }}
8-
strategy:
9-
matrix:
10-
os: [ubuntu-latest, macOS-latest]
11-
php-version: ['8.2', '8.3']
12-
dependencies: ['lowest', 'highest']
13-
name: 'PHPUnit'
14-
steps:
15-
- name: Checkout
16-
uses: actions/checkout@v2
17-
- name: Setup PHP
18-
uses: shivammathur/setup-php@v2
19-
with:
20-
php-version: ${{ matrix.php-version }}
21-
extensions: mbstring, intl
22-
coverage: xdebug
23-
- name: Composer
24-
uses: "ramsey/composer-install@v2"
25-
with:
26-
dependency-versions: ${{ matrix.dependencies }}
27-
- name: PHPUnit
28-
run: vendor/bin/phpunit --coverage-clover=coverage.clover
29-
- uses: codecov/codecov-action@v1
30-
with:
31-
token: ${{ secrets.CODECOV_TOKEN }}
6+
blackbox:
7+
uses: innmind/github-workflows/.github/workflows/black-box-matrix.yml@main
8+
coverage:
9+
uses: innmind/github-workflows/.github/workflows/coverage-matrix.yml@main
10+
secrets: inherit
3211
psalm:
33-
runs-on: ubuntu-latest
34-
strategy:
35-
matrix:
36-
php-version: ['8.2', '8.3']
37-
dependencies: ['lowest', 'highest']
38-
name: 'Psalm'
39-
steps:
40-
- name: Checkout
41-
uses: actions/checkout@v2
42-
- name: Setup PHP
43-
uses: shivammathur/setup-php@v2
44-
with:
45-
php-version: ${{ matrix.php-version }}
46-
extensions: mbstring, intl
47-
- name: Composer
48-
uses: "ramsey/composer-install@v2"
49-
with:
50-
dependency-versions: ${{ matrix.dependencies }}
51-
- name: Psalm
52-
run: vendor/bin/psalm --shepherd
12+
uses: innmind/github-workflows/.github/workflows/psalm-matrix.yml@main
5313
cs:
54-
runs-on: ubuntu-latest
55-
strategy:
56-
matrix:
57-
php-version: ['8.2']
58-
name: 'CS'
59-
steps:
60-
- name: Checkout
61-
uses: actions/checkout@v2
62-
- name: Setup PHP
63-
uses: shivammathur/setup-php@v2
64-
with:
65-
php-version: ${{ matrix.php-version }}
66-
extensions: mbstring, intl
67-
- name: Composer
68-
uses: "ramsey/composer-install@v2"
69-
- name: CS
70-
run: vendor/bin/php-cs-fixer fix --diff --dry-run
14+
uses: innmind/github-workflows/.github/workflows/cs.yml@main
15+
with:
16+
php-version: '8.2'

.github/workflows/release.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: Create release
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
jobs:
9+
release:
10+
uses: innmind/github-workflows/.github/workflows/release.yml@main
11+
secrets: inherit

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
composer.lock
22
vendor/
3-
.phpunit.result.cache

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# Changelog
22

3+
## 6.3.0 - 2025-07-31
4+
5+
### Changed
6+
7+
- Requires `innmind/foundation:~1.3`
8+
9+
### Fixed
10+
11+
- PHP `8.4` deprecations
12+
313
## 6.2.0 - 2023-11-01
414

515
### Changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2017
3+
Copyright (c) 2017-present
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,5 @@ $robots->disallows('My user agent', Url::of('/humans.txt')); //false
3232
$robots->disallows('My user agent', Url::of('/any/other/url')); //true
3333
```
3434

35-
**Note**: Here only the path `/humans.txt` is allowed because by default github disallows any user agent to crawl there website except for this file.
35+
> [!NOTE]
36+
> Here only the path `/humans.txt` is allowed because by default github disallows any user agent to crawl there website except for this file.

blackbox.php

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?php
2+
declare(strict_types = 1);
3+
4+
require 'vendor/autoload.php';
5+
6+
use Innmind\BlackBox\{
7+
Application,
8+
PHPUnit\Load,
9+
Runner\CodeCoverage,
10+
};
11+
12+
Application::new($argv)
13+
->disableMemoryLimit()
14+
->when(
15+
\getenv('ENABLE_COVERAGE') !== false,
16+
static fn(Application $app) => $app
17+
->codeCoverage(
18+
CodeCoverage::of(
19+
__DIR__.'/src/',
20+
__DIR__.'/tests/',
21+
)
22+
->dumpTo('coverage.clover')
23+
->enableWhen(true),
24+
)
25+
->scenariiPerProof(1),
26+
)
27+
->tryToProve(Load::directory(__DIR__.'/tests/'))
28+
->exit();

composer.json

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,11 @@
2424
},
2525
"require": {
2626
"php": "~8.2",
27-
"innmind/url": "~4.1",
28-
"innmind/immutable": "~4.13|~5.0",
29-
"innmind/http-transport": "~7.0"
27+
"innmind/foundation": "~1.3"
3028
},
3129
"require-dev": {
32-
"phpunit/phpunit": "~9.0",
33-
"vimeo/psalm": "~5.15",
30+
"innmind/black-box": "^6.4.1",
31+
"innmind/static-analysis": "^1.2.1",
3432
"innmind/coding-standard": "~2.0"
3533
}
3634
}

phpunit.xml.dist

Lines changed: 0 additions & 17 deletions
This file was deleted.

psalm.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,7 @@
1414
<directory name="vendor" />
1515
</ignoreFiles>
1616
</projectFiles>
17+
<issueHandlers>
18+
<UndefinedAttributeClass errorLevel="suppress" />
19+
</issueHandlers>
1720
</psalm>

0 commit comments

Comments
 (0)