spiral / app

Spiral Framework Skeleton HTTP Application: Queue, Console, Cycle ORM
https://spiral.dev/
MIT License
194 stars 21 forks source link

Could not install spiral framework on linux #139

Closed mjimlittle closed 1 year ago

mjimlittle commented 1 year ago

When trying to install spiral framework using the following command: composer create-project spiral/app my-app I get the following error:

> Installer\Internal\Configurator::configure

In Extractor.php line 427:

  [TypeError]          
  Illegal offset type  

Exception trace:
  at /home/manos/Personal/my-app/vendor/nette/php-generator/src/PhpGenerator/Extractor.php:427
 Nette\PhpGenerator\Extractor->toValue() at /home/manos/Personal/my-app/vendor/nette/php-generator/src/PhpGenerator/Extractor.php:318
 Nette\PhpGenerator\Extractor->addConstantToClass() at /home/manos/Personal/my-app/vendor/nette/php-generator/src/PhpGenerator/Extractor.php:265
 Nette\PhpGenerator\Extractor->addClassMembers() at /home/manos/Personal/my-app/vendor/nette/php-generator/src/PhpGenerator/Extractor.php:253
 Nette\PhpGenerator\Extractor->addClassLikeToFile() at /home/manos/Personal/my-app/vendor/nette/php-generator/src/PhpGenerator/Extractor.php:199
 Nette\PhpGenerator\Extractor->extractAll() at /home/manos/Personal/my-app/vendor/nette/php-generator/src/PhpGenerator/Factory.php:285
 Nette\PhpGenerator\Factory->fromCode() at /home/manos/Personal/my-app/vendor/spiral/framework/src/Reactor/src/FileDeclaration.php:48
 Spiral\Reactor\FileDeclaration::fromCode() at /home/manos/Personal/my-app/installer/Internal/Generator/AbstractConfigurator.php:21
 Installer\Internal\Generator\AbstractConfigurator->__construct() at /home/manos/Personal/my-app/installer/Internal/Generator/Bootloader/BootloaderConfigurator.php:23
 Installer\Internal\Generator\Bootloader\BootloaderConfigurator->__construct() at /home/manos/Personal/my-app/installer/Internal/Generator/Bootloader/ExceptionHandlerBootloaderConfigurator.php:22
 Installer\Internal\Generator\Bootloader\ExceptionHandlerBootloaderConfigurator->__construct() at /home/manos/Personal/my-app/installer/Internal/Configurator.php:116
 Installer\Internal\Configurator->buildContext() at /home/manos/Personal/my-app/installer/Internal/Configurator.php:67
 Installer\Internal\Configurator->__construct() at /home/manos/Personal/my-app/installer/Internal/Configurator.php:77
 Installer\Internal\Configurator::configure() at /usr/share/php/Composer/EventDispatcher/EventDispatcher.php:450
 Composer\EventDispatcher\EventDispatcher->executeEventPhpScript() at /usr/share/php/Composer/EventDispatcher/EventDispatcher.php:257
 Composer\EventDispatcher\EventDispatcher->doDispatch() at /usr/share/php/Composer/EventDispatcher/EventDispatcher.php:129
 Composer\EventDispatcher\EventDispatcher->dispatchScript() at /usr/share/php/Composer/Installer.php:394
 Composer\Installer->run() at /usr/share/php/Composer/Command/CreateProjectCommand.php:263
 Composer\Command\CreateProjectCommand->installProject() at /usr/share/php/Composer/Command/CreateProjectCommand.php:153
 Composer\Command\CreateProjectCommand->execute() at /usr/share/php/Composer/vendor/symfony/console/Command/Command.php:298
 Symfony\Component\Console\Command\Command->run() at /usr/share/php/Composer/vendor/symfony/console/Application.php:1040
 Symfony\Component\Console\Application->doRunCommand() at /usr/share/php/Composer/vendor/symfony/console/Application.php:301
 Symfony\Component\Console\Application->doRun() at /usr/share/php/Composer/Console/Application.php:382
 Composer\Console\Application->doRun() at /usr/share/php/Composer/vendor/symfony/console/Application.php:171
 Symfony\Component\Console\Application->run() at /usr/share/php/Composer/Console/Application.php:145
 Composer\Console\Application->run() at /usr/bin/composer:94

PHP version

PHP 8.2.11 (cli) (built: Sep 26 2023 11:11:58) (NTS gcc x86_64)
Copyright (c) The PHP Group
Zend Engine v4.2.11, Copyright (c) Zend Technologies
    with Zend OPcache v8.2.11, Copyright (c), by Zend Technologies

Composer Version

Composer version 2.6.5 2023-10-06 10:11:52

Is there any way I can work around this error?

butschster commented 1 year ago

Hi! There is a problem with one f the latest release of nette/php-generator. We will fix it soon! Thanks for the bug report!

butschster commented 1 year ago

Fixed