composer2nix icon indicating copy to clipboard operation
composer2nix copied to clipboard

Parse error when running `composer2nix`

Open WolfangAukang opened this issue 2 years ago • 1 comments

When I run composer2nix (got it by installing through composer globally) on a PHP project, it seems everything is running fine, but it stops at the following error:

Parse error: syntax error, unexpected '|', expecting variable (T_VARIABLE) in /home/bjorn/.config/composer/vendor/svanderburg/pndp/src/PNDP/AST/NixFunction.php on line 19

WolfangAukang avatar Mar 25 '22 17:03 WolfangAukang

Found the issue. I am currently using PHP 7.4 and it does not support mixed types. Not sure if it is a good idea to specify the necessary PHP version on the composer.json file.

WolfangAukang avatar Mar 31 '22 13:03 WolfangAukang