magento/magento2 — pull request #463 by danslo (2014-01-07 11:48:22+00:00)
Title: allow _resolveArguments to do sequential lookups

When resolving the arguments of PHP's internal classes, we cannot be
sure about argument names. In many places of the PHP core, documentation
differs from the implementation.

A good example is the FilterIterator which triggered this bugreport:
- The argument name is documented as $it:
https://github.com/php/php-src/blob/PHP-5.6/ext/spl/internal/filteriterator.inc#L35
- But it is implemented as $iterator:
https://github.com/php/php-src/blob/PHP-5.6/ext/spl/spl_iterators.c#L2305

This can cause problems with PHP runtimes (read: HHVM) that properly
implement the documented specs. See the following HHVM issue for more
information:
https://github.com/facebook/hhvm/pull/1492

The attached patch keeps existing functionality working, but adds an
additional fallback to sequentially based argument lookups. This is
demonstrated in the change to Menu.php.