I’m trying to work with the Laminas Framework.
To do this, I first download the skeleton application.
But when I use the command $ composer create-project -s dev laminas / laminas-mvc-skeleton path / to / install and do the installation manually I get the following error message:
PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function Composer \ Installer :: setUpdate (), 0 passed in /home/panstone/path/to/install/vendor/laminas/laminas-skeleton-installer/src/OptionalPackagesInstaller.php on line 321 and exactly 1 expected in phar: ///usr/bin/composer/src/Composer/Installer.php: 1053
Using Composer 2.0.8 and PHP 7.4.9
thank you in advance!
Hello and welcome to our forums!
Unfortunately there is a problem with the installer and version 2 of Composer and we will check this.
A temporary workaround can be found in the related issue report:
opened 10:03PM - 10 Dec 20 UTC
closed 10:56PM - 15 Dec 20 UTC
Bug
### Bug Report
| Q | A
|------------ | ------
| Version(s) | 0… .2.1
#### Summary
I'm using `composer create-project --stability dev laminas/laminas-mvc-skeleton /opt/backend` , when composer asks about minimal install (optional packages) I tried various combinations (most of the packages, just one, or just a different one), but the error is the same. (mvc-skeleton is at 1.2.x-dev 12ff936 currently)
```
...
Updating root package
Running an update to install optional packages
PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function Composer\Installer::setUpdate(), 0 passed in /opt/backend_try2/vendor/laminas/laminas-skeleton-installer/src/OptionalPackagesInstaller.php on line 321 and exactly 1 expected in phar:///usr/local/bin/composer/src/Composer/Installer.php:1053
Stack trace:
#0 /opt/backend_try2/vendor/laminas/laminas-skeleton-installer/src/OptionalPackagesInstaller.php(321): Composer\Installer->setUpdate()
#1 /opt/backend_try2/vendor/laminas/laminas-skeleton-installer/src/OptionalPackagesInstaller.php(107): Laminas\SkeletonInstaller\OptionalPackagesInstaller->runInstaller()
#2 /opt/backend_try2/vendor/laminas/laminas-skeleton-installer/src/Plugin.php(84): Laminas\SkeletonInstaller\OptionalPackagesInstaller->__invoke()
#3 [internal function]: Laminas\SkeletonInstaller\Plugin->installOptionalDependencies()
#4 phar:///usr/local/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php(172): call_user_func()
#5 phar:///usr/local/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php(101): Composer\EventDispatcher\EventDispatcher->doDispatch()
#6 phar:///usr/local/bin/composer/src/Composer/Installer.php(339): Composer\EventDispatcher\EventDispatcher->dispatchScript()
#7 phar:///usr/local/bin/composer/src/Composer/Command/CreateProjectCommand.php(241): Composer\Installer->run()
#8 phar:///usr/local/bin/composer/src/Composer/Command/CreateProjectCommand.php(156): Composer\Command\CreateProjectCommand->installProject()
#9 phar:///usr/local/bin/composer/vendor/symfony/console/Command/Command.php(245): Composer\Command\CreateProjectCommand->execute()
#10 phar:///usr/local/bin/composer/vendor/symfony/console/Application.php(835): Symfony\Component\Console\Command\Command->run()
#11 phar:///usr/local/bin/composer/vendor/symfony/console/Application.php(185): Symfony\Component\Console\Application->doRunCommand()
#12 phar:///usr/local/bin/composer/src/Composer/Console/Application.php(310): Symfony\Component\Console\Application->doRun()
#13 phar:///usr/local/bin/composer/vendor/symfony/console/Application.php(117): Composer\Console\Application->doRun()
#14 phar:///usr/local/bin/composer/src/Composer/Console/Application.php(122): Symfony\Component\Console\Application->run()
#15 phar:///usr/local/bin/composer/bin/composer(63): Composer\Console\Application->run()
#16 /usr/local/bin/composer(24): require('...')
#17 {main}
thrown in phar:///usr/local/bin/composer/src/Composer/Installer.php on line 1053
```
Sorry about the circumstance!