Skip to content
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

Support for PHP 8.3 #6278

Open
yasinuddowla opened this issue Apr 22, 2024 · 9 comments
Open

Support for PHP 8.3 #6278

yasinuddowla opened this issue Apr 22, 2024 · 9 comments

Comments

@yasinuddowla
Copy link

I wanted to use PHP 8.3 with CI 3.1.13

I've installed PHP 8.3 and it gives the following error.

A PHP Error was encountered
Severity: 8192
Message: Creation of dynamic property CI_URI::$config is deprecated
Filename: core/URI.php
Line Number: 102
Backtrace:
  File: /Users/yasinuddowla/sites/dana/portal/public/admin.php
  Line: 299
  Function: require_once
@jafjaf
Copy link

jafjaf commented Apr 23, 2024

Codeigniter 3.1.13 don't support PHP >8.2 (yet), you can however update on your own using these changes

If you instead would like an updated repo with PHP 8.2 support see;

@otengkwame
Copy link

otengkwame commented Apr 23, 2024

I am extending a copy of CodeIgniter 3 that works with PHP 8.3 from here: https://github.com/sylynder/webby, https://github.com/sylynder/engine. I am also borrowing some concepts from CodeIgniter 4

@putuardiworks
Copy link

@jafjaf, I would like to ask: with the current CodeIgniter v3.1.13, what is the latest stable PHP version that works out-of-the-box?

@mariolucasdev
Copy link

@jafjaf, I would like to ask: with the current CodeIgniter v3.1.13, what is the latest stable PHP version that works out-of-the-box?

currently i have 2 projects using the Codeigniter version 3.1.13 running with php 8.2.

@jafjaf
Copy link

jafjaf commented May 26, 2024

@jafjaf, I would like to ask: with the current CodeIgniter v3.1.13, what is the latest stable PHP version that works out-of-the-box?

A fresh install of Codeigniter 3 supports PHP version up to and including 8.1.
If you're going to start a new project it's better to use Codeigniter 4, however if you're already using Codeigniter 3 and need PHP support above 8.1 you can implement the changes mentioned above.

I'm also running multiple projects using PHP 8.3 and Codeigniter 3 (with PHP >8.2) changes implemented.
More specifically these changes

@putuardiworks
Copy link

I didn't expect to get a response this fast. Wow, the community is still great 🥳

@mariolucasdev Do you run CodeIgniter v3.1.13 with PHP 8.2 without making any changes to the system?

@jafjaf So, it is safe to use PHP 8.1? And if I want to upgrade to PHP 8.2 or higher, then I need to make the changes you mentioned? I am still working on a CodeIgniter 3 project, so I need to know which is the latest PHP version that is safe to upgrade to.

@jafjaf
Copy link

jafjaf commented May 27, 2024

I didn't expect to get a response this fast. Wow, the community is still great 🥳

@mariolucasdev Do you run CodeIgniter v3.1.13 with PHP 8.2 without making any changes to the system?

@jafjaf So, it is safe to use PHP 8.1? And if I want to upgrade to PHP 8.2 or higher, then I need to make the changes you mentioned? I am still working on a CodeIgniter 3 project, so I need to know which is the latest PHP version that is safe to upgrade to.

It depends on how you define "safe."

  • The repository is >10 years old.
  • CodeIgniter 3 no longer has active official support.
  • There is only one official maintainer.
  • It has been superseded by the more up-to-date CodeIgniter 4 framework.

However, the community remains quite active, and there are ongoing efforts to keep CodeIgniter 3 viable with updates and patches.

Supporting PHP versions for CodeIgniter 3

  • PHP 8.1: Generally considered safe to use with CodeIgniter 3, with some minor adjustments.
  • PHP 8.2 and higher: Require changes to ensure compatibility.

@poodle123
Copy link

Pocketarc Fork already works with PHP 8.3 without any issues. You just have to adapt your own code where needed:

https://github.com/pocketarc/codeigniter

@jafjaf
Copy link

jafjaf commented May 29, 2024

Pocketarc Fork already works with PHP 8.3 without any issues. You just have to adapt your own code where needed:

https://github.com/pocketarc/codeigniter

Quoting jamieburchell below from #6173

The releases from this fork appear to be based on the develop branch and from scanning the commits, include functionality changes. The develop branch is quite a bit different to the last released version.

IMO it would be better to cherry-pick and apply specific fixes to the latest actual release/master if you want to keep as close as possible to the last official 3.1.13 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants