Browse Source

Merge pull request #23161 from nextcloud/enh/noid/setup-checks2

Remove setup check for php mail
tags/v21.0.0beta1
Roeland Jago Douma 3 years ago
parent
commit
0dbb99a81b
No account linked to committer's email address

+ 0
- 6
apps/settings/lib/Controller/CheckSetupController.php View File

@@ -522,10 +522,6 @@ Raw output
return [];
}

protected function isPHPMailerUsed(): bool {
return $this->config->getSystemValue('mail_smtpmode', 'smtp') === 'php';
}

protected function hasOpcacheLoaded(): bool {
return extension_loaded('Zend OPcache');
}
@@ -722,8 +718,6 @@ Raw output
'missingColumns' => $this->hasMissingColumns(),
'isSqliteUsed' => $this->isSqliteUsed(),
'databaseConversionDocumentation' => $this->urlGenerator->linkToDocs('admin-db-conversion'),
'isPHPMailerUsed' => $this->isPHPMailerUsed(),
'mailSettingsDocumentation' => $this->urlGenerator->getAbsoluteURL('index.php/settings/admin'),
'isMemoryLimitSufficient' => $this->memoryInfo->isMemoryLimitSufficient(),
'appDirsWithDifferentOwner' => $this->getAppDirsWithDifferentOwner(),
'recommendedPHPModules' => $this->hasRecommendedPHPModules(),

+ 0
- 40
apps/settings/tests/Controller/CheckSetupControllerTest.php View File

@@ -479,10 +479,6 @@ class CheckSetupControllerTest extends TestCase {
'relativeTime' => '2 hours ago',
'backgroundJobsUrl' => 'https://example.org',
]);
$this->checkSetupController
->expects($this->once())
->method('isPHPMailerUsed')
->willReturn(false);
$this->checker
->expects($this->once())
->method('hasPassedCheck')
@@ -588,8 +584,6 @@ class CheckSetupControllerTest extends TestCase {
'databaseConversionDocumentation' => 'http://docs.example.org/server/go.php?to=admin-db-conversion',
'missingIndexes' => [],
'missingColumns' => [],
'isPHPMailerUsed' => false,
'mailSettingsDocumentation' => 'https://server/index.php/settings/admin',
'isMemoryLimitSufficient' => true,
'appDirsWithDifferentOwner' => [],
'recommendedPHPModules' => [],
@@ -605,40 +599,6 @@ class CheckSetupControllerTest extends TestCase {
$this->assertEquals($expected, $this->checkSetupController->check());
}

public function testIsPHPMailerUsed() {
$checkSetupController = $this->getMockBuilder(CheckSetupController::class)
->setConstructorArgs([
'settings',
$this->request,
$this->config,
$this->clientService,
$this->urlGenerator,
$this->l10n,
$this->checker,
$this->logger,
$this->dispatcher,
$this->db,
$this->lockingProvider,
$this->dateTimeFormatter,
$this->memoryInfo,
$this->secureRandom,
$this->iniGetWrapper,
])
->setMethods(null)->getMock();

$this->config->expects($this->at(0))
->method('getSystemValue')
->with('mail_smtpmode', 'smtp')
->willReturn('php');
$this->config->expects($this->at(1))
->method('getSystemValue')
->with('mail_smtpmode', 'smtp')
->willReturn('not-php');

$this->assertTrue($this->invokePrivate($checkSetupController, 'isPHPMailerUsed'));
$this->assertFalse($this->invokePrivate($checkSetupController, 'isPHPMailerUsed'));
}

public function testGetCurlVersion() {
$checkSetupController = $this->getMockBuilder(CheckSetupController::class)
->setConstructorArgs([

+ 0
- 12
core/js/setupchecks.js View File

@@ -417,18 +417,6 @@
type: OC.SetupChecks.MESSAGE_TYPE_WARNING
})
}
if (data.isPHPMailerUsed) {
messages.push({
msg: t(
'core',
'Use of the the built in php mailer is no longer supported. <a target="_blank" rel="noreferrer noopener" href="{docLink}">Please update your email server settings ↗<a/>.',
{
docLink: data.mailSettingsDocumentation,
}
),
type: OC.SetupChecks.MESSAGE_TYPE_WARNING
});
}
if (!data.isMemoryLimitSufficient) {
messages.push({
msg: t(

Loading…
Cancel
Save