Errors in PHP 8.3.6 Creation of dynamic property CI_URI::$config is deprecated

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:

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…