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

"match" is a semi-reserved keyword in PHP 8 #4373

Closed
GrahamCampbell opened this issue Jul 10, 2020 · 1 comment · Fixed by #4374
Closed

"match" is a semi-reserved keyword in PHP 8 #4373

GrahamCampbell opened this issue Jul 10, 2020 · 1 comment · Fixed by #4374
Assignees
Milestone

Comments

@GrahamCampbell
Copy link
Contributor

ParseError: syntax error, unexpected 'Match' (T_MATCH), expecting identifier (T_STRING) or '{'

https://github.com/sebastianbergmann/phpunit/blob/master/src/Framework/MockObject/Builder/Match.php

@GrahamCampbell GrahamCampbell added the type/bug Something is broken label Jul 10, 2020
@GrahamCampbell
Copy link
Contributor Author

Luckily, this is an internal interface, so I can rename it without breaking BC. 😅

@sebastianbergmann sebastianbergmann changed the title PHP 8.0 Match is a semi-reserved word "match" is a semi-reserved keyword in PHP 8 Jul 10, 2020
@sebastianbergmann sebastianbergmann self-assigned this Jul 10, 2020
@sebastianbergmann sebastianbergmann removed the type/bug Something is broken label Jul 10, 2020
@sebastianbergmann sebastianbergmann added this to the PHPUnit 9.3 milestone Jul 10, 2020
jrfnl added a commit to PHPCSStandards/PHPCSUtils that referenced this issue Jul 21, 2020
PHPUnit 9.3 is not yet released (expected end of August), but is slated to add official PHP 8 support to PHPUnit.

As some tests are failing due to the new reserved keyword `match` being used in PHPUnit, I'm (temporarily) upping the PHPUnit requirement for PHP 8 explicitly to PHPUnit 9.3 (dev).

Once PHPUnit 9.3 has been released, this condition can be removed in favour of changing the requirements in the `composer.json` file.

Ref: sebastianbergmann/phpunit#4373
jrfnl added a commit to PHPCSStandards/PHPCSUtils that referenced this issue Jul 21, 2020
PHPUnit 9.3 is not yet released (expected end of August), but is slated to add official PHP 8 support to PHPUnit.

As some tests are failing due to the new reserved keyword `match` being used in PHPUnit, I'm (temporarily) upping the PHPUnit requirement for PHP 8 explicitly to PHPUnit 9.3 (dev).

Once PHPUnit 9.3 has been released, this condition can be removed in favour of changing the requirements in the `composer.json` file.

Note: for now the `--ignore-platform-reqs` is still needed as the underlying dependencies may still not have tagged a version which officially supports PHP 8 and this would cause a requirement conflict.

Ref: sebastianbergmann/phpunit#4373
accu-clw added a commit to acculimited/postmen-sdk that referenced this issue Jan 2, 2021
For reference, I can reproduce when running tests through PHP 8.0.
  - sebastianbergmann/phpunit#4373
aledeg added a commit to aledeg/FreshRSS that referenced this issue Feb 27, 2021
Tests weren't running with the previous version because of a reserved
word in PHP8. The latest version of the library fixes that.
See sebastianbergmann/phpunit#4373 for more
information.
Alkarex pushed a commit to FreshRSS/FreshRSS that referenced this issue Feb 27, 2021
Tests weren't running with the previous version because of a reserved word in PHP8. The latest version of the library fixes that.
See sebastianbergmann/phpunit#4373 for more
information.
schakko pushed a commit to NeosIT/active-directory-integration2 that referenced this issue Apr 13, 2021
[fixed] fixes #132: Uncaught type error when bitwise comparing the userAccountControl attribute
[removed] at() matcher, as it became deprecated with upgrade to PHPUnit 9.3
[changed] PHPUnit version to 9.3 to prevent sebastianbergmann/phpunit#4373
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants