Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Installation & Hosting

GPM Uninstall script stops working after upgrade to 1.7

gpm plugins

Started by Gil Oliveira 5 years ago · 2 replies · 569 views
5 years ago

I've searched around some time but can't seem to find clues to solving this puzzle. After upgrading my GRAV installation to 1.7 through CLI, the bin/gpm uninstall command seems to be broken.

I've tested the command with two plugins: mobile-detect and problems, with the same result for both plugins.

To see what caused the issue, I rolled back some updates of composer packages and GRAV to v1.6. I tested the script after each step and found that it only stopped working after upgrading GRAV to v1.7. I hope someone could point me in the right direction, since it doesn't seem to be a common issue.

PHP
Fatal error:  Uncaught TypeError: Grav\Console\Gpm\UninstallCommand::checkDestination(): Argument #2 ($package) must be of type Grav\Common\GPM\Remote\Package, Grav\Common\GPM\Local\Package given, called in wwwroot/system/src/Grav/Console/Gpm/UninstallCommand.php on line 118 and defined in wwwroot/system/src/Grav/Console/Gpm/UninstallCommand.php:254
Stack trace:
#0 wwwroot/system/src/Grav/Console/Gpm/UninstallCommand.php(118): Grav\Console\Gpm\UninstallCommand->checkDestination('problems', Object(Grav\Common\GPM\Local\Package))
#1 wwwroot/system/src/Grav/Console/GpmCommand.php(41): Grav\Console\Gpm\UninstallCommand->serve()
#2 wwwroot/vendor/symfony/console/Command/Command.php(255): Grav\Console\GpmCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#3 wwwroot/vendor/symfony/console/Application.php(1009): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#4 wwwroot/vendor/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand(Object(Grav\Console\Gpm\UninstallCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#5 wwwroot/vendor/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#6 wwwroot/bin/gpm(49): Symfony\Component\Console\Application->run()
#7 {main}
  thrown in wwwroot/system/src/Grav/Console/Gpm/UninstallCommand.php on line 254

This issue was also posted on GRAV's Github repo.

last edited 01/22/21 by Gil Oliveira
5 years ago

@giloliveira_mg, If rhukster added the 'bug' label to the issue, there is not much we can do here to fix $ bin/gpm uninstall ...

Try to disable all plugins and see whappens. My experience is that when any plugin throws an incompatibility issue with 1.7, the cli will fail.

5 years ago

Thanks for your response! There's been some progress, I see you've been active as well. Let's wait for clearcache to be implemented and the fix to be published in a stable release.

Suggested topics

Topic Participants Replies Views Activity
Installation & Hosting · by antoinep, 15 hours ago
5 61 9 hours ago
Installation & Hosting · by Jürgen Dietrich, 7 months ago
0 63 7 months ago
Installation & Hosting · by rappluk, 8 months ago
0 62 8 months ago
Installation & Hosting · by N, 12 months ago
3 73 12 months ago
Installation & Hosting · by Youle, 1 year ago
1 62 1 year ago