Skip to content

Commit f94dc78

Browse files
committed
Merge branch 'develop'
* develop: specify next release add missing change add workflow to create releases reuse CI workflow update dependencies use innmind/static-analysis use blackbox 6 use date range for the license copyright fix php 8.4 deprecations CS
2 parents 9a33e50 + 0d5f90f commit f94dc78

21 files changed

+1234
-2101
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 & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
11
/composer.lock
22
/vendor
3-
.phpunit.result.cache
4-
.phpunit.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+
## 3.2.0 - 2025-08-09
4+
5+
### Changed
6+
7+
- Requires `innmind/foundation:^1.7.1`
8+
9+
### Fixed
10+
11+
- PHP `8.4` deprecations
12+
313
## 3.1.0 - 2023-09-23
414

515
### Added

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) 2019
3+
Copyright (c) 2019-present Innmind
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

blackbox.php

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
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+
->when(
14+
\getenv('ENABLE_COVERAGE') !== false,
15+
static fn(Application $app) => $app
16+
->codeCoverage(
17+
CodeCoverage::of(
18+
__DIR__.'/src/',
19+
__DIR__.'/tests/',
20+
)
21+
->dumpTo('coverage.clover')
22+
->enableWhen(true),
23+
)
24+
->scenariiPerProof(1),
25+
)
26+
->tryToProve(Load::directory(__DIR__.'/tests/'))
27+
->exit();

composer.json

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,8 @@
1616
},
1717
"require": {
1818
"php": "~8.2",
19-
"innmind/immutable": "~4.2|~5.0",
20-
"innmind/git": "^3.0.2",
21-
"innmind/cli": "~3.0"
19+
"innmind/foundation": "^1.7.1",
20+
"innmind/git": "~4.0"
2221
},
2322
"autoload": {
2423
"psr-4": {
@@ -32,9 +31,8 @@
3231
}
3332
},
3433
"require-dev": {
35-
"phpunit/phpunit": "~10.2",
36-
"vimeo/psalm": "~5.15",
37-
"innmind/black-box": "~5.5",
34+
"innmind/static-analysis": "^1.2.1",
35+
"innmind/black-box": "~6.5",
3836
"innmind/coding-standard": "~2.0"
3937
},
4038
"bin": ["git-release"]

phpunit.xml.dist

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

src/Command/Bugfix.php

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,13 @@
66
use Innmind\GitRelease\Release;
77
use Innmind\CLI\{
88
Command,
9+
Command\Name,
10+
Command\Usage,
911
Console,
1012
};
13+
use Innmind\Immutable\Attempt;
1114

15+
#[Name('bugfix', 'Create a new bugfix tag and push it')]
1216
final class Bugfix implements Command
1317
{
1418
private Release $release;
@@ -18,7 +22,8 @@ public function __construct(Release $release)
1822
$this->release = $release;
1923
}
2024

21-
public function __invoke(Console $console): Console
25+
#[\Override]
26+
public function __invoke(Console $console): Attempt
2227
{
2328
return ($this->release)(
2429
$console,
@@ -29,12 +34,11 @@ public function __invoke(Console $console): Console
2934
/**
3035
* @psalm-pure
3136
*/
32-
public function usage(): string
37+
#[\Override]
38+
public function usage(): Usage
3339
{
34-
return <<<USAGE
35-
bugfix --no-sign --message=
36-
37-
Create a new bugfix tag and push it
38-
USAGE;
40+
return Usage::for(self::class)
41+
->flag('no-sign')
42+
->option('message');
3943
}
4044
}

src/Command/Major.php

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,13 @@
66
use Innmind\GitRelease\Release;
77
use Innmind\CLI\{
88
Command,
9+
Command\Name,
10+
Command\Usage,
911
Console,
1012
};
13+
use Innmind\Immutable\Attempt;
1114

15+
#[Name('major', 'Create a new major tag and push it')]
1216
final class Major implements Command
1317
{
1418
private Release $release;
@@ -18,7 +22,8 @@ public function __construct(Release $release)
1822
$this->release = $release;
1923
}
2024

21-
public function __invoke(Console $console): Console
25+
#[\Override]
26+
public function __invoke(Console $console): Attempt
2227
{
2328
return ($this->release)(
2429
$console,
@@ -29,12 +34,11 @@ public function __invoke(Console $console): Console
2934
/**
3035
* @psalm-pure
3136
*/
32-
public function usage(): string
37+
#[\Override]
38+
public function usage(): Usage
3339
{
34-
return <<<USAGE
35-
major --no-sign --message=
36-
37-
Create a new major tag and push it
38-
USAGE;
40+
return Usage::for(self::class)
41+
->flag('no-sign')
42+
->option('message');
3943
}
4044
}

0 commit comments

Comments
 (0)