@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.

Skip anon functions in symbol generation script

Summary:
Filters closures out of symbol generator script, per @epriestley's
comment in T4334

Test Plan:
Before:
eric@eric-dev ~/phabricator/scripts/symbols: echo 'closure.php' | ./generate_php_symbols.php
function php /closure.php
d function php 10 /closure.php
function php /closure.php
a class php 3 /closure.php
a b method php 4 /closure.php

After:
eric@eric-dev ~/phabricator/scripts/symbols: echo 'closure.php' | ./generate_php_symbols.php
d function php 10 /closure.php
a class php 3 /closure.php
a b method php 4 /closure.php

eric@eric-dev ~/phabricator/scripts/symbols: cat closure.php
<?php

class a {
function b() {
$c = function() { return 1; };
$c();
}
}

function d() {
return 2;
}
$e = function() {
return 3;
};

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley

CC: epriestley, Korvin, aran

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

authored by

Eric Stern and committed by
epriestley
14f070a0 febc4947

+4
+4
scripts/symbols/generate_php_symbols.php
··· 34 34 $functions = $root->selectDescendantsOfType('n_FUNCTION_DECLARATION'); 35 35 foreach ($functions as $function) { 36 36 $name = $function->getChildByIndex(2); 37 + // Skip anonymous functions 38 + if (!$name->getConcreteString()) { 39 + continue; 40 + } 37 41 print_symbol($file, 'function', $name); 38 42 } 39 43