Change tested PHPUnit version

Summary: - a bug was fixed in json_encode in PHP5
 - phpunit added a defined('HHVM_VERSION') test and now tested the incorrect behavior when on HHVM
 - we fixed the bug in HHVM
 - we start failing the test becuase of the defined.

New version of phpunit tests HHVM_VERSION

fixes facebook/hhvm#2913

Reviewed By: @JoelMarcey

Differential Revision: D1377807
Add Composer JSON test to clownlist

Summary: Both HHVM and PHP5 fixed a bug - test is now a bad test.

https://github.com/composer/composer/issues/3049

Reviewed By: @JoelMarcey

Differential Revision: D1377837
Update NEWS for Mos Def

Reviewed By: @ottoni

Differential Revision: D1377939
Disable broken FunctionInfo optimization to avoid unboxing function returns

Summary: It doesn't work because of __call.

Reviewed By: @swtaarrs

Differential Revision: D1373642
add stats for requests timeout and memout in psp

Summary: D949107 added counters in hhvm for # of requests killed due to timeout or memory
exceeds. But that only covered the code path for the main part of the request
and not PSP. This diff hooks up the counters for psp timeouts and memouts.

Reviewed By: bmaurer

Differential Revision: D1365105
Improve HHBBC's interp for SetOpL and SetOpM

Summary: It currently produces TInitCell as the output type of both bytecodes,
regardless of what the inputs are. We can feed the input types to
type-arith to get a better result type.

Reviewed By: @jdelong

Differential Revision: D1360824
Add a more useful constructor to NormalizedInstruction

Summary: It was bugging me that we create a "blank" NI and then fill
in some fields that pretty much have to be there (SrcKey, Func, and
Unit).

Reviewed By: @swtaarrs

Differential Revision: D1378297
Share event hooks between async functions and async generators

Summary: Async generators need the same type of hooks as async functions. Let's
move them to ResumableWaitHandle -- their common parent class.

Reviewed By: @billf

Differential Revision: D1378731
Typecheck parameters in PHP constructor invocations

Summary: NOTE: I assume there's something wrong with this fix since it was basically
the fix from D750432 which was reverted in
rHACK49fd0c13388ec40fe57b5793e301ccb61ba3b742 - but I'm not sure why.
Raising as an RFC; this bug bit me in www code today so there's
something to fix and probably a better way :-) .

Parameters weren't always checked in constructor invocations.

Specifically: calling ##new DerivedClass(...)##, where ##DerivedClass##
is a Hack class that extends a PHP class but inherits the constructor
from the PHP class. In that case the arguments are never visited.

Reviewed By: @pikatchu

Differential Revision: D1374187
Fix null byte in LDAP bindings

Summary: A backport of https://github.com/php/php-src/commit/9af0756dd563d4eef7ce9492a6abb1b99ef74637

Reviewed By: @JoelMarcey

Differential Revision: D1377456
Declare Bash dependency in shebang

Summary: BASH_SOURCE is obviously Bash specific and so the shebang should tell
the system to use Bash.

Also while I was there I used env to get the Bash in the user's PATH
instead of just the system's Bash.
Closes #2915

Reviewed By: @fredemmott

Differential Revision: D1378977

Pulled By: @JoelMarcey
Tidy up hhbc-translator.h

Summary: @mxw's work on code cleanliness inspired me to do some
spring cleaning on hhbc-translator.h.  It wasn't in too bad a shape,
but moving some implementation to the .cpp and grouping the public and
private parts makes it a bit easier to look through.

Reviewed By: @alexmalyshev

Differential Revision: D1378739
Abstract inotify into fsnotify

Summary: In preperation for the FSEvents port of dfind, our inotify service, I
have abstracted out inotify from dfind. Now, dfind use FSNotify, which will be
implemented with inotify on linux and FSEvents on OS X

Reviewed By: @jwatzman

Differential Revision: D1377709
Disable flaky zend test

Reviewed By: @bertmaher
Speed up refcount-opts

Summary: We were spending a lot of time copying the State struct, which had 4
smart::hash_maps in it. I converted two of the three sites to move instead of
copy and switched to smart::flat_map. flat_map is significantly faster to copy
and move, and isn't much slower to insert/look up at the relatively small sizes
these maps tend to be. The net effect is that optimizeRefcounts() is down to
~31% of time in optimize(), from ~35%. It's also no longer the most expensive
optimizatin - that title now belongs to reoptimize().

collectLdStacks has been dead since we removed the simplifier optimization that
replaced some of SpillStack/Call's sources with None so I removed it.

Reviewed By: @jdelong

Differential Revision: D1378844
Script to generate top-down perf-annotated call graphs

Summary: See the script itself for documentation. This is similar to what you
can get from "perf report -s parent -G", but it makes it easier to focus on
specific functions.

Reviewed By: @bertmaher

Differential Revision: D1378984
Make <?hh files in hphp/tools actually pass the typechecker

Summary: onelessclown

Reviewed By: @jwatzman

Differential Revision: D1378486
Implemented xdebug configuration options

Summary: This adds the skeleton required for all the defined xdebug configuration options.
All options are bound to and set to the default values defined at
http://xdebug.org/docs/all_settings.

Since xdebug by default overloads some functions, I added a custom setting
"hhvm.xdebug-not-done.enable", that only registers xdebug functions when
set to true. By default it's false.

Since there are so many different options, I made heavy use of macros to
avoid repetitive code- I hope the style is acceptable?

I also moved some of the xdebug definitions into a header, to reduce the
size of the cpp file a bit.

Reviewed By: @ptarjan

Differential Revision: D1378660
Reorganize func.h

Summary: Reorganize func.h by "grouping similar functionalities" and "separating
interface from implementation".  Also add "documentation" to help people
decipher obscure naming conventions and PHP semantics.

Functions that are not called by anyone are removed.  I've yet to remove
the m_id property of Func::SharedData, although it appears not to
actually be used by anyone, at least through the Func::id() method.  (I
removed the method, though.)

Also turn ParamInfo into a public struct rather than a private one which
does absolutely nothing except implement getters and setters.  If anyone
feels strongly about not doing this, I can just revert the changes to
the non-func.* files, but these info structs are pretty much just meant
to be bags of data, so I don't see what the methods buy us but clutter.

This reorganization and refactor is not done (see the "Junk" section at
the bottom of Func, and the FuncEmitter which ought to be separated
out), but it's ~most of the work and I want to get it in as fast as I
can before I get merge conflicts.

Reviewed By: @jdelong

Differential Revision: D1379054
Revert "Implemented xdebug configuration options"

Summary: Revert D1378660. The new tests are broken in repo mode.

Reviewed By: @swtaarrs

Differential Revision: D1380346