I think it should be:
public static function generateSampleValue(FieldDefinitionInterface $field_definition) {
$values['value'] = (string) rand(pow(10, 8), pow(10, 9) - 1);
return $values;
}
| Comment | File | Size | Author |
|---|---|---|---|
| #18 | after-patch-telephone.png | 23.84 KB | Madhu kumar |
| #14 | interdiff_3076979_11_13.txt | 456 bytes | kapilv |
| #13 | 3076979-13.patch | 655 bytes | ranjith_kumar_k_u |
| #11 | 3076979-11.patch | 656 bytes | ranjith_kumar_k_u |
| #6 | phone-string-3076979-5.patch | 660 bytes | NitinLama |
Comments
Comment #2
super_romeo commentedComment #5
NitinLama commentedComment #6
NitinLama commentedComment #7
super_romeo commentedPatch works. Thanks! :)
Comment #8
tanubansal commentedTested #6
RTBC + 1
Comment #10
ranjith_kumar_k_u commentedThe #6 patch works fine on 9.2.x dev.RTBC
Comment #11
ranjith_kumar_k_u commentedRe-rolled
Comment #13
ranjith_kumar_k_u commentedplease review
Comment #14
kapilv commentedComment #15
super_romeo commentedWorks for me.
Comment #16
xjmAccording to the config schema for telephone:
The value is already defined to be a string, so theoretically this generated sample value should be converted automatically to a string on save.
Do you have an example of where this is not the case, or example code for which it caused issues?
Also, what does the method documentation for the parent method currently say about the return value?
With these questions, I'm trying to sort out if there are other places that may need a bugfix or if there is missing test coverage.
Comment #17
vikashsoni commentedApplied patch #6 working successfully
Comment #18
Madhu kumar commentedApplied patch #13 working as expected , and value is converted to string format.
Comment #20
laisbonafe commentedComment #21
laisbonafe commentedPatch #13 working well, no problens detected in tests.
if still couse a issue , tell me more and we will review again
Comment #22
bnjmnmThis issue was set to RTBC in #15 and was switched back to "Needs review" by a committer in #16, where several questions were asked. This shouldn't be set back to RTBC until those questions are answered (or there's evidence they don't need to be).
Comment #25
smustgrave commentedMoving to PNMI based on the questions in #16
Comment #27
smustgrave commentedClosing as outdated as this moved to PNMI 4 months ago without a followup.
If still an issue please reopen addressing #16