peridot-php / leo

Next level assertion and matcher library for PHP

Home Page:http://peridot-php.github.io/leo/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PHP syntax error

EvgenyLin opened this issue · comments

Just installed by
composer require --dev peridot-php/peridot peridot-php/leo

$ ./vendor/bin/peridot
PHP Parse error: syntax error, unexpected token "match" in /home/dev/onion/vendor/peridot-php/leo/specs/responder/responder.spec.php on line 18

$ php -v
PHP 8.1.0 (cli) (built: Nov 25 2021 20:22:03) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.0, Copyright (c) Zend Technologies
with Zend OPcache v8.1.0, Copyright (c), by Zend Technologies

$ uname -a
Linux aj 5.4.0-92-lowlatency #103-Ubuntu SMP PREEMPT Fri Nov 26 17:05:05 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

I am getting similar errors:

PHP Parse error: syntax error, unexpected token "match" in .../app/vendor/peridot-php/leo/specs/matcher/match.spec.php on line 11

Parse error: syntax error, unexpected token "match", expecting variable in .../app/vendor/peridot-php/leo/src/Formatter/Formatter.php on line 40

$ php -v
PHP 8.0.29 (cli) (built: Jun 15 2023 05:07:53) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.29, Copyright (c) Zend Technologies
with Zend OPcache v8.0.29, Copyright (c), by Zend Technologies

$ uname -a
Darwin a-macbook.home 22.5.0 Darwin Kernel Version 22.5.0: Mon Apr 24 20:52:43 PDT 2023; root:xnu-8796.121.2~5/RELEASE_ARM64_T8112 arm64