Skip to content

PHP8 incompatibility #393

@strarsis

Description

@strarsis

@oscarotero: Embed doesn't seem to be compatible with PHP8:

Parse error: syntax error, unexpected token "match", expecting "(" in [...]/vendor/embed/embed/src/functions.php on line 119

https://github.com/oscarotero/Embed/blob/45aaeae8636b8a9d4056c8b5f7bb9aebc1b81557/src/functions.php#L119

Edit: match is a reserved keyword in PHP8.x for match expressions, hence the parse error. When the match function is renamed to something else, e.g. match2, the file parses without errors.

PR ready: #394

Note: Travis CI appears to support PHP 8 now, it may be a nice idea to add PHP 8 to .travis.yml so embed is automatically tested on it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions