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

1.7.19: 'bin/gpm index' empty list on PHP 7.4.11, throws exception on PHP 8.0.0 #3092

Closed
pamtbaau opened this issue Dec 5, 2020 · 5 comments
Assignees

Comments

@pamtbaau
Copy link
Contributor

pamtbaau commented Dec 5, 2020

PHP 7.4.11

  • Clean install: composer create-project getgrav/grav ./
    Grav v1.6.30
  • bin/gpm index --> correct list of plugins/themes
  • Upgrade Grav: bin/gpm selfupgrade
    Grav v1.7.0-rc.19
  • bin/gpm index --> Plugins/themes are listed, but no info.
    PLUGINS [ 109 ]
    ------------------------------------------------------------------------
    | Count | Name         | Slug               | Version  | Installed     |
    ========================================================================
    | Array |
    | Array |
    ...etc.
    

PHP 8.0.0

  • Clean install from zip
    Grav v1.7.0-rc.19
  • bin/gpm index
GPM Releases Configuration: Testing

PLUGINS [ 337 ]
PHP Fatal error:  Uncaught TypeError: mb_strwidth(): Argument #1 ($string) must be of type string, array given in /path/to/grav-admin/vendor/league/climate/src/TerminalObject/Helper/StringLength.php:36
Stack trace:
#0 /path/to/grav-admin/vendor/league/climate/src/TerminalObject/Helper/StringLength.php(36): mb_strwidth()
#1 /path/to/grav-admin/vendor/league/climate/src/TerminalObject/Helper/StringLength.php(64): League\CLImate\TerminalObject\Basic\Table->lengthWithoutTags()
#2 /path/to/grav-admin/vendor/league/climate/src/TerminalObject/Basic/Table.php(234): League\CLImate\TerminalObject\Basic\Table->pad()
#3 /path/to/grav-admin/vendor/league/climate/src/TerminalObject/Basic/Table.php(216): League\CLImate\TerminalObject\Basic\Table->buildCell()
#4 /path/to/grav-admin/system/src/Grav/Console/TerminalObjects/Table.php(23): League\CLImate\TerminalObject\Basic\Table->buildRow()
#5 /path/to/grav-admin/vendor/league/climate/src/TerminalObject/Router/BasicRouter.php(28): Grav\Console\TerminalObjects\Table->result()
#6 /path/to/grav-admin/vendor/league/climate/src/TerminalObject/Router/Router.php(99): League\CLImate\TerminalObject\Router\BasicRouter->execute()
#7 /path/to/grav-admin/vendor/league/climate/src/CLImate.php(384): League\CLImate\TerminalObject\Router\Router->execute()
#8 /path/to/grav-admin/vendor/league/climate/src/CLImate.php(399): League\CLImate\CLImate->buildTerminalObject()
#9 /path/to/grav-admin/vendor/league/climate/src/CLImate.php(435): League\CLImate\CLImate->routeRemainingMethod()
#10 /path/to/grav-admin/system/src/Grav/Console/Gpm/IndexCommand.php(131): League\CLImate\CLImate->__call()
#11 /path/to/grav-admin/system/src/Grav/Console/ConsoleCommand.php(41): Grav\Console\Gpm\IndexCommand->serve()
#12 /path/to/grav-admin/vendor/symfony/console/Command/Command.php(255): Grav\Console\ConsoleCommand->execute()
#13 /path/to/grav-admin/vendor/symfony/console/Application.php(1009): Symfony\Component\Console\Command\Command->run()
#14 /path/to/grav-admin/vendor/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand()
#15 /path/to/grav-admin/vendor/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun()
#16 /path/to/grav-admin/bin/gpm(79): Symfony\Component\Console\Application->run()
#17 {main}
  thrown in /path/to/grav-admin/vendor/league/climate/src/TerminalObject/Helper/StringLength.php on line 36
@rhukster
Copy link
Member

rhukster commented Dec 5, 2020

I can confirm that index is not displayed as intended. It looks like something changed with CLImate library update. It only seems to impact the 'visual' side of things, install and update worked fine for me.

@pamtbaau
Copy link
Contributor Author

pamtbaau commented Dec 5, 2020

Not sure what you mean by 'visual', but $ bin/gpm info <package> also works fine.

@rhukster
Copy link
Member

rhukster commented Dec 5, 2020

visual = only impacts the displaying of the package in the CLI, it's not an issue retrieving the data, just presenting.

@mahagr
Copy link
Member

mahagr commented Dec 7, 2020

Should be fixed now.

@mahagr mahagr closed this as completed Dec 7, 2020
@mahagr mahagr added the fixed label Dec 7, 2020
@pamtbaau
Copy link
Contributor Author

pamtbaau commented Dec 8, 2020

Test confirms issue has been resolved.

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

3 participants