Skip to content

Commit c8e08d0

Browse files
committed
Merge branch '1' into 2.1
2 parents e14c62a + eefc7d8 commit c8e08d0

File tree

4 files changed

+21
-4
lines changed

4 files changed

+21
-4
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,15 @@ jobs:
99
ci:
1010
name: CI
1111
uses: silverstripe/gha-ci/.github/workflows/ci.yml@v1
12+
with:
13+
extra_jobs: |
14+
- php: 8.0
15+
phpunit: false
16+
endtoend: true
17+
endtoend_suite: admin
18+
endtoend_config: vendor/silverstripe/admin/behat.yml
19+
- php: 8.1
20+
phpunit: false
21+
endtoend: true
22+
endtoend_suite: cms
23+
endtoend_config: vendor/silverstripe/cms/behat.yml

_config/config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,8 @@ Signify\ComposableValidators\Validators\SimpleFieldsValidator:
1010
SilverStripe\Admin\LeftAndMain:
1111
extra_requirements_css:
1212
- 'guysartorelli/silverstripe-composable-validators:client/dist/left-and-main.css'
13+
14+
# Replace new FieldsValidator with our SimpleFieldsValidator
15+
SilverStripe\Core\Injector\Injector:
16+
SilverStripe\Forms\FieldsValidator:
17+
class: Signify\ComposableValidators\Validators\SimpleFieldsValidator

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
},
3939
"require": {
4040
"php": "^8.1",
41-
"silverstripe/framework": "^5.0.0",
41+
"silverstripe/framework": "^5.0.17",
4242
"signify-nz/silverstripe-searchfilter-arraylist": "^1.1.0"
4343
},
4444
"require-dev": {

src/Validators/SimpleFieldsValidator.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace Signify\ComposableValidators\Validators;
44

5-
use SilverStripe\Forms\Validator;
5+
use SilverStripe\Forms\FieldsValidator;
66

77
/**
88
* A validator to ensure that all form fields are internally valid.
@@ -13,7 +13,7 @@
1313
* This class is to avoid the use of, say, RequiredFields::create([]), which
1414
* relies on an implementation detail to ensure that fields are validated.
1515
*/
16-
class SimpleFieldsValidator extends Validator
16+
class SimpleFieldsValidator extends FieldsValidator
1717
{
1818
/**
1919
* Array of FormField subclasses that shouldn't be validated in AJAX validation calls.
@@ -29,7 +29,7 @@ class SimpleFieldsValidator extends Validator
2929
* @param array $data
3030
* @return bool
3131
*/
32-
public function php($data, bool $isAjax = false)
32+
public function php($data, bool $isAjax = false): bool
3333
{
3434
$valid = true;
3535
$fields = $this->form->Fields();

0 commit comments

Comments
 (0)