Skip to content

Commit 0ef1a2c

Browse files
authored
Merge pull request #27 from acelaya-forks/feature/phpunit-10
Update to PHPUnit 10
2 parents b72ec7b + 1da1577 commit 0ef1a2c

File tree

5 files changed

+27
-23
lines changed

5 files changed

+27
-23
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,36 +7,20 @@ on:
77
- main
88

99
jobs:
10-
lint:
11-
runs-on: ubuntu-22.04
12-
strategy:
13-
matrix:
14-
php-version: ['8.1', '8.2']
15-
steps:
16-
- name: Checkout code
17-
uses: actions/checkout@v2
18-
- name: Use PHP
19-
uses: shivammathur/setup-php@v2
20-
with:
21-
php-version: ${{ matrix.php-version }}
22-
tools: composer
23-
coverage: none
24-
- run: composer install --no-interaction --prefer-dist
25-
- run: composer cs
26-
2710
static-analysis:
2811
runs-on: ubuntu-22.04
2912
strategy:
3013
matrix:
3114
php-version: ['8.1', '8.2']
15+
tool: ['cs', 'stan']
3216
steps:
3317
- name: Checkout code
34-
uses: actions/checkout@v2
18+
uses: actions/checkout@v3
3519
- name: Use PHP
3620
uses: shivammathur/setup-php@v2
3721
with:
3822
php-version: ${{ matrix.php-version }}
3923
tools: composer
4024
coverage: none
4125
- run: composer install --no-interaction --prefer-dist
42-
- run: composer stan
26+
- run: composer ${{ matrix.tool }}

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,23 @@ All notable changes to this project will be documented in this file.
44

55
The format is based on [Keep a Changelog](https://keepachangelog.com), and this project adheres to [Semantic Versioning](https://semver.org).
66

7+
## [3.5.0] - 2023-02-08
8+
### Added
9+
* *Nothing*
10+
11+
### Changed
12+
* Updated to PHPUnit 10
13+
14+
### Deprecated
15+
* *Nothing*
16+
17+
### Removed
18+
* *Nothing*
19+
20+
### Fixed
21+
* *Nothing*
22+
23+
724
## [3.4.0] - 2023-01-21
825
### Added
926
* Allowed User Agent to be provided to `ApiTestCase::callShortUrl`.

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"doctrine/orm": "^2.14",
1919
"fig/http-message-util": "^1.1",
2020
"guzzlehttp/guzzle": "^7.5",
21-
"phpunit/phpunit": "^9.5",
21+
"phpunit/phpunit": "^10.0",
2222
"symfony/process": "^6.2"
2323
},
2424
"require-dev": {

src/DbTest/DatabaseTestCase.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
namespace Shlinkio\Shlink\TestUtils\DbTest;
66

77
use Doctrine\ORM\EntityManagerInterface;
8+
use PHPUnit\Framework\Attributes\After;
9+
use PHPUnit\Framework\Attributes\Before;
810
use PHPUnit\Framework\TestCase;
911
use Shlinkio\Shlink\TestUtils\Exception\MissingDependencyException;
1012

@@ -26,13 +28,13 @@ final protected function getEntityManager(): EntityManagerInterface
2628
return self::$em;
2729
}
2830

29-
/** @before */
31+
#[Before]
3032
final public function beginTransaction(): void
3133
{
3234
$this->getEntityManager()->beginTransaction();
3335
}
3436

35-
/** @after */
37+
#[After]
3638
final public function rollback(): void
3739
{
3840
$this->getEntityManager()->rollback();

src/Helper/SeededTestCase.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
namespace Shlinkio\Shlink\TestUtils\Helper;
66

77
use Closure;
8+
use PHPUnit\Framework\Attributes\Before;
89
use PHPUnit\Framework\TestCase;
910

1011
abstract class SeededTestCase extends TestCase
@@ -19,7 +20,7 @@ public static function setSeedFixturesCallback(callable $seedFixtures): void
1920
self::$seedFixtures = Closure::fromCallable($seedFixtures);
2021
}
2122

22-
/** @before */
23+
#[Before]
2324
final public function seedFixturesIfProvided(): void
2425
{
2526
if (self::$seedFixtures !== null) {

0 commit comments

Comments
 (0)