Add a runtime option to raise notices when reading dynamic props.
commit9462cc3d2f6eb27998a575fc1de338c6b93d0472
authorAlexey Toptygin <alexeyt@fb.com>
Thu, 2 Aug 2018 18:54:19 +0000 (2 11:54 -0700)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Thu, 2 Aug 2018 18:58:13 +0000 (2 11:58 -0700)
tree83ae7eec4cfe0f6dff77ecd5d399cbdf4aac2661
parent6c290504653c8cd7263d6112c286e2760791a9fb
Add a runtime option to raise notices when reading dynamic props.

Summary:
Add a runtime option that causes a notice to be raised any time a dynamic property is read from an object.
Like the option for creates of dynamic properties, this one intentionally differentiates between property names that came from static strings and those that didn't, and it intentionally ignores instances of stdClass and __PHP_Incomplete_Class.

Reviewed By: markw65

Differential Revision: D9129623

fbshipit-source-id: 260f54f3c90b728f2b66b9affabad810ec9a7239
hphp/runtime/base/object-data.cpp
hphp/runtime/base/object-data.h
hphp/runtime/base/runtime-option.h
hphp/runtime/ext/reflection/ext_reflection.cpp
hphp/runtime/ext/std/ext_std_classobj.cpp
hphp/test/slow/object_property/dynprop_read_notice.php [new file with mode: 0644]
hphp/test/slow/object_property/dynprop_read_notice.php.expectf [new file with mode: 0644]
hphp/test/slow/object_property/dynprop_read_notice.php.opts [new file with mode: 0644]
hphp/test/slow/object_property/dynprop_write_notice.php [moved from hphp/test/slow/object_property/dynprop_notice.php with 100% similarity]
hphp/test/slow/object_property/dynprop_write_notice.php.expectf [moved from hphp/test/slow/object_property/dynprop_notice.php.expectf with 72% similarity]
hphp/test/slow/object_property/dynprop_write_notice.php.opts [moved from hphp/test/slow/object_property/dynprop_notice.php.opts with 100% similarity]