Add switch to disable legacy soft typehints
commit0d20f36fee77a59f4054ae1834f67005dcc5b90f
authorKenneth Li <kqli@fb.com>
Fri, 5 Jul 2019 22:43:00 +0000 (5 15:43 -0700)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Fri, 5 Jul 2019 22:47:10 +0000 (5 15:47 -0700)
tree61eb0cbb519d79cc7f898cce7eaf0c0427a56f76
parentade2bc5ba73c97d1275b6a6aa647ce9717d55a2f
Add switch to disable legacy soft typehints

Summary: As a part of the migration to the new `@` attribute syntax, soft typehints are being migrated to the `__Soft` attribute. This diff makes the legacy syntax a parse error (behind the `--disable-legacy-soft-typehints` switch), thus ensuring that soft typehints are all using the new attribute to make way for the attribute syntax migration.

Reviewed By: hgoldstein

Differential Revision: D16100609

fbshipit-source-id: 89cb272de497c865e652517321eac3111a057c3b
18 files changed:
hphp/hack/src/hh_parse.ml
hphp/hack/src/hh_single_compile.ml
hphp/hack/src/hh_single_type_check.ml
hphp/hack/src/hhbc/hhbc_options.ml
hphp/hack/src/options/globalOptions.ml
hphp/hack/src/options/globalOptions.mli
hphp/hack/src/options/parserOptions.ml
hphp/hack/src/parser/full_fidelity_ast.ml
hphp/hack/src/parser/full_fidelity_parser_env.ml
hphp/hack/src/parser/full_fidelity_parser_errors.ml
hphp/hack/src/parser/full_fidelity_syntax_error.ml
hphp/hack/src/parser/full_fidelity_syntax_error.mli
hphp/hack/src/server/serverConfig.ml
hphp/hack/test/full_fidelity/cases/legacy_soft_typehints/HH_FLAGS [new file with mode: 0644]
hphp/hack/test/full_fidelity/cases/legacy_soft_typehints/no_legacy_soft_typehints.php [new file with mode: 0644]
hphp/hack/test/full_fidelity/cases/legacy_soft_typehints/no_legacy_soft_typehints.php.errors.exp [new file with mode: 0644]
hphp/hack/test/full_fidelity/cases/legacy_soft_typehints/no_legacy_soft_typehints.php.expectf [new file with mode: 0644]
hphp/hack/test/full_fidelity/cases/legacy_soft_typehints/no_legacy_soft_typehints.php.sexp.exp [new file with mode: 0644]