opensourcepos / opensourcepos

Open Source Point of Sale is a web based point of sale application written in PHP using CodeIgniter framework. It uses MySQL as the data back end and has a Bootstrap 3 based user interface.

Home Page:http://www.opensourcepos.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CodeIgniter 4.5.0 drops support for PHP versions before 8.1.0

objecttothis opened this issue · comments

OpensourcePOS Version

opensourcepos 3.4.0-dev

Description

Looks like we will need to officially end support for php 7.4.x and 8.0.x in OSPOS 3.4.0. This is because CI4 does not support them as of 4.5.0 (https://codeigniter4.github.io/CodeIgniter4/intro/requirements.html). Possibly another option would be to release 3.4.0 on CI 4.4.8, then the next minor release after 3.4.0 we bump to CI 4.5.0 and drop support for PHP 7.4 and 8.0 flavors. @jekkos et. al., can you weigh in on this? It's kind of a big decision.

Verify you searched open requests in OpensourcePOS

  • I agree I have searched Open Requests

both 7.4 and 8.0 are EOL

For now I've bumped CodeIgniter to 4.4.8 which is the last version with PHP 7.4.x and 8.0.x support.

I would move forward with this. Ospos is currently the only PHP app that is holding me back to remove PHP7.4 from my server. All other applications are on PHP 8.x already. Also I believe that keeping 7.4 installed is not straightforward as on Ubuntu I need a special PPA for this.

I downloaded ci4-branch (https://github.com/opensourcepos/opensourcepos/tree/ci4-branch). Since php7.4 is left behind, as I mentioned before I want to fully support the migration to codeigniter 4.5.
I ran the code, noticed that there are three connections to the database. I tried to configure it and I think I did it correctly, but I got a blank screen.

I downloaded all the code and just configured it. If there's anything else I need to do, please let me know.

Take a look at README.md. the commands to install packages and build are there.

Take a look at README.md. the commands to install packages and build are there.

Thank you, I'm already reading the instructions. One question, is this version still compatible with PHP 7.4 or is it only for PHP 8.1 onwards?

The ci-branch currently is on CI 4.4.8 which is the last branch to support 7.4 and 8.0. Based on @jekkos feedback, it's probably best for us to move it to CI 4.5.0 which drops support for those versions. There are two reasons for this being a good thing:

  • Neither of those PHP versions are receiving security patches any longer, so the more time that goes by, the more likely a vulnerability will cause problems for OSPOS deployments.
  • There are not a lot of people able to help finish getting the conversion to CI4 done. Not needing to develop for compatibility with 7.4 and 8.0 will reduce the amount of time needed for me to finish this.

If anyone has good reason not to drop support for 7.4 and 8.0 I'm all ears, but they need to speak up soon.

I vote for the motion to upgrade to CI 4.5.0.

I think migrating OSPOS to CodeIgniter 4 can be done very quickly. The issue lies in sales and purchases; that's where the real complexity lies. I also suggest not relying so much on Bootstrap and finding a way to call tables more dynamically, using foreach. I have it set up like this in OSPOS, and it allows for much more customization.

We need to use jQuery, but not rely on opensourcepos.min.js. Relying on it limits us to having an updated version of jQuery. We should find another way to call modals, using the frontend more.

Screenshot_20240412_063907
Screenshot_20240412_064110
I customized the view to use a different type of modal window, one that allows for more customization.

And this is done using foreach to display the products in the items module
WhatsApp Image 2024-04-12 at 6 45 57 AM
WhatsApp Image 2024-04-12 at 6 45 58 AM

I think migrating OSPOS to CodeIgniter 4 can be done very quickly. The issue lies in sales and purchases; that's where the real complexity lies. I also suggest not relying so much on Bootstrap and finding a way to call tables more dynamically, using foreach. I have it set up like this in OSPOS, and it allows for much more customization.

Feel free to help contribute code to fix the changes, but we are doing one thing at a time. the ci4-branch is just focused on the existing functionality migrating to CI4. After that's done when we make UI changes and the like, that will be a part of a different branch. The more people contributing, the faster this will go.

I vote for the motion to upgrade to CI 4.5.0.

OK, sounds like enough people are on board. On Monday I will bump the ci4-branch to CI 4.5.0 and make whatever code changes need to happen for it to build properly.