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

syntax error with v2.5.0 #358

Open
Gavrisimo opened this issue Dec 21, 2022 · 14 comments
Open

syntax error with v2.5.0 #358

Gavrisimo opened this issue Dec 21, 2022 · 14 comments

Comments

@Gavrisimo
Copy link

Gavrisimo commented Dec 21, 2022

Hey there, so I tried upgrading to 2.5.0 and then to share one of my local domains, but I am getting this error:

Parse error: syntax error, unexpected token ")" in phar:///Users/gigi/.composer/vendor/beyondcode/expose/builds/expose/vendor/symfony/finder/Finder.php on line 636

Here is info on php on my machine:

❯ ~ php -v
PHP 8.0.23 (cli) (built: Sep  3 2022 12:20:56) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.23, Copyright (c) Zend Technologies
    with Zend OPcache v8.0.23, Copyright (c), by Zend Technologies

So what I did was I downgraded to 2.4.0 and then it worked:

❯ ~ composer global update
Changed current directory to /Users/gigi/.composer
Loading composer repositories with package information
Updating dependencies
Lock file operations: 0 installs, 1 update, 0 removals
  - Downgrading beyondcode/expose (2.5.0 => 2.4.0)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 0 installs, 1 update, 0 removals
  - Downgrading beyondcode/expose (2.5.0 => 2.4.0): Extracting archive
Generating autoload files
No security vulnerability advisories found
❯ ~ expose share https://*************.test --domain=local*************.dev --server=us-1
------------------------------------------------------------
          A new Expose Update is available (2.5.0)
             To update run: expose self-update
------------------------------------------------------------
               Thank you for using Expose Pro
------------------------------------------------------------

Shared URL:		*************.test:443
Dashboard:		http://127.0.0.1:4040
Public HTTP:		http://*************.local*************.dev
Public HTTPS:		https://*************.local*************.dev

^C

Then I tried upgrading again to 2.5.0 and running expose but it failed again:

❯ ~ composer global update
Changed current directory to /Users/gigi/.composer
Loading composer repositories with package information
Updating dependencies
Lock file operations: 0 installs, 1 update, 0 removals
  - Upgrading beyondcode/expose (2.4.0 => 2.5.0)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 0 installs, 1 update, 0 removals
  - Upgrading beyondcode/expose (2.4.0 => 2.5.0): Extracting archive
Generating autoload files
No security vulnerability advisories found
❯ ~ expose share https://*************.test --domain=local*************.dev --server=us-1
PHP Parse error:  syntax error, unexpected token ")" in phar:///Users/gigi/.composer/vendor/beyondcode/expose/builds/expose/vendor/symfony/finder/Finder.php on line 636

Parse error: syntax error, unexpected token ")" in phar:///Users/gigi/.composer/vendor/beyondcode/expose/builds/expose/vendor/symfony/finder/Finder.php on line 636
❯ ~
@mpociot
Copy link
Member

mpociot commented Dec 21, 2022

Which PHP version do you use?

@Gavrisimo
Copy link
Author

Gavrisimo commented Dec 21, 2022

@mpociot sorry, I forgot to add that info, I just updated the first post.

❯ ~ php -v
PHP 8.0.23 (cli) (built: Sep  3 2022 12:20:56) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.23, Copyright (c) Zend Technologies
    with Zend OPcache v8.0.23, Copyright (c), by Zend Technologies

@tomaszkane
Copy link

tomaszkane commented Dec 22, 2022

Same problem:
PHP Parse error: syntax error, unexpected token ")" in phar:///home/kane/workspace/expose/vendor/symfony/finder/Finder.php on line 636

after:

curl https://github.com/beyondcode/expose/raw/master/builds/expose -L --output expose
chmod +x expose
./expose
$ php -v
PHP 8.0.25 (cli) (built: Oct 28 2022 18:02:51) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.25, Copyright (c) Zend Technologies
    with Zend OPcache v8.0.25, Copyright (c), by Zend Technologies

@roybarber
Copy link

Same for me:

PHP 8.0.25 (cli) (built: Oct 29 2022 01:48:36) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.25, Copyright (c) Zend Technologies
    with Zend OPcache v8.0.25, Copyright (c), by Zend Technologies

@samharvey44
Copy link

Same issue with PHP 8.0.25

@jdempster
Copy link

Same

$ php -v
PHP 8.0.27 (cli) (built: Jan  6 2023 03:55:10) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.27, Copyright (c) Zend Technologies
    with Zend OPcache v8.0.27, Copyright (c), by Zend Technologies

@MikePriceAero
Copy link

Also got this on PHP 8.0.x after updating. I've gone back to Expose 2.4.x now and while I'm not getting an error, I'm also not getting any kind of output or a server at all at time of writing, but I guess that's a separate issue...

PHP 8.0.25 (cli) (built: Oct 31 2022 08:58:29) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.25, Copyright (c) Zend Technologies
    with Zend OPcache v8.0.25, Copyright (c), by Zend Technologies

@TimFins
Copy link

TimFins commented Jan 27, 2023

Same issue for me. Does anyone found a solution yet?

@TimFins
Copy link

TimFins commented Jan 27, 2023

Also got this on PHP 8.0.x after updating. I've gone back to Expose 2.4.x now and while I'm not getting an error, I'm also not getting any kind of output or a server at all at time of writing, but I guess that's a separate issue...

PHP 8.0.25 (cli) (built: Oct 31 2022 08:58:29) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.25, Copyright (c) Zend Technologies
    with Zend OPcache v8.0.25, Copyright (c), by Zend Technologies

This worked out for me well but as soon as I update PHP from 8.0.X to 8.1.X this won't work out anymore because expose 2.4.X needs a lower php version then 8.1.X

@tomaszkane
Copy link

Same issue for me. Does anyone found a solution yet?

"yes":

{
    "require-dev": {
        "beyondcode/expose": "~2.4.0"
    }
}

:-)

@TimFins
Copy link

TimFins commented Jan 27, 2023

Same issue for me. Does anyone found a solution yet?

"yes":

{
    "require-dev": {
        "beyondcode/expose": "~2.4.0"
    }
}

:-)

But then you won't have the latest version of expose. So yes like this it works but is still a kind of workaround. :(

@tomaszkane
Copy link

Oh, https://github.com/beyondcode/expose/blob/2.4.0/composer.json#L19 👎

So you can:

  1. wait
  2. try to fix it and do PR
  3. fork and change PHP req. to 8.1 and check if it work
  4. other option :/

@johnvoncolln
Copy link

Having this issue with the hosted version as well, using php 8.0.27, not because I want to, but have to because of other dependencies

@mpociot
Copy link
Member

mpociot commented Feb 16, 2023

So the main problem is that, while all the dependencies of Expose are backward compatible with PHP 8.0, the bundled PHAR file in 2.5.0 does not work with PHP 8.0 as it was bundled using PHP 8.2 dependencies.

You can manually downgrade your local Expose version to v2.4 like this:
composer global update beyondcode/expose:2.4.0

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

9 participants