Ref T7689. This updates our dump of PHPCompatInfo. The useful thing is that it fixes an issue where PHPCompatInfo incorrectly believed that ArrayAccess, Iterator, etc., were introduced in PHP 5.3, raising spurious warnings.
Details
- Reviewers
btrahan - Maniphest Tasks
- T7689: Load handles just-in-time
- Commits
- rPHU3a06e1a0dda8: Update PHPCompatInfo in libphutil
Ran arc lint on a change with ArrayAccess/Iterator.
Diff Detail
- Repository
- rPHU libphutil
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Hm, when I run ./scripts/update_compat_info.php with the latest version of PHP_CompatInfo (dev-master) I get the following:
diff --git i/resources/php_compat_info.json w/resources/php_compat_info.json index 30f1a23..a30d129 100644 --- i/resources/php_compat_info.json +++ w/resources/php_compat_info.json @@ -4702,16 +4702,6 @@ "max": null, "ref": "intl" }, - "intlcal_get_repeated_wall_time_option": { - "min": "5.5.0", - "max": null, - "ref": "intl" - }, - "intlcal_get_skipped_wall_time_option": { - "min": "5.5.0", - "max": null, - "ref": "intl" - }, "intlcal_get_time": { "min": "5.5.0", "max": null, @@ -4782,16 +4772,6 @@ "max": null, "ref": "intl" }, - "intlcal_set_repeated_wall_time_option": { - "min": "5.5.0", - "max": null, - "ref": "intl" - }, - "intlcal_set_skipped_wall_time_option": { - "min": "5.5.0", - "max": null, - "ref": "intl" - }, "intlcal_set_time": { "min": "5.5.0", "max": null, @@ -4847,11 +4827,6 @@ "max": null, "ref": "intl" }, - "intltz_create_time_zone_id_enumeration": { - "min": "5.5.0", - "max": null, - "ref": "intl" - }, "intltz_from_date_time_zone": { "min": "5.5.0", "max": null, @@ -4907,21 +4882,11 @@ "max": null, "ref": "intl" }, - "intltz_get_region": { - "min": "5.5.0", - "max": null, - "ref": "intl" - }, "intltz_get_tz_data_version": { "min": "5.5.0", "max": null, "ref": "intl" }, - "intltz_get_unknown": { - "min": "5.5.0", - "max": null, - "ref": "intl" - }, "intltz_has_same_rules": { "min": "5.5.0", "max": null, @@ -15515,7 +15480,7 @@ }, "interfaces": { "ArrayAccess": { - "min": "5.1.0", + "min": "5.3.0", "max": null }, "Countable": { @@ -15527,11 +15492,11 @@ "max": null }, "Iterator": { - "min": "5.1.0", + "min": "5.3.0", "max": null }, "IteratorAggregate": { - "min": "5.1.0", + "min": "5.3.0", "max": null }, "JsonSerializable": { @@ -15595,7 +15560,7 @@ "max": null }, "Traversable": { - "min": "5.1.0", + "min": "5.3.0", "max": null }, "http\\Exception": { @@ -18852,78 +18817,10 @@ "min": "5.2.4", "max": null }, - "IDNA_CHECK_BIDI": { - "min": "5.4.0", - "max": null - }, - "IDNA_CHECK_CONTEXTJ": { - "min": "5.4.0", - "max": null - }, "IDNA_DEFAULT": { "min": "5.2.4", "max": null }, - "IDNA_ERROR_BIDI": { - "min": "5.4.0", - "max": null - }, - "IDNA_ERROR_CONTEXTJ": { - "min": "5.4.0", - "max": null - }, - "IDNA_ERROR_DISALLOWED": { - "min": "5.4.0", - "max": null - }, - "IDNA_ERROR_DOMAIN_NAME_TOO_LONG": { - "min": "5.4.0", - "max": null - }, - "IDNA_ERROR_EMPTY_LABEL": { - "min": "5.4.0", - "max": null - }, - "IDNA_ERROR_HYPHEN_3_4": { - "min": "5.4.0", - "max": null - }, - "IDNA_ERROR_INVALID_ACE_LABEL": { - "min": "5.4.0", - "max": null - }, - "IDNA_ERROR_LABEL_HAS_DOT": { - "min": "5.4.0", - "max": null - }, - "IDNA_ERROR_LABEL_TOO_LONG": { - "min": "5.4.0", - "max": null - }, - "IDNA_ERROR_LEADING_COMBINING_MARK": { - "min": "5.4.0", - "max": null - }, - "IDNA_ERROR_LEADING_HYPHEN": { - "min": "5.4.0", - "max": null - }, - "IDNA_ERROR_PUNYCODE": { - "min": "5.4.0", - "max": null - }, - "IDNA_ERROR_TRAILING_HYPHEN": { - "min": "5.4.0", - "max": null - }, - "IDNA_NONTRANSITIONAL_TO_ASCII": { - "min": "5.4.0", - "max": null - }, - "IDNA_NONTRANSITIONAL_TO_UNICODE": { - "min": "5.4.0", - "max": null - }, "IDNA_USE_STD3_RULES": { "min": "5.2.4", "max": null @@ -19432,10 +19329,6 @@ "min": "4.0.0", "max": null }, - "INTL_ICU_DATA_VERSION": { - "min": "5.3.7", - "max": null - }, "INTL_ICU_VERSION": { "min": "5.3.7", "max": null @@ -19444,10 +19337,6 @@ "min": "5.4.0", "max": null }, - "INTL_IDNA_VARIANT_UTS46": { - "min": "5.4.0", - "max": null - }, "INTL_MAX_LOCALE_LEN": { "min": "5.2.4", "max": null @@ -26060,50 +25949,6 @@ "min": "5.2.0", "max": null }, - "U_IDNA_ACE_PREFIX_ERROR": { - "min": "5.2.0", - "max": null - }, - "U_IDNA_CHECK_BIDI_ERROR": { - "min": "5.2.0", - "max": null - }, - "U_IDNA_DOMAIN_NAME_TOO_LONG_ERROR": { - "min": "5.4.0", - "max": null - }, - "U_IDNA_ERROR_LIMIT": { - "min": "5.2.0", - "max": null - }, - "U_IDNA_ERROR_START": { - "min": "5.2.0", - "max": null - }, - "U_IDNA_LABEL_TOO_LONG_ERROR": { - "min": "5.2.0", - "max": null - }, - "U_IDNA_PROHIBITED_ERROR": { - "min": "5.2.0", - "max": null - }, - "U_IDNA_STD3_ASCII_RULES_ERROR": { - "min": "5.2.0", - "max": null - }, - "U_IDNA_UNASSIGNED_ERROR": { - "min": "5.2.0", - "max": null - }, - "U_IDNA_VERIFICATION_ERROR": { - "min": "5.2.0", - "max": null - }, - "U_IDNA_ZERO_LENGTH_LABEL_ERROR": { - "min": "5.2.0", - "max": null - }, "U_ILLEGAL_ARGUMENT_ERROR": { "min": "5.2.0", "max": null
dev-master is bound to 1c3cfa5 (Jan 26, 2015).
The default thing I get out of composer require ... is 4.0.0, which is bound to 0f0cdbc (April 4, 2015), so I think 4.0.0 is newer than dev-master.
That said, I can't easily identify where the changes to these SPL interfaces happened (everything was stored in an un-blameable SQLite database for a while, and I'm not hitting anything with terms like SPL and ArrayAccess in git log, and I can't easily bisect with Composer), but I think this is more more up-to-date.
Interesting, the API for v4.0.0 seems to have change and, as such, the ./scripts/update_compat_info.php script doesn't work for me at all.
./scripts/update_compat_info.php Purpose: Updates resources/php_compat_info.json used by ArcanistXHPASTLinter. PHP Fatal error: Class 'Bartlett\CompatInfo\Reference\ReferenceLoader' not found in /home/joshua/workspace/github.com/phacility/libphutil/scripts/update_compat_info.php on line 20 PHP Stack trace: PHP 1. {main}() /home/joshua/workspace/github.com/phacility/libphutil/scripts/update_compat_info.php:0 Fatal error: Class 'Bartlett\CompatInfo\Reference\ReferenceLoader' not found in /home/joshua/workspace/github.com/phacility/libphutil/scripts/update_compat_info.php on line 20 Call Stack: 0.0005 269656 1. {main}() /home/joshua/workspace/github.com/phacility/libphutil/scripts/update_compat_info.php:0
I got a slightly different error than that, but needed to find/replace all PhpSomething with PHPSomething IIRC.