Permalink
Browse files

[cmf] update the way constants are handled in data/php_stdlib/

Summary: Hphp people have changed (again) the way builtins are handled.

Test Plan:
cd pfff/data/php_stdlib
make update
make check
 see no dupes
also some recent builtins mentioned in phabricator lint errors such
 as JSON_PRETTY_PRINT are in the generate system/constants.php file

Reviewers: jwatzman, pieter

Reviewed By: jwatzman

CC: sgolemon, neal, bryano, ps, erling

Differential Revision: https://phabricator.fb.com/D1174028
  • Loading branch information...
1 parent 68ff7fe commit acd2e99d27fa6bb36ac073f383cc122394037dea @aryx aryx committed Feb 13, 2014
View
@@ -9,9 +9,8 @@ update:
./stdlib_from_hni.sh ~/local/fbcode/hphp hni
cp -rf ~/local/fbcode/hphp/system/php/* system/
cp -rf ~/local/fbcode/hphp/facebook/system/php/* system/facebook/
- cp -f ~/local/fbcode/hphp/system/idl/constants.idl.json /tmp/
- perl -p -i -e 's/9223372036854775807/0/g;' /tmp/constants.idl.json
- ~/pfff/pfff_test -builtins_of_idl /tmp/constants.idl.json > idl/builtins_constants.idl.php
+ rm -rf system/code_model # too many errors for now
+ php builtin_constants.php > system/constants.php
stdlib: update
rm -rf stdlib/
@@ -0,0 +1,13 @@
+<?php
+
+$arr = get_defined_constants();
+ksort($arr);
+
+echo "<?php\n";
+foreach ($arr as $k => $v) {
+ $v = $v ? $v : -1;
+ echo "define('$k', ";
+ var_export($v);
+ //echo "0";
+ echo ");\n";
+}
@@ -1,9 +1,8 @@
<?php
-// people should not abuse the case insensivity of PHP
+// People should not abuse the case insensivity of PHP!
// used in phabricator
-
const True = 1;
const False = 0;
@@ -2,9 +2,6 @@
// See the files coming from hphp/src/system/classes/ now, e.g.
// arrayaccess.php in this directory.
-// ***************************************************************************
// Used by phabricator
-// ***************************************************************************
-
// http://www.php.net/manual/en/class.com.php
class COM { }
Oops, something went wrong.

0 comments on commit acd2e99

Please sign in to comment.