@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Work around a bug in PHP 5.3-ish with abstract methods in interfaces

Summary:
@chad is hitting an issue described in P961, which I think is this bug in PHP: https://bugs.php.net/bug.php?id=43200

Work around it by defining a "PHIDInterface" and having both "Flaggable" and "Policy" extend it, so that there is only one `getPHID()` declaration.

Test Plan: shrug~

Reviewers: chad, btrahan

Reviewed By: chad

CC: chad, aran

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

+12 -5
+3
src/__phutil_library_map__.php
··· 1485 1485 'PhabricatorPHDConfigOptions' => 'applications/config/option/PhabricatorPHDConfigOptions.php', 1486 1486 'PhabricatorPHID' => 'applications/phid/storage/PhabricatorPHID.php', 1487 1487 'PhabricatorPHIDConstants' => 'applications/phid/PhabricatorPHIDConstants.php', 1488 + 'PhabricatorPHIDInterface' => 'applications/phid/interface/PhabricatorPHIDInterface.php', 1488 1489 'PhabricatorPHIDType' => 'applications/phid/type/PhabricatorPHIDType.php', 1489 1490 'PhabricatorPHPMailerConfigOptions' => 'applications/config/option/PhabricatorPHPMailerConfigOptions.php', 1490 1491 'PhabricatorPagedFormExample' => 'applications/uiexample/examples/PhabricatorPagedFormExample.php', ··· 3594 3595 'PhabricatorFlagQuery' => 'PhabricatorCursorPagedPolicyAwareQuery', 3595 3596 'PhabricatorFlagSearchEngine' => 'PhabricatorApplicationSearchEngine', 3596 3597 'PhabricatorFlagSelectControl' => 'AphrontFormControl', 3598 + 'PhabricatorFlaggableInterface' => 'PhabricatorPHIDInterface', 3597 3599 'PhabricatorFlagsUIEventListener' => 'PhabricatorEventListener', 3598 3600 'PhabricatorFormExample' => 'PhabricatorUIExample', 3599 3601 'PhabricatorGarbageCollectorConfigOptions' => 'PhabricatorApplicationConfigOptions', ··· 3844 3846 'PhabricatorPolicyEditController' => 'PhabricatorPolicyController', 3845 3847 'PhabricatorPolicyException' => 'Exception', 3846 3848 'PhabricatorPolicyExplainController' => 'PhabricatorPolicyController', 3849 + 'PhabricatorPolicyInterface' => 'PhabricatorPHIDInterface', 3847 3850 'PhabricatorPolicyManagementShowWorkflow' => 'PhabricatorPolicyManagementWorkflow', 3848 3851 'PhabricatorPolicyManagementUnlockWorkflow' => 'PhabricatorPolicyManagementWorkflow', 3849 3852 'PhabricatorPolicyManagementWorkflow' => 'PhutilArgumentWorkflow',
+1 -3
src/applications/flag/interface/PhabricatorFlaggableInterface.php
··· 1 1 <?php 2 2 3 - interface PhabricatorFlaggableInterface { 4 - 5 - public function getPHID(); 3 + interface PhabricatorFlaggableInterface extends PhabricatorPHIDInterface { 6 4 7 5 }
+7
src/applications/phid/interface/PhabricatorPHIDInterface.php
··· 1 + <?php 2 + 3 + interface PhabricatorPHIDInterface { 4 + 5 + public function getPHID(); 6 + 7 + }
+1 -2
src/applications/policy/interface/PhabricatorPolicyInterface.php
··· 1 1 <?php 2 2 3 - interface PhabricatorPolicyInterface { 3 + interface PhabricatorPolicyInterface extends PhabricatorPHIDInterface { 4 4 5 - public function getPHID(); 6 5 public function getCapabilities(); 7 6 public function getPolicy($capability); 8 7 public function hasAutomaticCapability($capability, PhabricatorUser $viewer);