Skip to content

Bug: Wrong @deprecrated annotation in HTTP/Request.php For getMethod() #7334

@donpwinston

Description

@donpwinston

PHP Version

8.2

CodeIgniter4 Version

4.3.1

CodeIgniter4 Installation Method

Composer (using codeigniter4/appstarter)

Which operating systems have you tested for this bug?

macOS

Which server did you use?

apache

Database

No response

What happened?

My VS Code DeveSenses extension flags $request->getMethod() as an error because the entire method is marked as deprecated. Actually only the optional parameter bool $upper is deprecated. I believe the correct way to annotate this is the following:

remove the line "@deprecated The $upper functionality will be removed and this will revert to its PSR-7 equivalent"

Add * #[Deprecated] above the line " * @param bool $upper Whether to return in upper or lower case."

Steps to Reproduce

Install the DevSenses VS Code extension.

Expected Output

No underline for the text getMethod() in your code.

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions