Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion admin/framework/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,18 @@
"predis/predis": "^1.1 || ^2.0"
},
"suggest": {
"ext-fileinfo": "Improves mime type detection for files"
"ext-imagick": "If you use Image class ImageMagickHandler",
"ext-simplexml": "If you format XML",
"ext-mysqli": "If you use MySQL",
"ext-oci8": "If you use Oracle Database",
"ext-pgsql": "If you use PostgreSQL",
"ext-sqlsrv": "If you use SQL Server",
"ext-sqlite3": "If you use SQLite3",
"ext-memcache": "If you use Cache class MemcachedHandler with Memcache",
"ext-memcached": "If you use Cache class MemcachedHandler with Memcached",
"ext-redis": "If you use Cache class RedisHandler",
"ext-fileinfo": "Improves mime type detection for files",
"ext-readline": "Improves CLI::input() usability"
},
"autoload": {
"psr-4": {
Expand Down
34 changes: 24 additions & 10 deletions tests/AutoReview/ComposerJsonTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,25 +24,30 @@
*/
final class ComposerJsonTest extends TestCase
{
public function testFrameworkRequireIsTheSameWithDevRequire(): void
private array $devComposer;
private array $frameworkComposer;

protected function setUp(): void
{
$devComposer = $this->getComposerJson(dirname(__DIR__, 2) . '/composer.json');
$frameworkComposer = $this->getComposerJson(dirname(__DIR__, 2) . '/admin/framework/composer.json');
parent::setUp();

$this->devComposer = $this->getComposerJson(dirname(__DIR__, 2) . '/composer.json');
$this->frameworkComposer = $this->getComposerJson(dirname(__DIR__, 2) . '/admin/framework/composer.json');
}

public function testFrameworkRequireIsTheSameWithDevRequire(): void
{
$this->assertSame(
$devComposer['require'],
$frameworkComposer['require'],
$this->devComposer['require'],
$this->frameworkComposer['require'],
'The framework\'s "require" section is not updated with the main composer.json.'
);
}

public function testFrameworkRequireDevIsTheSameWithDevRequireDev(): void
{
$devComposer = $this->getComposerJson(dirname(__DIR__, 2) . '/composer.json');
$frameworkComposer = $this->getComposerJson(dirname(__DIR__, 2) . '/admin/framework/composer.json');

$devRequireDev = $devComposer['require-dev'];
$fwRequireDev = $frameworkComposer['require-dev'];
$devRequireDev = $this->devComposer['require-dev'];
$fwRequireDev = $this->frameworkComposer['require-dev'];

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

public function testFrameworkSuggestIsTheSameWithDevSuggest(): void
{
$this->assertSame(
$this->devComposer['suggest'],
$this->frameworkComposer['suggest'],
'The framework\'s "suggest" section is not updated with the main composer.json.'
);
}

private function getComposerJson(string $path): array
{
try {
Expand Down