mirror of
https://github.com/silverstripe/silverstripe-userforms.git
synced 2024-10-22 17:05:42 +02:00
Merge pull request #1182 from creative-commoners/pulls/6/upgrade-cms5
DEP PHP Support in CMS5
This commit is contained in:
commit
2024622c0c
@ -80,7 +80,7 @@ class UserDefinedFormAdmin extends LeftAndMain
|
||||
}
|
||||
|
||||
|
||||
public function index($request)
|
||||
public function index(HTTPRequest $request): HTTPResponse
|
||||
{
|
||||
// Don't serve anythign under the main URL.
|
||||
return $this->httpError(404);
|
||||
|
@ -120,7 +120,7 @@ class EditableMultipleOptionField extends EditableFormField
|
||||
* @param string $manyMany @deprecated
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function duplicate($doWrite = true, $manyMany = 'many_many')
|
||||
public function duplicate(bool $doWrite = true, ?array $manyMany = null): static
|
||||
{
|
||||
$clonedNode = parent::duplicate(true);
|
||||
|
||||
|
@ -30,17 +30,17 @@
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"php": "^7.4 || ^8.0",
|
||||
"silverstripe/framework": "^4.10",
|
||||
"silverstripe/cms": "^4.6",
|
||||
"symbiote/silverstripe-gridfieldextensions": "^3.1",
|
||||
"silverstripe/segment-field": "^2.2",
|
||||
"silverstripe/versioned": "^1.0",
|
||||
"silverstripe/mimevalidator": "^2.0"
|
||||
"php": "^8.1",
|
||||
"silverstripe/framework": "^5",
|
||||
"silverstripe/cms": "^5",
|
||||
"symbiote/silverstripe-gridfieldextensions": "^4",
|
||||
"silverstripe/segment-field": "^3",
|
||||
"silverstripe/versioned": "^2",
|
||||
"silverstripe/mimevalidator": "^3"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^9.5",
|
||||
"squizlabs/php_codesniffer": "^3.0"
|
||||
"squizlabs/php_codesniffer": "^3"
|
||||
},
|
||||
"conflict": {
|
||||
"egulias/email-validator": "^2"
|
||||
|
@ -37,8 +37,6 @@ class UserDefinedFormControllerTest extends FunctionalTest
|
||||
{
|
||||
protected static $fixture_file = '../UserFormsTest.yml';
|
||||
|
||||
protected static $use_draft_site = true;
|
||||
|
||||
protected static $disable_themes = true;
|
||||
|
||||
protected function setUp(): void
|
||||
@ -109,7 +107,7 @@ class UserDefinedFormControllerTest extends FunctionalTest
|
||||
$this->assertEmailSent('nohtml@example.com', 'no-reply@example.com', 'Email Subject');
|
||||
$nohtml = $this->findEmail('nohtml@example.com', 'no-reply@example.com', 'Email Subject');
|
||||
|
||||
$this->assertStringContainsString('Basic Text Field: Basic Value', $nohtml['Content'], 'Email contains no html');
|
||||
$this->assertStringContainsString('* Basic Value <b>HTML</b>', $nohtml['Content'], 'Email contains no html');
|
||||
|
||||
// submitted html tags are not escaped because the email is being sent as text/plain
|
||||
$value = 'My body text Basic Value <b>HTML</b>';
|
||||
@ -132,8 +130,8 @@ class UserDefinedFormControllerTest extends FunctionalTest
|
||||
|
||||
// check that multiple email addresses are supported in to and from
|
||||
$this->assertEmailSent(
|
||||
'test1@example.com; test2@example.com',
|
||||
'test3@example.com; test4@example.com',
|
||||
'test1@example.com, test2@example.com',
|
||||
'test3@example.com, test4@example.com',
|
||||
'Test Email'
|
||||
);
|
||||
}
|
||||
|
@ -83,7 +83,8 @@ class SubmittedFileFieldTest extends SapphireTest
|
||||
),
|
||||
$this->submittedFile->getFormattedValue()->value
|
||||
);
|
||||
|
||||
|
||||
$this->logOut();
|
||||
$this->loginWithPermission('CMS_ACCESS_CMSMain');
|
||||
$this->assertEquals(
|
||||
sprintf(
|
||||
|
Loading…
Reference in New Issue
Block a user