Skip to content

Commit

Permalink
Merge branch '1' into 2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli committed Sep 7, 2023
2 parents e14c62a + eefc7d8 commit c8e08d0
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 4 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,15 @@ jobs:
ci:
name: CI
uses: silverstripe/gha-ci/.github/workflows/ci.yml@v1
with:
extra_jobs: |
- php: 8.0
phpunit: false
endtoend: true
endtoend_suite: admin
endtoend_config: vendor/silverstripe/admin/behat.yml
- php: 8.1
phpunit: false
endtoend: true
endtoend_suite: cms
endtoend_config: vendor/silverstripe/cms/behat.yml
5 changes: 5 additions & 0 deletions _config/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,8 @@ Signify\ComposableValidators\Validators\SimpleFieldsValidator:
SilverStripe\Admin\LeftAndMain:
extra_requirements_css:
- 'guysartorelli/silverstripe-composable-validators:client/dist/left-and-main.css'

# Replace new FieldsValidator with our SimpleFieldsValidator
SilverStripe\Core\Injector\Injector:
SilverStripe\Forms\FieldsValidator:
class: Signify\ComposableValidators\Validators\SimpleFieldsValidator
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
},
"require": {
"php": "^8.1",
"silverstripe/framework": "^5.0.0",
"silverstripe/framework": "^5.0.17",
"signify-nz/silverstripe-searchfilter-arraylist": "^1.1.0"
},
"require-dev": {
Expand Down
6 changes: 3 additions & 3 deletions src/Validators/SimpleFieldsValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Signify\ComposableValidators\Validators;

use SilverStripe\Forms\Validator;
use SilverStripe\Forms\FieldsValidator;

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

0 comments on commit c8e08d0

Please sign in to comment.