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

Election.php file giving Parse errors #56

Closed
kbots-tech opened this issue Aug 31, 2021 · 2 comments
Closed

Election.php file giving Parse errors #56

kbots-tech opened this issue Aug 31, 2021 · 2 comments

Comments

@kbots-tech
Copy link

kbots-tech commented Aug 31, 2021

| Q Election.php throwing Parse Error
| --------------------| ---------------
| Type | Support
| Condorcet version | 3.1.0
| PHP version | 7.3.29
| Installation Method | __CondorcetAutoload.php

protected static ?int $_maxParseIteration = null; protected static ?int $_maxVoteNumber = null;

These two lines are causing the below error. I tried doing some debugging and different methods to fix but had simillar issues across the file. What may be causing me to get this issue and any suggestions on how to fix it? I was given a partially done research project to try and working without any prior instructions other than the errors telling me it couldn't find the __CondorcetAutoload.php so I started trying to get this working.

Thanks!

Parse error: syntax error, unexpected '?', expecting function (T_FUNCTION) or const (T_CONST) in C:\Users\mcurr\Documents\GitHub\CondorcetPHP\lib\Election.php on line 28

@julien-boudry
Copy link
Owner

Hi @mcurranseijo

Condorcet 3.1 does not support PHP 7.x, . He's working only with PHP 8.0 and 8.1.

You need to use Condorcet 2.0 or upgrade your PHP version.

@julien-boudry
Copy link
Owner

(ps: Probably I can add a version check and fatal error on __CondorcetAutoload.php, but I suggest to use ComposerPHP autoloader instead, Composer do all checks)

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

No branches or pull requests

2 participants