Page MenuHomePhabricator

Skip anon functions in symbol generation script
ClosedPublic

Authored by Firehed on Jan 24 2014, 12:58 AM.
Tags
None
Referenced Files
F19504634: D8054.id18222.diff
Fri, Jan 9, 5:42 AM
F19279346: D8054.id18221.diff
Tue, Dec 23, 2:48 AM
F19037420: D8054.diff
Nov 25 2025, 11:24 PM
F18936419: D8054.diff
Nov 10 2025, 8:11 PM
F18828224: D8054.id.diff
Oct 24 2025, 3:13 PM
F18764352: D8054.id.diff
Oct 7 2025, 5:34 AM
F18762733: D8054.diff
Oct 6 2025, 8:24 PM
F18657908: D8054.id18222.diff
Sep 23 2025, 3:59 AM
Tokens
"Mountain of Wealth" token, awarded by raguiar.

Details

Reviewers
epriestley
Group Reviewers
Blessed Reviewers
Commits
Restricted Diffusion Commit
rP14f070a0af79: 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;
};

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

Thanks!

StdClass

I think if this is spelled stdClass we recognize it (maybe).

scripts/symbols/generate_php_symbols.php
38

For completeness this could have a strlen() check, but you can't name a function "0" anyway I suppose.

Closed by commit rP14f070a0af79 (authored by @Firehed, committed by @epriestley).