Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PHP] Updates to keep up with PHP 8 #2997

Merged
merged 8 commits into from
Feb 14, 2021
Merged

[PHP] Updates to keep up with PHP 8 #2997

merged 8 commits into from
Feb 14, 2021

Commits on Feb 14, 2021

  1. [PHP] Add WeakMap class to internal list

    PHP 8.0 adds a new [`WeakMap` built-in class](https://php.watch/versions/8.0/weakmap). Adding it to `KEYWORDS.keyword` list.
    Ayesh committed Feb 14, 2021
    Configuration menu
    Copy the full SHA
    3eb97e5 View commit details
    Browse the repository at this point in the history
  2. [PHP] Add UnhandledMatchError exception type

    PHP 8.0 match expression throws an [`UnhandledMatchError` exception](https://php.watch/versions/8.0/match-expression#UnhandledMatchError). It's a new built-in exception type, and adding it the keywords list.
    Ayesh committed Feb 14, 2021
    Configuration menu
    Copy the full SHA
    5f758e1 View commit details
    Browse the repository at this point in the history
  3. [PHP] Add new mixed type in PHP 8.0

    PHP 8.0 adds a new [`mixed` type](https://php.watch/versions/8.0/mixed-type) as a new reserved keyword and a type.
    Ayesh committed Feb 14, 2021
    Configuration menu
    Copy the full SHA
    4750304 View commit details
    Browse the repository at this point in the history
  4. [PHP] Add Stringable interface

    PHP 8.0 adds a new built-in interface called [`Stringable`](https://php.watch/versions/8.0/stringable). Adding it to the keywords list.
    Ayesh committed Feb 14, 2021
    Configuration menu
    Copy the full SHA
    7200fc6 View commit details
    Browse the repository at this point in the history
  5. [PHP] Add trait to list of class-like naming patterns

    Traits follow [class-like syntax](https://www.php.net/manual/en/language.oop5.traits.php), and was missing from the class-like naming pattern matches.
    Ayesh committed Feb 14, 2021
    Configuration menu
    Copy the full SHA
    368c792 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    1e88f4d View commit details
    Browse the repository at this point in the history
  7. [PHP] Number pattern improvements

    Expands the number detection to support to all numerals supported up to PHP 8.1.
     - Decimal numbers
     - Floats
     - Binary numbers (`0b1100` and `0B1100`).
     - Hex number support (`0xAFAF` and `0XAFAF`).
     - Octal number support (`0777`)
     - [New `0o` and `0O` prefix support for Octals](https://php.watch/versions/8.1/explicit-octal-notation) (`0o777` and `0O777`) (Already accepted and merged to upcoming PHP 8.1)
     - Scientific notation (`7E-10` and `1.2e3`)
     - [Underscore number separator](https://php.watch/versions/7.4/underscore_numeric_separator) (Already implemented in PHP 7.4)
    Ayesh committed Feb 14, 2021
    Configuration menu
    Copy the full SHA
    eec1a96 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    f9b9abc View commit details
    Browse the repository at this point in the history