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

PHP8.1 support #562

Closed
Jeckerson opened this issue Sep 11, 2021 · 13 comments
Closed

PHP8.1 support #562

Jeckerson opened this issue Sep 11, 2021 · 13 comments

Comments

@Jeckerson
Copy link

Feature Request

Current fatal error that I get with latest version of box:

Fatal error: During inheritance of IteratorAggregate: Uncaught ErrorException: Return type of _HumbugBox113887eee2b6\Symfony\Component\Console\Helper\HelperSet::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///srv/box.phar/vendor/symfony/console/Helper/HelperSet.php:44

Make support for PHP8.1 possible.

@theofidry
Copy link
Member

This requires more work to be done on PHP-Scoper side first.

@Jeckerson
Copy link
Author

According Symfony they already support PHP 8.1.

@Jeckerson
Copy link
Author

Also, this feature really blocks generation of .phar which then can be used inside Phalcon tests.

@theofidry
Copy link
Member

According Symfony they already support PHP 8.1.

The problem is not Symfony on which the app is built but PHP-Scoper which is used to bundle the PHAR.

Thinking about this again, since Box does not use any PHP 8.0 or 8.1 features, maybe it won't require more than "just" updating the dependencies.

@Jeckerson
Copy link
Author

So you suggest to compile .phar with PHP7.4 and it might work with PHP >= 8.0 ?

@theofidry
Copy link
Member

No I meant to build box on PHP 8.1

@Jeckerson
Copy link
Author

@theofidry Do you need any help with this?

@jrfnl
Copy link
Contributor

jrfnl commented Oct 11, 2021

Related #567 / PR #568

@jrfnl
Copy link
Contributor

jrfnl commented Oct 11, 2021

Also related PR #570

@jrfnl
Copy link
Contributor

jrfnl commented Oct 11, 2021

More related: #571

@llaville
Copy link
Contributor

@theofidry has right when he said that PHP 8.1 compatibility is broken by humbug/php-scoper (https://github.com/box-project/box/blob/3.14.0/composer.json#L51) that did not support a compatible symfony/console version (see symfony/console@9a4fcec and tags for minimum versions)

Confirmed if you run composer why symfony/console on box-project

humbug/box          3.x-dev  requires   symfony/console (^4.3.5 || ^5.2)
humbug/php-scoper   0.14.1   requires   symfony/console (^3.2 || ^4.0)
symfony/var-dumper  v5.3.8   conflicts  symfony/console (<4.4)

composer.lock told us that it's symfony/console v4.4.23 installed in box-project, and minimum should be 4.4.30 (related to symfony/console@9a4fcec)

@andypost
Copy link

andypost commented Jan 4, 2022

Filed another PR to fix requirement checker #585

Somehow latest release 3.14.1 has no box.phar somehow

@theofidry
Copy link
Member

Should be now working with 3.15

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

5 participants