cocur / slugify

Converts a string to a slug. Includes integrations for Symfony, Silex, Laravel, Zend Framework 2, Twig, Nette and Latte.
MIT License
2.87k stars 251 forks source link

Syntax error, unexpected '|', expecting variable {t_variable} #334

Closed deyan-ardi closed 9 months ago

deyan-ardi commented 9 months ago

gambar I have some error in my production app, and this because new update of this package.

So what can i do?

galanis-a commented 9 months ago

I am guessing you are on php 7.4. You need to downgrade to version 4.3.0 of cocur/slugify. They removed compatibility with PHP 7 in version 4.4 but added back in version 4.5.....

deyan-ardi commented 9 months ago

I am guessing you are on php 7.4. You need to downgrade to version 4.3.0 of cocur/slugify. They removed compatibility with PHP 7 in version 4.4 but added back in version 4.5.....

Thanks your information, i will try later...

Spomsoree commented 9 months ago

I think ^7.1 should be removed from here: https://github.com/cocur/slugify/blob/v4.5.0/composer.json#L22

from version 4.5.0.

Version 4.4.0 works for me on php7.4