Home GnuPG

Fix self member reference rule for PHP 5.3
587f7440e3f9Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

Fix self member reference rule for PHP 5.3

Summary:
Fixes T8674. Currently, ArcanistSelfMemberReferenceXHPASTLinterRule warns if a fully-qualified class name is used in place of self. This is fine in most cases, but in some specific scenarios fails for PHP 5.3 because self (and also $this) cannot be used in an anonymous closure (see anonymous functions and [[https://wiki.php.net/rfc/closures/removal-of-this | removal of $this in closures]]).

In order to do this, I also had to modify the manner in which configuration was passed to individual linter rule. Previously, it was only possible or an individual linter rule to be set with a configuration value. Once the linter rule had set this value, there was no means by which to allow this value to be shared amongst linter rules.

Depends on D13819.

Test Plan: Added unit tests.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin

Maniphest Tasks: T8674

Differential Revision: https://secure.phabricator.com/D13820

Details

Provenance
Joshua Spence <josh@joshuaspence.com>Authored on Aug 10 2015, 10:49 PM
Parents
rARC6c759ae34396: Improve useless overriding method linter rule
Branches
Unknown
Tags
Unknown

Event Timeline

Joshua Spence <josh@joshuaspence.com> committed rARC587f7440e3f9: Fix self member reference rule for PHP 5.3 (authored by Joshua Spence <josh@joshuaspence.com>).Aug 10 2015, 10:49 PM