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

Ubuntu 20.04 & PHP7.4: phive install phploc = #266

Closed
marcandreappel opened this issue Jun 12, 2020 · 5 comments
Closed

Ubuntu 20.04 & PHP7.4: phive install phploc = #266

marcandreappel opened this issue Jun 12, 2020 · 5 comments
Assignees

Comments

@marcandreappel
Copy link

Hello, I wanted to install PHPLOC on a project, and it is suggested to use phive for the dependency handling. But installing PHPLOC via phive results in the following error:

$ phive install phploc                                                                                                                                                                                                                     
Phive 0.14.3 - Copyright (C) 2015-2020 by Arne Blankerts, Sebastian Heuer and Contributors
[ERROR]    An error occurred while processing your request:

          unlink(phive.xml): No such file or directory
          
          #0 vendor/phar-io/filesystem/src/Filename.php(67)
          #1 unknown file(0): PharIo\Phive\Cli\Runner->errorHandler()
          #2 vendor/phar-io/filesystem/src/Filename.php(67): unlink()
          #3 src/services/resolver/PharIoAliasResolver.php(57): PharIo\FileSystem\Filename->delete()
          #4 src/services/resolver/AbstractRequestedPharResolver.php(22): PharIo\Phive\PharIoAliasResolver->resolve()
          #5 src/services/resolver/PharIoAliasResolver.php(33): PharIo\Phive\AbstractRequestedPharResolver->tryNext()
          #6 src/services/resolver/AbstractRequestedPharResolver.php(22): PharIo\Phive\PharIoAliasResolver->resolve()
          #7 src/services/resolver/GitlabAliasResolver.php(20): PharIo\Phive\AbstractRequestedPharResolver->tryNext()
          #8 src/services/resolver/AbstractRequestedPharResolver.php(22): PharIo\Phive\GitlabAliasResolver->resolve()
          #9 src/services/resolver/GithubAliasResolver.php(31): PharIo\Phive\AbstractRequestedPharResolver->tryNext()
          #10 src/services/resolver/AbstractRequestedPharResolver.php(22): PharIo\Phive\GithubAliasResolver->resolve()
          #11 src/services/resolver/PharIoAliasResolver.php(33): PharIo\Phive\AbstractRequestedPharResolver->tryNext()
          #12 src/services/resolver/AbstractRequestedPharResolver.php(22): PharIo\Phive\PharIoAliasResolver->resolve()
          #13 src/services/resolver/LocalAliasResolver.php(26): PharIo\Phive\AbstractRequestedPharResolver->tryNext()
          #14 src/services/resolver/RequestedPharResolverService.php(28): PharIo\Phive\LocalAliasResolver->resolve()
          #15 src/commands/install/InstallCommand.php(53): PharIo\Phive\RequestedPharResolverService->resolve()
          #16 src/commands/install/InstallCommand.php(42): PharIo\Phive\InstallCommand->resolveToRelease()
          #17 src/commands/install/InstallCommand.php(37): PharIo\Phive\InstallCommand->installRequestedPhar()
          #18 src/shared/cli/Runner.php(215): PharIo\Phive\InstallCommand->execute()
          #19 src/shared/cli/Runner.php(70): PharIo\Phive\Cli\Runner->execute()
          #20 (349): PharIo\Phive\Cli\Runner->run()
          #21 {main}

          Environment: PHP 7.4.6 (on Linux 5.4.44-050444-generic)
          Phive Version: 0.14.3

          This should not have happened and is most likely a bug.
          Please report it at https://github.com/phar-io/phive/issues, make sure you include
          the full output of this error message. Thank you!

Here's a list of enabled php modules:

$ php -m 
                                                                                                                                                                                                                                
[PHP Modules]
bcmath
calendar
Core
ctype
curl
date
dom
exif
FFI
fileinfo
filter
ftp
gettext
hash
iconv
json
libxml
mbstring
openssl
pcntl
pcre
PDO
Phar
posix
readline
Reflection
session
shmop
SimpleXML
sockets
sodium
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
xdebug
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zip
zlib

[Zend Modules]
Xdebug
Zend OPcache

Did I do something wrong? Or is it really a bug?
Thanks in advance

@theseer
Copy link
Member

theseer commented Jun 12, 2020

First: Any type of crash that is not caught and wrapped in a human readable error message is a bug.

So, yes, this clear qualifies as a bug.

More so, this looks like a regression from a change made for 0.14. I'll have a look.

@theseer
Copy link
Member

theseer commented Jun 12, 2020

Okay, that was rather stupid.

But there's also a bigger underlying issue, gonna refactor something before releasing a fixed version.

Thanks for "finding" this.

@marcandreappel
Copy link
Author

I don't know if I should be happy about finding that bug, but as a fellow developer I can appreciate every bug report one can.
Anyhow, thanks for the work!

@theseer
Copy link
Member

theseer commented Jun 12, 2020

I don't use phpstan. And I don't see how a static analyser would find a logical bug. It's not a type error. It's a logic problem.

@theseer
Copy link
Member

theseer commented Jun 12, 2020

For what it's worth: I updated phpstan and adjusted the config to work with the latest version. All the errors and warnings it reports are useless, false positives or plain wrong. For me, phpstan doesn't work or I'm using it wrong.

I'm considering to add psalm to CI sometime soon though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants