expose
expose copied to clipboard
syntax error with v2.5.0
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
❯ ~
Which PHP version do you use?
@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
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
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
Same issue with PHP 8.0.25
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
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
Same issue for me. Does anyone found a solution yet?
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
Same issue for me. Does anyone found a solution yet?
"yes":
{
"require-dev": {
"beyondcode/expose": "~2.4.0"
}
}
:-)
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. :(
Oh, https://github.com/beyondcode/expose/blob/2.4.0/composer.json#L19 :-1:
So you can:
- wait
- try to fix it and do PR
- fork and change PHP req. to 8.1 and check if it work
- other option :/
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
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