Skip to content

Commit 7009f01

Browse files
committed
Update for Symfony 7 and PHPUnit 12 compatibility
1 parent 4ed3e88 commit 7009f01

File tree

124 files changed

+1137
-906
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

124 files changed

+1137
-906
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
[![Build Status](https://img.shields.io/github/actions/workflow/status/php-tmdb/api/continuous-integration.yml?label=phpunit)](https://github.com/php-tmdb/api/actions/workflows/continuous-integration.yml)
66
[![Build Status](https://img.shields.io/github/actions/workflow/status/php-tmdb/api/coding-standards.yml?label=phpcs)](https://github.com/php-tmdb/api/actions/workflows/coding-standards.yml)
77
[![codecov](https://img.shields.io/codecov/c/github/php-tmdb/api?token=gTM9AiO5vH)](https://codecov.io/gh/php-tmdb/api)
8-
[![PHP](https://img.shields.io/badge/php->=8.1-8892BF.svg)](https://packagist.org/packages/php-tmdb/api)
8+
[![PHP](https://img.shields.io/badge/php->=8.2-8892BF.svg)](https://packagist.org/packages/php-tmdb/api)
99
[![Total Downloads](https://poser.pugx.org/php-tmdb/api/downloads.svg)](https://packagist.org/packages/php-tmdb/api)
1010

1111
Tests run with minimal, normal and development dependencies.

UPGRADE-CURRENT.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,6 @@
44

55
- Removed `rtheunissen/guzzle-log-middleware` dependency due to compatibility issues with Guzzle 7.0. This middleware is temporarily removed and may be reintroduced in a future release once compatibility is resolved.
66
- Added support for Symfony 7 components. Note that Symfony 7 requires PHP 8.1 or higher. If you're using PHP < 8.1, Composer will automatically select a compatible Symfony version (4, 5, or 6).
7-
- Dropped support for PHP 7.4 and 8.0 as they have reached End-of-Life (EOL). The minimum required PHP version is now 8.1.
7+
- Dropped support for PHP 7.4 and 8.0 as they have reached End-of-Life (EOL).
8+
- Dropped support for PHP 8.1 and updated minimum PHP version to 8.2 to accommodate PHPUnit 12.
9+
- Upgraded PHPUnit from 9.x to 12.x.

test/Tmdb/Tests/Api/AbstractApiTest.php

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,15 @@
1414

1515
namespace Tmdb\Tests\Api;
1616

17+
use PHPUnit\Framework\Attributes\Test;
18+
1719
use Tmdb\Api\AbstractApi;
1820

1921
class AbstractApiTest extends TestCase
2022
{
2123
/**
22-
* @test
23-
*/
24+
* */
25+
#[Test]
2426
public function shouldCallGet()
2527
{
2628
$api = $this->getApiWithMockedHttpAdapter();
@@ -30,8 +32,8 @@ public function shouldCallGet()
3032
}
3133

3234
/**
33-
* @test
34-
*/
35+
* */
36+
#[Test]
3537
public function shouldCallHead()
3638
{
3739
$api = $this->getApiWithMockedHttpAdapter();
@@ -41,8 +43,8 @@ public function shouldCallHead()
4143
}
4244

4345
/**
44-
* @test
45-
*/
46+
* */
47+
#[Test]
4648
public function shouldCallPost()
4749
{
4850
$api = $this->getApiWithMockedHttpAdapter();
@@ -52,8 +54,8 @@ public function shouldCallPost()
5254
}
5355

5456
/**
55-
* @test
56-
*/
57+
* */
58+
#[Test]
5759
public function shouldCallPut()
5860
{
5961
$api = $this->getApiWithMockedHttpAdapter();
@@ -63,8 +65,8 @@ public function shouldCallPut()
6365
}
6466

6567
/**
66-
* @test
67-
*/
68+
* */
69+
#[Test]
6870
public function shouldCallDelete()
6971
{
7072
$api = $this->getApiWithMockedHttpAdapter();
@@ -74,8 +76,8 @@ public function shouldCallDelete()
7476
}
7577

7678
/**
77-
* @test
78-
*/
79+
* */
80+
#[Test]
7981
public function shouldCallPatch()
8082
{
8183
$api = $this->getApiWithMockedHttpAdapter();

test/Tmdb/Tests/Api/AccountTest.php

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,16 @@
1414

1515
namespace Tmdb\Tests\Api;
1616

17+
use PHPUnit\Framework\Attributes\Test;
18+
1719
class AccountTest extends TestCase
1820
{
1921
public const ACCOUNT_ID = 1;
2022
public const MEDIA_ID = 123;
2123

2224
/**
23-
* @test
24-
*/
25+
* */
26+
#[Test]
2527
public function shouldGetAccount()
2628
{
2729
$api = $this->getApiWithMockedHttpAdapter();
@@ -31,8 +33,8 @@ public function shouldGetAccount()
3133
}
3234

3335
/**
34-
* @test
35-
*/
36+
* */
37+
#[Test]
3638
public function shouldGetLists()
3739
{
3840
$api = $this->getApiWithMockedHttpAdapter();
@@ -42,8 +44,8 @@ public function shouldGetLists()
4244
}
4345

4446
/**
45-
* @test
46-
*/
47+
* */
48+
#[Test]
4749
public function shouldGetFavoriteMovies()
4850
{
4951
$api = $this->getApiWithMockedHttpAdapter();
@@ -53,8 +55,8 @@ public function shouldGetFavoriteMovies()
5355
}
5456

5557
/**
56-
* @test
57-
*/
58+
* */
59+
#[Test]
5860
public function shouldGetFavoriteTv()
5961
{
6062
$api = $this->getApiWithMockedHttpAdapter();
@@ -64,8 +66,8 @@ public function shouldGetFavoriteTv()
6466
}
6567

6668
/**
67-
* @test
68-
*/
69+
* */
70+
#[Test]
6971
public function shouldFavorite()
7072
{
7173
$api = $this->getApiWithMockedHttpAdapter();
@@ -82,8 +84,8 @@ public function shouldFavorite()
8284
}
8385

8486
/**
85-
* @test
86-
*/
87+
* */
88+
#[Test]
8789
public function shouldGetRatedMovies()
8890
{
8991
$api = $this->getApiWithMockedHttpAdapter();
@@ -93,8 +95,8 @@ public function shouldGetRatedMovies()
9395
}
9496

9597
/**
96-
* @test
97-
*/
98+
* */
99+
#[Test]
98100
public function shouldGetRatedTvShows()
99101
{
100102
$api = $this->getApiWithMockedHttpAdapter();
@@ -104,8 +106,8 @@ public function shouldGetRatedTvShows()
104106
}
105107

106108
/**
107-
* @test
108-
*/
109+
* */
110+
#[Test]
109111
public function shouldGetMovieWatchlist()
110112
{
111113
$api = $this->getApiWithMockedHttpAdapter();
@@ -115,8 +117,8 @@ public function shouldGetMovieWatchlist()
115117
}
116118

117119
/**
118-
* @test
119-
*/
120+
* */
121+
#[Test]
120122
public function shouldGetTvShowWatchlist()
121123
{
122124
$api = $this->getApiWithMockedHttpAdapter();
@@ -126,8 +128,8 @@ public function shouldGetTvShowWatchlist()
126128
}
127129

128130
/**
129-
* @test
130-
*/
131+
* */
132+
#[Test]
131133
public function shouldWatchlist()
132134
{
133135
$api = $this->getApiWithMockedHttpAdapter();

test/Tmdb/Tests/Api/AuthenticationTest.php

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,17 @@
1414

1515
namespace Tmdb\Tests\Api;
1616

17+
use PHPUnit\Framework\Attributes\Test;
18+
1719
use InvalidArgumentException;
1820
use Tmdb\HttpClient\ResponseInterface;
1921
use Tmdb\Token\Session\RequestToken;
2022

2123
class AuthenticationTest extends TestCase
2224
{
2325
/**
24-
* @test
25-
*/
26+
* */
27+
#[Test]
2628
public function shouldGetNewToken()
2729
{
2830
$api = $this->getApiWithMockedHttpAdapter();
@@ -32,8 +34,8 @@ public function shouldGetNewToken()
3234
}
3335

3436
/**
35-
* @test
36-
*/
37+
* */
38+
#[Test]
3739
public function shouldGetNewSession()
3840
{
3941
$api = $this->getApiWithMockedHttpAdapter();
@@ -153,8 +155,8 @@ public function shouldThrowExceptionWhenNotValidated()
153155
}
154156

155157
/**
156-
* @test
157-
*/
158+
* */
159+
#[Test]
158160
public function shouldGetNewGuestSession()
159161
{
160162
$api = $this->getApiWithMockedHttpAdapter();

test/Tmdb/Tests/Api/CertificationsTest.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,13 @@
1414

1515
namespace Tmdb\Tests\Api;
1616

17+
use PHPUnit\Framework\Attributes\Test;
18+
1719
class CertificationsTest extends TestCase
1820
{
1921
/**
20-
* @test
21-
*/
22+
* */
23+
#[Test]
2224
public function shouldGetCertificationsListForMovies()
2325
{
2426
$api = $this->getApiWithMockedHttpAdapter();
@@ -28,8 +30,8 @@ public function shouldGetCertificationsListForMovies()
2830
}
2931

3032
/**
31-
* @test
32-
*/
33+
* */
34+
#[Test]
3335
public function shouldGetCertificationsListForTv()
3436
{
3537
$api = $this->getApiWithMockedHttpAdapter();

test/Tmdb/Tests/Api/ChangesTest.php

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,13 @@
1414

1515
namespace Tmdb\Tests\Api;
1616

17+
use PHPUnit\Framework\Attributes\Test;
18+
1719
class ChangesTest extends TestCase
1820
{
1921
/**
20-
* @test
21-
*/
22+
* */
23+
#[Test]
2224
public function shouldGetMovieChanges()
2325
{
2426
$api = $this->getApiWithMockedHttpAdapter();
@@ -28,8 +30,8 @@ public function shouldGetMovieChanges()
2830
}
2931

3032
/**
31-
* @test
32-
*/
33+
* */
34+
#[Test]
3335
public function shouldGetPersonChanges()
3436
{
3537
$api = $this->getApiWithMockedHttpAdapter();
@@ -39,8 +41,8 @@ public function shouldGetPersonChanges()
3941
}
4042

4143
/**
42-
* @test
43-
*/
44+
* */
45+
#[Test]
4446
public function shouldGetTvChanges()
4547
{
4648
$api = $this->getApiWithMockedHttpAdapter();

test/Tmdb/Tests/Api/CollectionsTest.php

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,15 @@
1414

1515
namespace Tmdb\Tests\Api;
1616

17+
use PHPUnit\Framework\Attributes\Test;
18+
1719
class CollectionsTest extends TestCase
1820
{
1921
public const COLLECTION_ID = 120;
2022

2123
/**
22-
* @test
23-
*/
24+
* */
25+
#[Test]
2426
public function shouldGetCollection()
2527
{
2628
$api = $this->getApiWithMockedHttpAdapter();
@@ -30,8 +32,8 @@ public function shouldGetCollection()
3032
}
3133

3234
/**
33-
* @test
34-
*/
35+
* */
36+
#[Test]
3537
public function shouldGetImages()
3638
{
3739
$api = $this->getApiWithMockedHttpAdapter();
@@ -41,8 +43,8 @@ public function shouldGetImages()
4143
}
4244

4345
/**
44-
* @test
45-
*/
46+
* */
47+
#[Test]
4648
public function shouldGetTranslations()
4749
{
4850
$api = $this->getApiWithMockedHttpAdapter();

test/Tmdb/Tests/Api/CompaniesTest.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,15 @@
1414

1515
namespace Tmdb\Tests\Api;
1616

17+
use PHPUnit\Framework\Attributes\Test;
18+
1719
class CompaniesTest extends TestCase
1820
{
1921
public const COMPANY_ID = 1;
2022

2123
/**
22-
* @test
23-
*/
24+
* */
25+
#[Test]
2426
public function shouldGetCompany()
2527
{
2628
$api = $this->getApiWithMockedHttpAdapter();
@@ -30,8 +32,8 @@ public function shouldGetCompany()
3032
}
3133

3234
/**
33-
* @test
34-
*/
35+
* */
36+
#[Test]
3537
public function shouldGetMovies()
3638
{
3739
$api = $this->getApiWithMockedHttpAdapter();

0 commit comments

Comments
 (0)