From beff71282013f01609815acd3b8819685112ee4a Mon Sep 17 00:00:00 2001 From: Fred Emmott Date: Thu, 18 Oct 2018 09:44:23 -0700 Subject: [PATCH] Support typed user attributes --- .hhconfig | 1 + composer.lock | 203 +++++----------------------------------- tests/ExpectObjTest.php | 2 +- 3 files changed, 24 insertions(+), 182 deletions(-) diff --git a/.hhconfig b/.hhconfig index 440d6db..747ac72 100644 --- a/.hhconfig +++ b/.hhconfig @@ -5,3 +5,4 @@ disallow_non_arraykey_keys=true disallow_unsafe_comparisons=true decl_override_require_hint=true enable_experimental_tc_features=shape_field_check,sealed_classes +user_attributes= diff --git a/composer.lock b/composer.lock index 312c811..0086c12 100644 --- a/composer.lock +++ b/composer.lock @@ -91,20 +91,20 @@ }, { "name": "hhvm/hsl", - "version": "v3.28.0", + "version": "v3.29.0", "source": { "type": "git", "url": "https://github.com/hhvm/hsl.git", - "reference": "483c5e98e2a389f11e36a643d5aef06b024b6eba" + "reference": "2a9204def57fbd0446fd7862a8d2b6f74790bd44" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/hhvm/hsl/zipball/483c5e98e2a389f11e36a643d5aef06b024b6eba", - "reference": "483c5e98e2a389f11e36a643d5aef06b024b6eba", + "url": "https://api.github.com/repos/hhvm/hsl/zipball/2a9204def57fbd0446fd7862a8d2b6f74790bd44", + "reference": "2a9204def57fbd0446fd7862a8d2b6f74790bd44", "shasum": "" }, "require": { - "hhvm": "^3.28.0", + "hhvm": "^3.29.0", "hhvm/hhvm-autoload": "^1.4" }, "require-dev": { @@ -122,127 +122,10 @@ "MIT" ], "description": "The Hack Standard Library", - "time": "2018-08-27T18:09:57+00:00" + "time": "2018-10-17T15:50:15+00:00" } ], "packages-dev": [ - { - "name": "facebook/definition-finder", - "version": "v2.1.1", - "source": { - "type": "git", - "url": "https://github.com/hhvm/definition-finder.git", - "reference": "347f0a5fb9acd6ea6953de4f7051141dcc5c75cd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/hhvm/definition-finder/zipball/347f0a5fb9acd6ea6953de4f7051141dcc5c75cd", - "reference": "347f0a5fb9acd6ea6953de4f7051141dcc5c75cd", - "shasum": "" - }, - "require": { - "hhvm": "^3.26.0", - "hhvm/hhast": "^3.28.1", - "hhvm/hhvm-autoload": "^1.6", - "hhvm/hsl": "^3.26.0", - "hhvm/type-assert": "^3.2" - }, - "require-dev": { - "91carriage/phpunit-hhi": "~5.1", - "facebook/fbexpect": "^1.0.0", - "phpunit/phpunit": "~5.1" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ], - "files": [ - "autoload_files.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Find definitions in PHP or Hack files. Useful for autoloaders.", - "homepage": "https://github.com/hhvm/definitions-finder", - "keywords": [ - "autoload", - "definitions", - "hack", - "hhvm" - ], - "time": "2018-08-31T19:24:45+00:00" - }, - { - "name": "facebook/fbmarkdown", - "version": "v1.3.1", - "source": { - "type": "git", - "url": "https://github.com/hhvm/fbmarkdown.git", - "reference": "581c301d7523aa4354276297747b4441d70b0f3f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/hhvm/fbmarkdown/zipball/581c301d7523aa4354276297747b4441d70b0f3f", - "reference": "581c301d7523aa4354276297747b4441d70b0f3f", - "shasum": "" - }, - "require": { - "hhvm/hhvm-autoload": "^1.5", - "hhvm/hsl": "^1.1|^3.26.0", - "hhvm/type-assert": "^3.1" - }, - "require-dev": { - "91carriage/phpunit-hhi": "~5.7", - "facebook/fbexpect": "^0.4.0|^1.1.0", - "hhvm/hhast": "^1.0|^3.26.0", - "phpunit/phpunit": "~5.7" - }, - "type": "library", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Markdown parser and renderer for Hack", - "keywords": [ - "facebook", - "gfm", - "hack", - "markdown" - ], - "time": "2018-08-31T20:02:36+00:00" - }, - { - "name": "facebook/hh-apidoc", - "version": "v0.1", - "source": { - "type": "git", - "url": "https://github.com/hhvm/hh-apidoc.git", - "reference": "10f05bf1d36990e4d7ef2fb7b7f344df1e3c9b5f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/hhvm/hh-apidoc/zipball/10f05bf1d36990e4d7ef2fb7b7f344df1e3c9b5f", - "reference": "10f05bf1d36990e4d7ef2fb7b7f344df1e3c9b5f", - "shasum": "" - }, - "require": { - "facebook/definition-finder": "^2.0.0", - "facebook/fbmarkdown": "^1.0", - "facebook/hh-clilib": "^1.0.0", - "hhvm": "^3.27.0", - "hhvm/hhast": "^3.26.0", - "hhvm/hsl": "^1.4|^3.26.0" - }, - "type": "library", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "time": "2018-06-29T16:31:51+00:00" - }, { "name": "facebook/hh-clilib", "version": "v1.2.1", @@ -280,31 +163,28 @@ }, { "name": "hhvm/hacktest", - "version": "v1.0", + "version": "v1.2", "source": { "type": "git", "url": "https://github.com/hhvm/hacktest.git", - "reference": "36708c4b05912aa57d1639bfd26608d05d6064a6" + "reference": "d83f09283dd60a8001807654afd2de67d8a26cc3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/hhvm/hacktest/zipball/36708c4b05912aa57d1639bfd26608d05d6064a6", - "reference": "36708c4b05912aa57d1639bfd26608d05d6064a6", + "url": "https://api.github.com/repos/hhvm/hacktest/zipball/d83f09283dd60a8001807654afd2de67d8a26cc3", + "reference": "d83f09283dd60a8001807654afd2de67d8a26cc3", "shasum": "" }, "require": { - "facebook/hh-apidoc": "^0.1", - "facebook/hh-clilib": "^1.0", + "facebook/hh-clilib": "^1.2.1", "hhvm": "^3.28.0", "hhvm/hhvm-autoload": "^1.6", "hhvm/hsl": "^3.26", "hhvm/type-assert": "^3.2" }, "require-dev": { - "91carriage/phpunit-hhi": "^5.7", - "facebook/fbexpect": "^1.0.0", - "hhvm/hhast": "^3.27", - "phpunit/phpunit": "^5.7" + "facebook/fbexpect": "^2.0.0", + "hhvm/hhast": "^3.27" }, "bin": [ "bin/hacktest" @@ -315,58 +195,20 @@ "MIT" ], "description": "The Hack Test Library", - "time": "2018-09-19T02:15:14+00:00" - }, - { - "name": "hhvm/hhast", - "version": "v3.28.1", - "source": { - "type": "git", - "url": "https://github.com/hhvm/hhast.git", - "reference": "ef96527025803cb41ab13f657651cef3ff5bfb8f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/hhvm/hhast/zipball/ef96527025803cb41ab13f657651cef3ff5bfb8f", - "reference": "ef96527025803cb41ab13f657651cef3ff5bfb8f", - "shasum": "" - }, - "require": { - "facebook/hh-clilib": "^1.1.1", - "hhvm": "^3.28.0", - "hhvm/hsl": "^1.0.0|^3.26.0", - "hhvm/type-assert": "^3.1" - }, - "require-dev": { - "91carriage/phpunit-hhi": "^5.7", - "facebook/fbexpect": "^1.1.0", - "facebook/hack-codegen": "~3.2.1", - "hhvm/hhvm-autoload": "^1.5", - "phpunit/phpunit": "^5.7" - }, - "bin": [ - "bin/hhast-lint", - "bin/hhast-inspect" - ], - "type": "library", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "time": "2018-08-29T18:15:15+00:00" + "time": "2018-10-17T22:18:04+00:00" }, { "name": "hhvm/type-assert", - "version": "v3.2.3", + "version": "v3.2.4", "source": { "type": "git", "url": "https://github.com/hhvm/type-assert.git", - "reference": "a6bdab8c7f9be9e3021ef08fc465d86d63c747b0" + "reference": "27909c55ac5d75cac9e3f38f95f43afd7746a949" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/hhvm/type-assert/zipball/a6bdab8c7f9be9e3021ef08fc465d86d63c747b0", - "reference": "a6bdab8c7f9be9e3021ef08fc465d86d63c747b0", + "url": "https://api.github.com/repos/hhvm/type-assert/zipball/27909c55ac5d75cac9e3f38f95f43afd7746a949", + "reference": "27909c55ac5d75cac9e3f38f95f43afd7746a949", "shasum": "" }, "require": { @@ -375,10 +217,9 @@ "hhvm/hsl": "^1.0|^3.26.0" }, "require-dev": { - "91carriage/phpunit-hhi": "~5.1", - "facebook/fbexpect": "^0.4.0|^1.0.0", - "hhvm/hhast": "^3.27", - "phpunit/phpunit": "~5.1" + "facebook/fbexpect": "^2.0.0", + "hhvm/hacktest": "^1.0", + "hhvm/hhast": "^3.27" }, "type": "library", "extra": { @@ -395,7 +236,7 @@ "TypeAssert", "hack" ], - "time": "2018-08-27T19:17:44+00:00" + "time": "2018-10-16T15:54:41+00:00" } ], "aliases": [], diff --git a/tests/ExpectObjTest.php b/tests/ExpectObjTest.php index 5f6ab01..c3dea5a 100644 --- a/tests/ExpectObjTest.php +++ b/tests/ExpectObjTest.php @@ -10,7 +10,7 @@ namespace Facebook\FBExpect; -use type Facebook\HackTest\HackTest; +use type Facebook\HackTest\{DataProvider, HackTest}; final class ExpectObjTestException extends \Exception {}