Closed Gt-tuo closed 1 year ago
To add: tried the same procedure with a working .evn file from a different project, sadly with the same error
Issue is related to PHP 8.2 which was not picked up during composer install. Running with PHP 8.1 fixes the issue with Date::now($tz) in helpers.php. Issue closed.
Prerequisites
Please answer the following questions for yourself before submitting an issue.
Expected Behavior
Installation succeeds
Current Behavior
Installation fails at database migration. After running "composer install" and creating the keys via artisan, when running "php artisan migrate --seed" or "php artisan migrate:fresh --seed", the following error occurs during installation:
Failure Information (for bugs)
Dropped all tables successfully. Migration table created successfully. Migrating: 2014_10_12_000000_create_roles_table Migrated: 2014_10_12_000000_create_roles_table (1,502.26ms) Migrating: 2014_10_12_100000_create_password_resets_table Migrated: 2014_10_12_100000_create_password_resets_table (1,397.80ms) Migrating: 2019_08_19_000000_create_failed_jobs_table Migrated: 2019_08_19_000000_create_failed_jobs_table (1,440.81ms) Migrating: 2019_12_14_000001_create_personal_access_tokens_table Migrated: 2019_12_14_000001_create_personal_access_tokens_table (3,134.27ms) Migrating: 2021_11_16_083132_create_users_table Migrated: 2021_11_16_083132_create_users_table (1,612.94ms) Migrating: 2021_11_17_113752_create_categories_table Migrated: 2021_11_17_113752_create_categories_table (1,552.45ms) Migrating: 2021_11_17_115150_create_tags_table Migrated: 2021_11_17_115150_create_tags_table (2,215.40ms) Migrating: 2021_11_18_073007_create_items_table Migrated: 2021_11_18_073007_create_items_table (1,989.56ms) Migrating: 2021_11_18_085437_create_item_tag_table Migrated: 2021_11_18_085437_create_item_tag_table (7,815.15ms) Seeding: Database\Seeders\RolesSeeder
TypeError
Carbon\Carbon::setLastErrors(): Argument #1 ($lastErrors) must be of type array, bool given, called in /Users/tuo/PhpstormProjects/######/vendor/nesbot/carbon/src/Carbon/Traits/Creator.php on line 98
at vendor/nesbot/carbon/src/Carbon/Traits/Creator.php:928 924▕ @param array $lastErrors 925▕ 926▕ @return void 927▕ / ➜ 928▕ private static function setLastErrors(array $lastErrors) 929▕ { 930▕ static::$lastErrors = $lastErrors; 931▕ } 932▕
6 database/seeders/RolesSeeder.php:20 now()
15 database/seeders/DatabaseSeeder.php:25 Illuminate\Database\Seeder::call("Database\Seeders\RolesSeeder")
Steps to Reproduce
Installation starts, database schema is beeing imported until the above mentioned error brings it to a halt.
Context
MacBook Pro 16'' 2021, M1 Max MacOS X 13.0.1 PHPStorm 2022.2.4 Laravel Plugin 0.15.4
Failure Logs
See above