Add a warning when iterating over objects
commit1ed51bb6b0eac91777f7c484d6b677072baeae4b
authorOguz Ulgen <oulgen@fb.com>
Tue, 31 Aug 2021 00:42:20 +0000 (30 17:42 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Tue, 31 Aug 2021 00:43:55 +0000 (30 17:43 -0700)
tree2c2d151f7aada8bdd64e0de1fd7af9c5f0a94603
parent0b23d22e7d141a55517006bc5b503181cec8a225
Add a warning when iterating over objects

Summary: We want to kill userland iterators because they re-enter C++ code. Lets add a warning to detect them.

Reviewed By: viratyosin

Differential Revision: D30644814

fbshipit-source-id: 0af3571c0344c3773b6aea83fa192792ab6914c2
hphp/runtime/base/runtime-option.h
hphp/runtime/vm/iter.cpp
hphp/test/slow/iterator/iter-over-objects.php [new file with mode: 0644]
hphp/test/slow/iterator/iter-over-objects.php.expectf [new file with mode: 0644]
hphp/test/slow/iterator/iter-over-objects.php.opts [new file with mode: 0644]