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.
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.