I am getting errors after install. Any suggestions on how to fix this?
“Creation of dynamic property CI_URI::$config is deprecated”
“Creation of dynamic property CI_DB_mysqli_driver::$failover is deprecated”
Do I need to downgrade php to an older version?
Hi there, welcomd,
CodeIgniter, which is what InvoicePlane was built upon is NOT compatible with PHP 8.2 and beyond.
We’ve prepared InvoicePlane just in case that ever happens.
You’re in luck. Someone made a pull-request which would make InvoicePlane work with PHP 8.3 (In your caae)
It should be a fairly easy fix: CodeIgniter3 for php-8.2+ and maintained by pocketarc by sudwebdesign · Pull Request #1161 · InvoicePlane/InvoicePlane · GitHub
adjust composer.json
for a maintained version of CodeIgniter (and composer update
adjust index.php
for that maintained version of CodeIgniter
1 or 2 fixes in InvoicePlane’s codebase
We have 1 more version to go (version 1.6.3) and then we’ll release a beta version with that PR merged
Hope it helps!
I do not understand what you are saying? Do I need to install Codeigniter3? How do I adust compose.json? Help is appreciated.
1 Like
In order for InvoicePlane to work with PHP 8.3 i would do the following:
open `composer.json
replace "codeigniter/framework": "3.1.13",
with "pocketarc/codeigniter": "3.3",
run composer update
open application/libraries/MY_Form_validation.php
Apply the changes you see in the pull-request. This should be your new code :
function run($config = null, &$data = null)
{
(is_object($config)) AND $this->CI = &$config;
return parent::run($data);
}
Open index.php
:
Replace $system_path = 'vendor/codeigniter/framework/system';
with
$system_path = 'vendor/pocketarc/codeigniter/system';
Replace error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT & ~E_USER_NOTICE);
with ~error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT & ~E_USER_NOTICE & ~E_USER_DEPRECATED);`
Keep looking at this pull-request for your example, it has tk look exactly like this:
InvoicePlane:development
← sudwebdesign:pocketarc_codeigniter
opened 11:27PM - 28 Dec 24 UTC
## Description
Minor Changes to work with php 5.4 to 8.4
from auto-maintai… ned codeigniter/framework : 3.1.13
to maintained [pocketarc/codeigniter](https://github.com/pocketarc/codeigniter) : 3.3.0
Need run `composer update` or `composer install`
## Changelog
Thx CI say :
Your system folder path does not appear to be set correctly.
Please open the following file and correct this: `index.php`
From: codeigniter/framework v3.1.13 (official unmaintened)
`$system_path = 'vendor/codeigniter/framework/system';`
To: [pocketarc/codeigniter](https://github.com/pocketarc/codeigniter) v3.3.0 (CI3 maintened fork)
`$system_path = 'vendor/pocketarc/codeigniter/system';`
Filename: MX/Controller.php (add $load class var)
+ Old Fix: Creation of dynamic property Setup::$load is deprecated
+ typo indent Line Numbers: 54,55
From run($module = '', $group = '') #origin CI-3.1.13 To run($config = null, &$data = null)
+ #Fix for [v3.3.0](https://github.com/pocketarc/codeigniter)
Severity: Compile Error Message:
`Declaration of MY_Form_validation::run($module = '', $group = '')`
must be compatible with
`CI_Form_validation::run($config = null, &$data = null)`
Filename: libraries/MY_Form_validation.php Line Number: 34
## Related Issue
Maybe https://github.com/orgs/InvoicePlane/discussions/1067
## Motivation and Context
Simplify maintenance (Only App with this)
## Pull Request Checklist
* [x] My code follows the code formatting guidelines.
* [x] I have an issue ID for this pull request. (Maybe #1067)
* [x] I selected the corresponding branch.
* [x] I have rebased my changes on top of the corresponding branch.
## Issue Type
* [ ] Bugfix
* [x] Improvement of an existing Feature (CI3 maintained)
* [ ] New Feature
Only application/third_party/MX/Controller.php
doesn’t need to be changed, that was only differences in spaces.
Disclaimer :
Until InvoicePlane is on version PHP 8.3 we can only help you once in a while.
But i hope by copying these few lines and running composer update
you won’t run into any problems for a while…