Skip to content

4.0 | Generic.Functions.CallTimePassByReference: remove sniff #921

Closed

Description

@rodrigoprimo

Description

I suggest marking the Generic.Functions.CallTimePassByReference sniff as deprecated in the next minor version and removing it in 4.0.

Call-time pass-by-reference was deprecated in PHP 5.3 and removed in PHP 5.4.

PHPCS 3.x supports PHP >= 5.4. PHPCS 4.0 will drop support for PHP < 7.2.

There is a PHPCompatibility sniff to check for the use of call-time pass-by-reference: PHPCompatibility.Syntax.ForbiddenCallTimePassByReference.

Activity

  1. jrfnl commented on Apr 2, 2025

    @jrfnl
    Member

    The PHP version PHPCS supports is not relevant to the decision.

    Having said that, I don't disagree with deprecating and removing the sniff. The sniff has always been a bit of an odd-one out between the sniffs in this package and I agree that PHPCompatibility would be the better tool to check for deprecated PHP syntax.

    As PHP 5.4 was released in 2012, with the last security release in 2015, I can't imagine this sniff is still used much, so I think deprecating the sniff and removing it in 4.0 makes sense.

    Action list:

  2. added this to the 4.0.0 milestone on Apr 2, 2025
  3. self-assigned this
    on Apr 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions