Skip to content

Commit c3d691b

Browse files
committed
MAGETWO-37710: Setup wizard fails in readiness check when magento is deployed by composer create-project
- Fix comment and behavior when no extension requirement is found - Change PhpInformation test to not duplicate tested logic
1 parent f71f038 commit c3d691b

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

setup/src/Magento/Setup/Model/ComposerInformation.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function __construct(
3939
Filesystem $filesystem,
4040
BufferIO $io
4141
) {
42-
// composer.json will be in same directory as vendor
42+
// composer.json is in same directory as vendor
4343
$vendorPath = $filesystem->getDirectoryRead(DirectoryList::CONFIG)->getAbsolutePath('vendor_path.php');
4444
$vendorDir = require "{$vendorPath}";
4545
$composerJson = $filesystem->getDirectoryRead(DirectoryList::ROOT)->getAbsolutePath()
@@ -114,10 +114,6 @@ public function getRequiredExtensions()
114114
$requiredExtensions[] = substr($reqIndex, 4);
115115
}
116116
}
117-
118-
if (!isset($requiredExtensions)) {
119-
throw new \Exception('Cannot find extensions in \'composer.lock\' file');
120-
}
121117
return array_unique($requiredExtensions);
122118
}
123119

setup/src/Magento/Setup/Test/Unit/Model/PhpInformationTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,11 @@ public function testGetRequiredMinimumXDebugNestedLevel()
2222
public function testGetCurrent()
2323
{
2424
$phpInformation = new PhpInformation();
25-
$loadedExtensions = array_map('strtolower', get_loaded_extensions());
2625

2726
// Class variable 'current' should be empty the first time
2827
$this->assertAttributeEmpty('current', $phpInformation);
2928
$actualExtensions = $phpInformation->getCurrent();
30-
$this->assertEquals($loadedExtensions, $actualExtensions);
29+
$this->assertTrue(is_array($actualExtensions));
3130

3231
// Calling second type should cause class variable to be used
3332
$this->assertSame($actualExtensions, $phpInformation->getCurrent());

0 commit comments

Comments
 (0)