Skip to content

Deprecation when running on php 8.2 #192

@masari3

Description

@masari3

Upgrading CodeIgniter 3.1.9 to 3.1.13 with PHP 8.2

When upgrading from CodeIgniter 3.1.9 to v3.1.13 using PHP 8.2, I found that Ruckusing was no longer compatible and produced several deprecated warnings and errors.

Some of the fixes I applied were as follows:


1. vendor/ruckusing/ruckusing-migrations/lib/Ruckusing/FrameworkRunner.php

Add:

#[\AllowDynamicProperties]
public $logger;

2. vendor/ruckusing/ruckusing-migrations/lib/Ruckusing/Adapter/MySQL/Base.php

Refactor the code from around line 1297 to:

$dsn_str = is_array($dsn) ? implode(' ', $dsn) : (string) $dsn;
throw new Ruckusing_Exception(
    "\n\nCould not extract DB connection information from: " . $dsn_str . "\n\n",
    Ruckusing_Exception::INVALID_CONFIG
);

3. vendor/ruckusing/ruckusing-migrations/lib/Ruckusing/Task/Manager.php

Add:

#[\AllowDynamicProperties]
public $_config;

These adjustments resolve PHP 8.2 compatibility issues related to dynamic properties and type handling in the Ruckusing migration library.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions