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

Remove setup check for php mail
This commit is contained in:
Roeland Jago Douma 2020-10-08 22:40:37 +02:00 committed by GitHub
commit 0dbb99a81b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 0 additions and 58 deletions

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(),

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([

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(