im cant install any hooks, even test-hook. i want to install voyager-excel, but always error. then i try to install test-hook, but the same error showing.
Steps to reproduce the behavior:
PS C:\Users\Bakti Qilan\Documents\Magang\laravel-voyager> php artisan hook:install test-hook
RuntimeException
require.test-hook is invalid, it should have a vendor name, a forward slash, and a package name. The vendor and package name can be words separated
by -, . or _. The complete name should match "^a-z0-9/a-z0-9$".
at C:\Users\Bakti Qilan\Documents\Magang\laravel-voyager\vendor\composer\composer\src\Composer\Package\Loader\RootPackageLoader.php:149
145â–• foreach (array_keys(BasePackage::$supportedLinkTypes) as $linkType) {
146â–• if (isset($config[$linkType])) {
147â–• foreach ($config[$linkType] as $linkName => $constraint) {
148â–• if ($err = ValidatingArrayLoader::hasPackageNamingError($linkName, true)) {
➜ 149▕ throw new \RuntimeException($linkType.'.'.$err);
150â–• }
151â–• }
152â–• }
153â–• }
1 C:\Users\Bakti Qilan\Documents\Magang\laravel-voyager\vendor\composer\composer\src\Composer\Factory.php:363
Composer\Package\Loader\RootPackageLoader::load("Composer\Package\RootPackage", "C:\Users\Bakti Qilan\Documents\Magang\laravel-voyager")
2 C:\Users\Bakti Qilan\Documents\Magang\laravel-voyager\vendor\composer\composer\src\Composer\Factory.php:590
Composer\Factory::createComposer(Object(Composer\IO\ConsoleIO))

Hi, i have exactly the same problem on a Debian fresh install of Voyager. I used the same process than 3 months ago in a previous installation, and everything worked fine. On this new install, i have the "require.test-hook is invalid" for every hook i try to add.
Laravel v7.29.3 / Voyager v1.4.2
Are you guys both using composer 2?
I use Composer version 1.8.4 on all my Voyager installation, never had the problem before.
Are you guys both using composer 2?
i am using composer 1.10.13, should i update the composer ?
I am removed composer exception !
work for me this fork
composer require mrpk-dev/voyager:v1.4.7
This fork only comment the function which fire the error, its not working on the root cause of the problem.
if ($err = ValidatingArrayLoader::hasPackageNamingError($linkName, true)) {
throw new \RuntimeException($linkType.'.'.$err);
/* throw new \RuntimeException($linkType.'.'.$err); */
}
I am using composer 2.0.4 and obtaining the same error for any hook... any ideas?
Same problem
composer 2.0.8
laravel hooks 1.0.12
Laravel Voyager hooks 1.2.3
Laravel installer 4.1.1
The install command is not part of Voyager repo, it should be reported in https://github.com/larapack/hooks
This fork only comment the function which fire the error, its not working on the root cause of the problem.
if ($err = ValidatingArrayLoader::hasPackageNamingError($linkName, true)) { throw new \RuntimeException($linkType.'.'.$err); /* throw new \RuntimeException($linkType.'.'.$err); */ }
After do this:
-php artisan hook:install voyager-polls
-php artisan cache:clear
-php artisan route:cache
it worked for me!