Skip to content

Commit b064a47

Browse files
authored
Merge pull request #6399 from kenjis/fix-ComposerJsonTest
chore: update framework/composer json suggest
2 parents 554ce9e + 2de8ab4 commit b064a47

File tree

2 files changed

+36
-11
lines changed

2 files changed

+36
-11
lines changed

admin/framework/composer.json

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,18 @@
2424
"predis/predis": "^1.1 || ^2.0"
2525
},
2626
"suggest": {
27-
"ext-fileinfo": "Improves mime type detection for files"
27+
"ext-imagick": "If you use Image class ImageMagickHandler",
28+
"ext-simplexml": "If you format XML",
29+
"ext-mysqli": "If you use MySQL",
30+
"ext-oci8": "If you use Oracle Database",
31+
"ext-pgsql": "If you use PostgreSQL",
32+
"ext-sqlsrv": "If you use SQL Server",
33+
"ext-sqlite3": "If you use SQLite3",
34+
"ext-memcache": "If you use Cache class MemcachedHandler with Memcache",
35+
"ext-memcached": "If you use Cache class MemcachedHandler with Memcached",
36+
"ext-redis": "If you use Cache class RedisHandler",
37+
"ext-fileinfo": "Improves mime type detection for files",
38+
"ext-readline": "Improves CLI::input() usability"
2839
},
2940
"autoload": {
3041
"psr-4": {

tests/AutoReview/ComposerJsonTest.php

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,25 +24,30 @@
2424
*/
2525
final class ComposerJsonTest extends TestCase
2626
{
27-
public function testFrameworkRequireIsTheSameWithDevRequire(): void
27+
private array $devComposer;
28+
private array $frameworkComposer;
29+
30+
protected function setUp(): void
2831
{
29-
$devComposer = $this->getComposerJson(dirname(__DIR__, 2) . '/composer.json');
30-
$frameworkComposer = $this->getComposerJson(dirname(__DIR__, 2) . '/admin/framework/composer.json');
32+
parent::setUp();
33+
34+
$this->devComposer = $this->getComposerJson(dirname(__DIR__, 2) . '/composer.json');
35+
$this->frameworkComposer = $this->getComposerJson(dirname(__DIR__, 2) . '/admin/framework/composer.json');
36+
}
3137

38+
public function testFrameworkRequireIsTheSameWithDevRequire(): void
39+
{
3240
$this->assertSame(
33-
$devComposer['require'],
34-
$frameworkComposer['require'],
41+
$this->devComposer['require'],
42+
$this->frameworkComposer['require'],
3543
'The framework\'s "require" section is not updated with the main composer.json.'
3644
);
3745
}
3846

3947
public function testFrameworkRequireDevIsTheSameWithDevRequireDev(): void
4048
{
41-
$devComposer = $this->getComposerJson(dirname(__DIR__, 2) . '/composer.json');
42-
$frameworkComposer = $this->getComposerJson(dirname(__DIR__, 2) . '/admin/framework/composer.json');
43-
44-
$devRequireDev = $devComposer['require-dev'];
45-
$fwRequireDev = $frameworkComposer['require-dev'];
49+
$devRequireDev = $this->devComposer['require-dev'];
50+
$fwRequireDev = $this->frameworkComposer['require-dev'];
4651

4752
foreach ($devRequireDev as $dependency => $expectedVersion) {
4853
if (! isset($fwRequireDev[$dependency])) {
@@ -62,6 +67,15 @@ public function testFrameworkRequireDevIsTheSameWithDevRequireDev(): void
6267
}
6368
}
6469

70+
public function testFrameworkSuggestIsTheSameWithDevSuggest(): void
71+
{
72+
$this->assertSame(
73+
$this->devComposer['suggest'],
74+
$this->frameworkComposer['suggest'],
75+
'The framework\'s "suggest" section is not updated with the main composer.json.'
76+
);
77+
}
78+
6579
private function getComposerJson(string $path): array
6680
{
6781
try {

0 commit comments

Comments
 (0)