Truncate overly long `suggest` fields before persisting them
The constraint field from the organization_package_link table is limited to 255 chars.
Currently, synchronization fails for packages that use suggest fields longer than 255 chars, and it becomes impossible to manage them from the UI (even if only to remove them).
Note that I am open to suggestions on how we might otherwise handle these cases.
Codecov Report
Merging #563 (f64850a) into master (93a82eb) will decrease coverage by
0.01%. The diff coverage is50.00%.
@@ Coverage Diff @@
## master #563 +/- ##
============================================
- Coverage 99.21% 99.20% -0.02%
- Complexity 1893 1894 +1
============================================
Files 301 301
Lines 6014 6016 +2
============================================
+ Hits 5967 5968 +1
- Misses 47 48 +1
| Impacted Files | Coverage Δ | |
|---|---|---|
| ...ackageSynchronizer/ComposerPackageSynchronizer.php | 96.21% <50.00%> (-0.72%) |
:arrow_down: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 93a82eb...f64850a. Read the comment docs.
Truncated description is not a problem ?
We can maybe change type in database in order to allow longest text ? And manage length in UI ? (css, ellipsis or something else)
agree with @alamirault, you'd better change the field type to text :)