repman-io / repman

Repman - PHP Repository Manager: packagist proxy and host for private packages
https://repman.io
MIT License
515 stars 107 forks source link

Truncate overly long `suggest` fields before persisting them #563

Open blmage opened 2 years ago

blmage commented 2 years ago

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[bot] commented 2 years ago

Codecov Report

Merging #563 (f64850a) into master (93a82eb) will decrease coverage by 0.01%. The diff coverage is 50.00%.

Impacted file tree graph

@@             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 data Powered by Codecov. Last update 93a82eb...f64850a. Read the comment docs.

alamirault commented 2 years ago

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)

akondas commented 2 years ago

agree with @alamirault, you'd better change the field type to text :)