Skip to content

Commit 48f21c6

Browse files
committed
Merge branch 'develop'
* develop: specify next release fix readme update dependencies add workflow to create releases reuse CI workflow use innmind/static-analysis drop php 8.1 support replace phpunit by blackbox remove unused dependency use date range for the license copyright fix php 8.4 deprecations CS
2 parents 6569758 + 86721f2 commit 48f21c6

25 files changed

Lines changed: 91 additions & 108 deletions

.gitattributes

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/.gitattributes export-ignore
22
/.gitignore export-ignore
3-
/phpunit.xml.dist export-ignore
43
/fixtures export-ignore
54
/tests export-ignore

.github/workflows/ci.yml

Lines changed: 9 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -3,62 +3,14 @@ name: CI
33
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.1', '8.2', '8.3']
12-
name: 'PHPUnit'
13-
steps:
14-
- name: Checkout
15-
uses: actions/checkout@v2
16-
- name: Setup PHP
17-
uses: shivammathur/setup-php@v2
18-
with:
19-
php-version: ${{ matrix.php-version }}
20-
extensions: mbstring, intl
21-
coverage: xdebug
22-
- name: Composer
23-
uses: "ramsey/composer-install@v2"
24-
- name: PHPUnit
25-
run: vendor/bin/phpunit --coverage-clover=coverage.clover
26-
- uses: codecov/codecov-action@v1
27-
with:
28-
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
2911
psalm:
30-
runs-on: ubuntu-latest
31-
strategy:
32-
matrix:
33-
php-version: ['8.1', '8.2', '8.3']
34-
name: 'Psalm'
35-
steps:
36-
- name: Checkout
37-
uses: actions/checkout@v2
38-
- name: Setup PHP
39-
uses: shivammathur/setup-php@v2
40-
with:
41-
php-version: ${{ matrix.php-version }}
42-
extensions: mbstring, intl
43-
- name: Composer
44-
uses: "ramsey/composer-install@v2"
45-
- name: Psalm
46-
run: vendor/bin/psalm --shepherd
12+
uses: innmind/github-workflows/.github/workflows/psalm-matrix.yml@main
4713
cs:
48-
runs-on: ubuntu-latest
49-
strategy:
50-
matrix:
51-
php-version: ['8.1']
52-
name: 'CS'
53-
steps:
54-
- name: Checkout
55-
uses: actions/checkout@v2
56-
- name: Setup PHP
57-
uses: shivammathur/setup-php@v2
58-
with:
59-
php-version: ${{ matrix.php-version }}
60-
extensions: mbstring, intl
61-
- name: Composer
62-
uses: "ramsey/composer-install@v2"
63-
- name: CS
64-
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: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# Changelog
22

3+
## 3.3.0 - 2025-07-30
4+
5+
### Changed
6+
7+
- Requires PHP `~8.2`
8+
- Requires `innmind/foundation:~1.3`
9+
- Requires `innmind/graphviz:~4.0`
10+
11+
### Fixed
12+
13+
- PHP `8.4` deprecations
14+
315
## 3.2.0 - 2023-09-17
416

517
### 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) 2018
3+
Copyright (c) 2018-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: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,14 @@ Factory::build()
4141
->withShortOption('o', 'graph.svg')
4242
->withInput($render($objectGraph)),
4343
)
44+
->unwrap()
4445
->wait();
4546
```
4647

4748
This will generate a `graph.svg` file representing the object graph of your application.
4849

49-
> **Note** This example uses `innmind/operating-system` to generate the svg file but the package is not a direct dependency, you can use the content returned by `$render()` however you wish.
50+
> [!NOTE]
51+
> This example uses `innmind/operating-system` to generate the svg file but the package is not a direct dependency, you can use the content returned by `$render()` however you wish.
5052
51-
> **Note**: You can pass an implementation of [`RewriteLocation`](src/RewriteLocation.php) as the first argument of `Render` so you can rewrite the url to the class file that will be used in the generated graph (useful if you want to generate urls to [open the files directly in your IDE](https://github.com/sanduhrs/phpstorm-url-handler#usage)).
53+
> [!NOTE]
54+
> You can pass an implementation of [`RewriteLocation`](src/RewriteLocation.php) as the first argument of `Render` so you can rewrite the url to the class file that will be used in the generated graph (useful if you want to generate urls to [open the files directly in your IDE](https://github.com/sanduhrs/phpstorm-url-handler#usage)).

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: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,8 @@
1616
},
1717
"require": {
1818
"php": "~8.1",
19-
"innmind/immutable": "~4.13|~5.0",
20-
"innmind/reflection": "~5.0",
21-
"innmind/graphviz": "~3.2",
22-
"innmind/url": "~4.1"
19+
"innmind/foundation": "~1.3",
20+
"innmind/graphviz": "~4.0"
2321
},
2422
"autoload": {
2523
"psr-4": {
@@ -33,9 +31,8 @@
3331
}
3432
},
3533
"require-dev": {
36-
"phpunit/phpunit": "~9.0",
37-
"vimeo/psalm": "~5.6",
38-
"innmind/coding-standard": "~2.0",
39-
"symfony/var-dumper": "^6.2"
34+
"innmind/black-box": "^6.4.1",
35+
"innmind/static-analysis": "^1.2.1",
36+
"innmind/coding-standard": "~2.0"
4037
}
4138
}

fixtures/Foo.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ final class Foo
88
private $a;
99
private $b;
1010

11-
public function __construct(self $a = null, self $b = null)
11+
public function __construct(?self $a = null, ?self $b = null)
1212
{
1313
$this->a = $a;
1414
$this->b = $b;

0 commit comments

Comments
 (0)