Skip to content

Bug: PHP 8.5 deprecation warning from ReflectionProperty::setAccessible() in CheckQueryReturnTrait #1318

@zadro

Description

@zadro

PHP Version

8.5.x

CodeIgniter4 Version

4.7.0

Shield Version

1.2.0

Which operating systems have you tested for this bug?

Linux

Which server did you use?

fpm-fcgi

Database

MariaDB 10.11

Did you customize Shield?

No.

What happened?

After upgrading to PHP 8.5, Shield emits a deprecation warning during the normal login flow when recording a login attempt.

The warning comes from src/Models/CheckQueryReturnTrait.php where ReflectionProperty::setAccessible() is called. Since this method has had no effect since PHP 8.1 and is deprecated in PHP 8.5, it appears this call should be removed or skipped.

Steps to Reproduce

1.	Run a CodeIgniter 4 app with Shield on PHP 8.5.
2.	Attempt a normal session-based login.
3.	Observe the deprecation warning from CheckQueryReturnTrait.php.

Expected Output

No deprecation warning should be emitted during authentication on PHP 8.5.

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions