Replace the 2 lines with this ?

```php
$fieldDef->fieldTypeConstraints->validators[self::FLOAT_VALIDATOR_IDENTIFIER] = $floatValidatorParameters;
```