Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Syntax Error Standalone Build #11

Closed
aza-rian opened this issue Nov 5, 2018 · 4 comments
Closed

Syntax Error Standalone Build #11

aza-rian opened this issue Nov 5, 2018 · 4 comments

Comments

@aza-rian
Copy link

aza-rian commented Nov 5, 2018

Hey there,

I've found the closed #10 issue that seems really close to mine, the only difference is that i'm running a Debian machine.

php's version :

$ php -v
PHP 7.0.30-0+deb9u1 (cli) (built: Jun 14 2018 13:50:25) ( NTS )

What I Did

$ wget https://github.com/designsecurity/progpilot/releases/download/v0.4.0/progpilot_v0.4.0.phar
$ php progpilot_v0.4.0.phar

What I Got

PHP Parse error: syntax error, unexpected '?', expecting variable (T_VARIABLE) in phar:///.../progpilot_v0.4.0.phar/vendor/symfony/console/Output/Output.php on line 40

Did I do something obviously wrong ?

@eric-therond
Copy link
Collaborator

Hello
Thanks for your report, I have found the problem :
the phar archive progpilot_v0.4.0.phar was built with a version of php most recent than yours (and during the build version 4.1.5 of symfony/console was used which requires at mimimum php 7.1.3).

temporarily as a fix you can build your own phar archive :

git clone https://github.com/designsecurity/progpilot.git
cd progpilot
./build.sh

or ugrade your version of php (>=7.1.3) if you want to use the phar archive (progpilot_v0.4.0.phar) provided

I will try to fix the use of dependencies as soon as possible

Eric

@aza-rian
Copy link
Author

aza-rian commented Nov 5, 2018

Thanks you for this accurate and quick answer.

In my case and for now, I don't want to upgrade my php version.

Upon doing this, i've found problem with the bash's build script you provided me :

Command build not defined

Running the script, it throws this error :

generating phar
  [Symfony\Component\Console\Exception\CommandNotFoundException]
  Command "build" is not defined.

I don't know what to do from there, have you got any ideas ?

Paul

@eric-therond
Copy link
Collaborator

Have you downloaded the latest release of https://github.com/clue/phar-composer/releases ?
And specified the correct path of this tool in composertool variable of build.sh ?
If the problem persist paste your build.sh file here and how you have launched it.

Otherwise you could try this new archive :
https://github.com/designsecurity/progpilot/tree/master/builds

Eric

@aza-rian
Copy link
Author

aza-rian commented Nov 6, 2018

Hello,

I've tried with https://github.com/clue/phar-composer and everything works properly now.

Thank you a lot for your support, i'll now enjoy using Progpilot !

Paul

@aza-rian aza-rian closed this as completed Nov 6, 2018
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants