Skip to content

Commit

Permalink
Add a conflict with nikic/php-parser (see contao#2002)
Browse files Browse the repository at this point in the history
Description
-----------

As of version 4.7, the PHP parser supports PHP 8 match expressions, which unfortunately [breaks PHPUnit](nikic/PHP-Parser#672 (comment)) under PHP 7.4.

```
ERROR: ParseError - vendor/phpunit/phpunit/src/Framework/MockObject/Builder/ParametersMatch.php:15:35 - Syntax error, unexpected T_MATCH on line 15 (see https://psalm.dev/173)
interface ParametersMatch extends Match

ERROR: ParseError - vendor/phpunit/phpunit/src/Framework/MockObject/Builder/ParametersMatch.php:34:40 - Syntax error, unexpected ';', expecting '{' on line 34 (see https://psalm.dev/173)
    public function with(...$arguments);

ERROR: ParseError - vendor/phpunit/phpunit/src/Framework/MockObject/Builder/ParametersMatch.php:47:40 - Syntax error, unexpected ';', expecting '{' on line 47 (see https://psalm.dev/173)
    public function withAnyParameters();
```

The issue has been reported in nikic/PHP-Parser#690, so I hope it will be fixed in version 4.7.1.

Commits
-------

00ed9a0 Add a conflict with nikic/php-parser
  • Loading branch information
leofeyer authored and Alexej Kossmann committed Apr 6, 2021
1 parent a6b5ac4 commit 0e34213
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@
"contao/core": "*",
"contao/manager-plugin": "<2.0 || >=3.0",
"doctrine/persistence": "1.3.2",
"nikic/php-parser": "4.7.0",
"symfony/config": "<4.4.2",
"symfony/mime": "4.4.* <4.4.10 || 5.0.* <5.0.10 || 5.1.0",
"symfony/security-bundle": "4.4.* <4.4.5",
Expand Down
1 change: 1 addition & 0 deletions monorepo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ composer:
bamarni/composer-bin-plugin: ^1.4
conflict:
doctrine/persistence: 1.3.2
nikic/php-parser: 4.7.0
zendframework/zend-code: <3.3.1

repositories:
Expand Down

0 comments on commit 0e34213

Please sign in to comment.