spiral / app

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

FatalError after composer create-project. #33

Closed siad007 closed 2 years ago

siad007 commented 4 years ago

After composer create-project spiral/app the script ended up with the following fatal error:

Writing lock file
Generating autoload files
15 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
> php -r "copy('.env.sample', '.env');"
> php app.php encrypt:key -m .env
Fatal error: Access level to Spiral\Nyholm\Bootloader\NyholmBootloader::SINGLETONS must be public (as in class Spiral\Boot\Bootloader\Bootloader) in /Users/XXX/tool_schema-registry/vendor/spiral/nyholm-bridge/src/Bootloader/NyholmBootloader.php on line 32
 [Spiral\Boot\Exception\FatalException]                                                                                               
 Access level to Spiral\Nyholm\Bootloader\NyholmBootloader::SINGLETONS must be public (as in class Spiral\Boot\Bootloader\Bootloader) 
in /Users/XXX/tool_schema-registry/vendor/spiral/nyholm-bridge/src/Bootloader/NyholmBootloader.php:32

Exception Trace:
 Spiral\Boot\ExceptionHandler::handleShutdown() at /Users/XXX/tool_schema-registry/vendor/spiral/nyholm-bridge/src/Bootloader/NyholmBootloader.php:32
 Spiral\Boot\ExceptionHandler::handleShutdown() at n/a:n/a
Script php app.php encrypt:key -m .env handling the post-create-project-cmd event returned with error code 255

The visibility of the constant used in Spiral\Nyholm\Bootloader\NyholmBootloader::SINGLETONS is protected, but it has to be public. See Spiral\Boot\Bootloader\Bootloader::SINGLETONS

SerafimArts commented 4 years ago

This is strange... I check it and everything was created ok:

Writing lock file
Generating autoload files
58 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
> php -r "copy('.env.sample', '.env');"
> php app.php encrypt:key -m .env
New encryption key: def000001da27508e4938dcf46b5ec7c09640393da301f41d00a88e8ebff65fe5d9afda5a13582d53733743b691b09033bfd64a21066c686183a7f07f27af16a9c9c14f2
Encryption key has been updated.
> php app.php configure -vv
Configuring project:

[runtime] verify `runtime` directory access
Verifying runtime directory... exists
[updated] `cache/cycle.php`
[updated] `cache/prototyped.php`
Runtime directory permissions were updated.
// ... etc

Checked on PHP 7.2 and 7.4.

Please make sure that the latest version of the application (1.1.4) is being installed.