Jump to content

CC and php 8.1


KirkM

Recommended Posts

Searched around and didn't see much about CC compatibility with the latest php version 8.1.  Just a single post back in 2021 or so about problems with php 8.0 breaking CC.  What's happening with CC and php 8.1?  I am using CC 6.4.4 with php 7.4 right now (CC still recommends using php 7.3, which is now outdated), but all my data systems and some client wordpress sites are moved to php 8.1.  CC is the only thing hanging me up from having 8.1 as the only php version on my server.

Any info on a timeline for this would be greatly appreciated.

Link to comment
Share on other sites

I am fairly confident CC645 will have all of its codebase updated for PHP8.0+.

However, there is still the issue of Smarty 3. The version shipped with CC644 is not PHP8 compatible.

Perhaps, CC645 will ship with Smarty 4 - after full testing, of course.

Ok, well, I see CC645 has been released.

Edited by bsmither
Link to comment
Share on other sites

Thanks Brian. 

Do you know if Smarty 4 in CC645?  Obviously, if a single third-party component isn't compatible, then the whole thing isn't.

I run PHP as a PFM Application per domain so I will keep 7.4 for the CC clients and wait for the plugins to catch up if they haven't yet.

It would be great if Al specifically announces when the CC version is released that is tested compatible with PHP 8.1.  (wink, wink, nudge, nudge)..

Link to comment
Share on other sites

That would be very generous of you to do.  PHP 8 has only been out since the very end of November 2020, so that's just under 18 months.  Lots of changes and depreciated / removed functions and conventions so it will understandably take a while for everyone to clean their code.   

All my stuff works fine on 7.4 too, I just am a bit impatient to work with some of the 8.1 improvements.  I have it installed in my MAMP Pro testing server and develop only with that to future-proof as far out as possible so it is important that I have it on my production server, which I do for the domains I use.

For CC, I can just leave it on 7.4 until all is ready and then I will clean 7.4 off the server.

As always, thanks for your help and response Brian.  It is greatly appreciated.

Link to comment
Share on other sites

After analyzing the code, I find that a recent change in ini.inc.php will test for the version of PHP it is running under.

The test will have PHP die with the message that CubeCart is not ready for PHP8+ and recommends that PHP7.4 be used.

So, right from the start, a stock install of CC645 is a 'no-go' on PHP8+.

But, I will defeat that kill switch, swap out Smarty 3 for Smarty 4, and see what happens under PHP 8.1.

 

Link to comment
Share on other sites

My guess: Boooooom!  😄

Really, you don't have to go through all that.  I don't want to hack CC just because I am a type A PITA.  I can wait for everything to catch up in a future release... I swear I can...  Really... ahhhhhhhhhhhh!

Link to comment
Share on other sites

21 hours ago, KirkM said:

Really, you don't have to go through all that.  I don't want to hack CC just because I am a type A PITA. 

But at some point, CubeCart will need to be supported on PHP 8 soon, so all of these info will be a bonus to the development of CubeCart. 👍

Link to comment
Share on other sites

  • 6 months later...

Just wanted to pop back in and thank Brian and Al (and whomever else worked on the update) for the php 8.1 compatibility.  Finally got a rare minute to jump over and do some store upgrades and then switch them to php 8.1.

As always, your work is very much appreciated.

One question - Do you know if anything changed in the Foundation skin between 6.4.4 and 6.4.7?  I have a skin that is based on Foundation but is significantly altered in its element arrangement so I would like to not rebuild it if there is no reason to.

Thanks

 

Link to comment
Share on other sites

Thanks Brian.  I have a filediff program.  I was just wondering if I needed to go through it file by file.  Just lazy but since things are pretty significantly re-arranged on my Foundation skin variant, I have to sit and transpose the differences instead of viewing the difference pages and approving the automatic code block updates left to right in the file diff edit window.

I hate it when I have to actually do some work.  Even worse when that work requires me to think.  Thinking is hard.

Link to comment
Share on other sites

1 hour ago, bsmither said:

I would NOT apply the diff file to the filediff program. Guaranteed to result in a hot mess.

 

 

No no.  I have notes of what files have been changed in the skin.  I will run DiffMerge on each of them and carefully update the code on the new CC version skin.  I have very clear remarks on every change.  I just need to carefully examine the code between the old and new to make sure I understand any changes in the new that may affect my modifications.  It is slow and tedious.  And, as I said, I have to think.  Hate that.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...