-
Notifications
You must be signed in to change notification settings - Fork 645
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PHP 7.3 / Stringy is abandoned #4753
Comments
Thanks for pointing that out! We should definitely swap out string libraries for 3.3 or 4.0. |
3.3 is officially out where we swapped to https://github.com/voku/Stringy. https://github.com/craftcms/cms/blob/master/CHANGELOG-v3.md#330---2019-08-27 |
Since the above mentioned change I'm getting the following error when I deploy the latest update:
Plus some warnings that may be related?
Would you have any idea what could be causing this? ¯\_(ツ)_/¯ |
@RyanRoberts what version of PHP are you using? Also, how did you deploy? Looks like there are some old files causing conflicts that should have been removed during the update. |
In this case PHP 7.2.21 and I removed the vendor directory to get rid of any old stuff. I'm deploying via Beanstalk App (so sftp) with a deploy script that runs composer install afterwards. Thanks |
@RyanRoberts Search for |
There's no sign of that in composer.json. Hmm. |
I believe "stringy/stringy" is not correct, so check your
|
Did that and got this: I've deleted the vendor directory and composer.lock file to reinstall and redeploy everything, now I'm getting something a little more specific…
I'm guessing I'm now looking at something different, PHP related rather than Stringy? |
Got to the bottom of it, server is defaulting to the php cli version of 5.6. Thanks guys. |
Regarding stringy, I'm seeing an error using the
In the referenced issue above on Craft 3.3.0.1. |
@mjatharvest That filter still works on my end. Can you try nuking your |
@brandonkelly that fixed it, thank you! Terminal output this, but it still works:
|
@mjatharvest Search for |
I'm getting this error as well after porting my site over to another computer.
I nuked the composer directory and I ran When I run
|
@vaughn-taylor This is a known issue, upgrade to Craft 3.3.1.1 (which locks |
@sebastian-lenz, thanks. Updating to 3.3.1.1 worked (I can get into the CP now), but still produces an error |
In my case |
Looks like there was a bug where CP-based updates would leave the |
Updated Stringy dependency to resolve collision with Craft's dependency. (Fixes #25.) (c.f. craftcms/cms#4753)
I'm still having this issue I've been migrating a site to a development server but when I run
The important line is ovviously the fatal error at the end, but this seems to be to do with voku's version of Stringy and not danielstjules' version. What I've tried
The one thing I tried which seemed to work is running
Help please! |
@jcush My guess would be that you are actually using an old PHP version, in your error log there is a line which complains about |
@sebastian-lenz Thanks for this tip - I'll do some more digging. The |
@RyanRoberts thanks for posting your solution. My PHP version had also reverted and I was seeing the same error. You saved me a lot of time and hassle. I owe you a pint ;) |
Right -this problem is in the Craft setup/install files from the Craft web site. But I don't yet have a fix... and need a touch of help.
SO for a fix, I edited composer.json which specified php 7.0 and changed to 7.4 Then you can just run In fact I suspect the change to 7.4 was immaterial, the difference was running Should the json php versions be changed to 7.4 to set the environment? And is this installation now complete, or did the install script have more to do? |
Right, I can now add a little more to this... Bootup.php still gives the error. You can insert an echo phpverison into Bootup.php and then |
Right, homing in on this issue: Put echo phpver into Bootup.php, run it from Bash and it returns 7.4 But comment everything out, put echo phpver into it and run craft, and when it calls Bootup.php, it returns 5.4.16. Why is this? |
Ok I worked out the fix to this issue - here it is: |
Description
The dependency
danielstjules/stringy
of Craft CMS seems to be abandoned (see discussion here, it has not received updates since mid 2017). Unfortunately the library has issues with PHP 7.3 and we should look for alternatives. The linked issue contains two possible forks that are more actively maintained. This issue is related to #3541.I've tested Craft with PHP 7.3 and the functions of Stringy that have issues on PHP 7.3 don't seem to be used by the CMS. However, in one of my projects I've found code that uses other parts of Stringy which fail on PHP 7.3.
Steps to reproduce
Stringy::slugify
Additional info
The text was updated successfully, but these errors were encountered: