KnpLabs / DoctrineBehaviors

Doctrine2 behavior traits that help handling Blameable, Loggable, Sluggable, SoftDeletable, Uuidable, Timestampable, Translatable, Tree behavior
http://knplabs.com
MIT License
911 stars 287 forks source link

generateSlugValue method has wrong return type #672

Closed garak closed 2 years ago

garak commented 2 years ago

This return type is wrong, it's probably left after a previous refactoring of the method. The current code can't return anything but a string. The phpdoc should be removed and : string should be added instead.

TomasVotruba commented 2 years ago

Hi, it might be the case. Could you send PR?

garak commented 2 years ago

PR sent. Do you think it's possible, if PR approved, to backport such fix to versions 2.3 and 2.2? I've got a project that is still on Symfony 4/PHP 7.4

TomasVotruba commented 2 years ago

See https://github.com/KnpLabs/DoctrineBehaviors/issues/668#issuecomment-953069622

There are more packages that already dropped PHP 7.*, so this would not help. Instesad, I recommend to upgrade never PHP/Symfony with Rector. It's ~2-4 days work.