Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

X-Cart Classic module PHP compatibility

 
Reply
   X-Cart forums > X-Cart 4 > Third Party Add-Ons for X-Cart 4
 
Thread Tools
  #1  
Old 02-14-2025, 11:52 PM
  vasilis's Avatar 
vasilis vasilis is offline
 

X-Adept
  
Join Date: Feb 2009
Posts: 761
 

Default X-Cart Classic module PHP compatibility

I have developed a module for the last minor versions of 4.4.x, 4.5.x, 4.6.x and 4.7.x branches/editions and I was wordering if I need to provide additional code for PHP incompatibilities, i.e., I have taken for granted that sites that still use X-Cart Classic, run on older PHP versions for which the X-Cart versions are compatible, so I built my module to be compatible with these PHP versions, but should I provide any coding/patches for my module to run in newer PHP versions, in case many old sites have patched their code for later PHP versions?


For example, in the File area, for the branches 4.4.x - 4.7.x, there are PHP patches for PHP 7.1 - 7.3 and a manual patch for PHP 7.4. Should I apply all these patches to each branch and check that the module will be compatible with PHP 7.4?
__________________
Vasilis Vrontisis
X-Cart Development, Maintenance & Customization
https://[URL="http://www.craftforweb.com"]craftforweb.com[/url]
vasilis@craftforweb.com
Reply With Quote
  #2  
Old 02-20-2025, 10:12 AM
 
Dougrun Dougrun is offline
 

X-Adept
  
Join Date: Apr 2012
Posts: 909
 

Default Re: X-Cart Classic module PHP compatibility

yes.
__________________
4.7.x xcart store
Business 5.4xx
Reply With Quote
  #3  
Old 02-21-2025, 03:00 AM
  vasilis's Avatar 
vasilis vasilis is offline
 

X-Adept
  
Join Date: Feb 2009
Posts: 761
 

Default Re: X-Cart Classic module PHP compatibility

There are 3 options to consider:


1. In case all old stores have applied the PHP 7.x patches, I should provide module code compatible with PHP 7.x from the beginning.

2. If on the other hand, not all stores have applied the PHP 7.x patches, I guess I should provide distribution packs with code compatible with the old versions of PHP that the x-cart store was compatible with, when it's version was released AND additional module patches for PHP 7.x compatibility to be applied after the module is installed, in case the store has applied the PHP patches.

3. Or, just add conditional code in the distribution packs that checks for PHP version of the running store and runs alternative code accordingly (i.e., without any patches - just the distribution pack with the conditional code).


What option would be the most realistic to follow?
__________________
Vasilis Vrontisis
X-Cart Development, Maintenance & Customization
https://[URL="http://www.craftforweb.com"]craftforweb.com[/url]
vasilis@craftforweb.com
Reply With Quote
  #4  
Old 02-21-2025, 09:45 AM
 
Dougrun Dougrun is offline
 

X-Adept
  
Join Date: Apr 2012
Posts: 909
 

Default Re: X-Cart Classic module PHP compatibility

2. always go with the latest code (patches included)
__________________
4.7.x xcart store
Business 5.4xx
Reply With Quote

The following user thanks Dougrun for this useful post:
vasilis (02-21-2025)
  #5  
Old 02-25-2025, 07:31 AM
 
thebluedoorboutique thebluedoorboutique is offline
 

Senior Member
  
Join Date: May 2011
Posts: 171
 

Default Re: X-Cart Classic module PHP compatibility

Agreed. I'm running 4.4.5 on PHP 8.2.
__________________
X-Cart Classic 4.4.X
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Third Party Add-Ons for X-Cart 4


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 05:09 AM.

   

 
X-Cart forums © 2001-2020