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

Fatal error on PHP 8.1 #319

Closed
jrfnl opened this issue Jul 23, 2021 · 3 comments
Closed

Fatal error on PHP 8.1 #319

jrfnl opened this issue Jul 23, 2021 · 3 comments

Comments

@jrfnl
Copy link
Contributor

jrfnl commented Jul 23, 2021

Just ran into the following error when running Phive 0.14.5 on PHP 8.1:

    [phive] Phive 0.14.5 - Copyright (C) 2015-2021 by Arne Blankerts, Sebastian Heuer and Contributors
    [phive] PHP Fatal error:  During inheritance of IteratorAggregate: Uncaught ArgumentCountError: Too few arguments to function PharIo\Phive\Cli\Runner::errorHandler(), 4 passed in phar:///usr/local/bin/phive/src/shared/phar/ReleaseCollection.php on line 4 and exactly 5 expected in phar:///usr/local/bin/phive/src/shared/cli/Runner.php:98
    [phive] Stack trace:
    [phive] #0 phar:///usr/local/bin/phive/src/shared/phar/ReleaseCollection.php(4): PharIo\Phive\Cli\Runner->errorHandler()
    [phive] #1 /usr/local/bin/phive(342): require('...')
    [phive] #2 phar:///usr/local/bin/phive/src/shared/repository/LocalRepository.php(16): PharIo\Phive\{closure}()
    [phive] Result: 255
    [phive] #3 phar:///usr/local/bin/phive/src/services/resolver/LocalAliasResolver.php(22): PharIo\Phive\LocalRepository->getReleasesByRequestedPhar()
    [phive] #4 phar:///usr/local/bin/phive/src/services/resolver/RequestedPharResolverService.php(28): PharIo\Phive\LocalAliasResolver->resolve()
    [phive] #5 phar:///usr/local/bin/phive/src/commands/install/InstallCommand.php(53): PharIo\Phive\RequestedPharResolverService->resolve()
    [phive] #6 phar:///usr/local/bin/phive/src/commands/install/InstallCommand.php(42): PharIo\Phive\InstallCommand->resolveToRelease()
    [phive] #7 phar:///usr/local/bin/phive/src/commands/install/InstallCommand.php(37): PharIo\Phive\InstallCommand->installRequestedPhar()
    [phive] #8 phar:///usr/local/bin/phive/src/shared/cli/Runner.php(215): PharIo\Phive\InstallCommand->execute()
    [phive] #9 phar:///usr/local/bin/phive/src/shared/cli/Runner.php(69): PharIo\Phive\Cli\Runner->execute()
    [phive] #10 /usr/local/bin/phive(349): PharIo\Phive\Cli\Runner->run()
    [phive] #11 {main} in phar:///usr/local/bin/phive/src/shared/phar/ReleaseCollection.php on line 4

Looks like the argumentCount issue was fixed in commit ce96f4c, though I expect there may still be an underlying PHP 8.1 issue which triggered the error handler to be called in the first place.

jrfnl added a commit to jrfnl/Autoload that referenced this issue Jul 23, 2021
This translates the existing Travis workflow to a GH Actions workflow.

Effectively it is the same workflow.

At a detail level, there are the following differences:
* The commands to download Phive have been removed in favour of letting the `setup-php` action install it automatically.
* A build against PHP 8.0 has been added which is not allowed to fail.
* A build against PHP 8.1 has been added, which is (allowed to fail).

The build against PHP 8.1 also _does_ currently fail, but this is due to a PHP 8.1 incompatibility in Phive.
This issue has been reported in phar-io/phive#319 and :fingers_crossed: phar-io/phive#320 should fix it.
@jaapio
Copy link
Contributor

jaapio commented Jul 24, 2021

You are ahead of me :-D I encountered the same issue useing php 8.1

@jrfnl
Copy link
Contributor Author

jrfnl commented Jul 24, 2021

@jaapio Yup, this was one of the rabbit hole domino's ;-)

theseer pushed a commit to theseer/Autoload that referenced this issue Jul 24, 2021
This translates the existing Travis workflow to a GH Actions workflow.

Effectively it is the same workflow.

At a detail level, there are the following differences:
* The commands to download Phive have been removed in favour of letting the `setup-php` action install it automatically.
* A build against PHP 8.0 has been added which is not allowed to fail.
* A build against PHP 8.1 has been added, which is (allowed to fail).

The build against PHP 8.1 also _does_ currently fail, but this is due to a PHP 8.1 incompatibility in Phive.
This issue has been reported in phar-io/phive#319 and :fingers_crossed: phar-io/phive#320 should fix it.
@theseer
Copy link
Member

theseer commented Jul 24, 2021

This should be fixed with 0.15.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

3 participants