یلدا ادامه داره... ❤️ ۴۰ درصد تخفیف همه دوره‌ها

استفاده از تخفیف‌ها
ثانیه
دقیقه
ساعت
روز
مرتضی رضوی
1 سال پیش توسط مرتضی رضوی مطرح شد
2 پاسخ

مشکل در php artisan serve در یک پروژه لاراولی

سلام به همه دوستان, ,من میخوام یک پروژه لاراولی که با php 7 توسعه داده شده رو روی سیستم خودم که با php8.2 است را اجرا کنم, ابتدا دستور composer install --ignore-platform-reqs را اجرا کرده و حالا که php artisan serve را میزنم با ارور زیر مواجه میشم `


TypeError

Carbon\\Carbon::setLastErrors(): Argument #1 ($lastErrors) must be of type array, bool given, called in C:\\Users\\ITcenter\\Desktop\\avaexBack-main\\vendor\\nesbot\\carbon\\src\\Carbon\\Traits\\Creator.php on line 98

at C:\\Users\\ITcenter\\Desktop\\avaexBack-main\\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▕

Whoops\\Exception\\ErrorException

Using ${var} in strings is deprecated, use {$var} instead

at C:\\Users\\ITcenter\\Desktop\\avaexBack-main\\vendor\\facade\\ignition\\src\\SolutionProviders\\MergeConflictSolutionProvider.php:52  
48▕ }  
49▕  
50▕ protected function getCurrentBranch(string $directory): string  
51▕ {  
➜ 52▕ $branch = "'".trim(shellexec("cd ${directory}; git branch | grep \\\* | cut -d ' ' -f2"))."'";  
53▕  
54▕ if ($branch === "''") {  
55▕ $branch = 'current branch';  
56▕ }  
PHP Fatal error: Uncaught Whoops\\Exception\\ErrorException: Using ${var} in strings is deprecated, use {$var} instead in C:\\Users\\ITcenter\\Desktop\\avaexBack-main\\vendor\\facade\\ignition\\src\\SolutionProviders\\MergeConflictSolutionProvider.php:52  
Stack trace:

# 0 C:\\Users\\ITcenter\\Desktop\\avaexBack-main\\vendor\\composer\\ClassLoader.php(576): Whoops\\Run->handleError(8192, 'Using ${var} in...', 'C:\\Users\\ITcent...', 52)

# 1 C:\\Users\\ITcenter\\Desktop\\avaexBack-main\\vendor\\composer\\ClassLoader.php(576): include()

# 2 C:\\Users\\ITcenter\\Desktop\\avaexBack-main\\vendor\\composer\\ClassLoader.php(427): Composer\\Autoload{closure}('C:\\Users\\ITcent...')

# 3 \[internal function\]: Composer\\Autoload\\ClassLoader->loadClass('Facade\\Ignition...')

# 4 C:\\Users\\ITcenter\\Desktop\\avaexBack-main\\vendor\\facade\\ignition\\src\\SolutionProviders\\SolutionProviderRepository.php(50): classimplements('Facade\\Ignition...')

# 5 \[internal function\]: Facade\\Ignition\\SolutionProviders\\SolutionProviderRepository->Facade\\Ignition\\SolutionProviders{closure}('Facade\\Ignition...', 10)

# 6 C:\\Users\\ITcenter\\Desktop\\avaexBack-main\\vendor\\laravel\\framework\\src\\Illuminate\\Collections\\Arr.php(717): arrayfilter(Array, Object(Closure), 1)

# 7 C:\\Users\\ITcenter\\Desktop\\avaexBack-main\\vendor\\laravel\\framework\\src\\Illuminate\\Collections\\Collection.php(358): Illuminate\\Support\\Arr::where(Array, Object(Closure))

# 8 C:\\Users\\ITcenter\\Desktop\\avaexBack-main\\vendor\\facade\\ignition\\src\\SolutionProviders\\SolutionProviderRepository.php(49): Illuminate\\Support\\Collection->filter(Object(Closure))

# 9 C:\\Users\\ITcenter\\Desktop\\avaexBack-main\\vendor\\nunomaduro\\collision\\src\\Adapters\\Laravel\\IgnitionSolutionsRepository.php(36): Facade\\Ignition\\SolutionProviders\\SolutionProviderRepository->getSolutionsForThrowable(Object(Whoops\\Exception\\ErrorException))

# 10 C:\\Users\\ITcenter\\Desktop\\avaexBack-main\\vendor\\nunomaduro\\collision\\src\\Writer.php(244): NunoMaduro\\Collision\\Adapters\\Laravel\\IgnitionSolutionsRepository->getFromThrowable(Object(Whoops\\Exception\\ErrorException))

# 11 C:\\Users\\ITcenter\\Desktop\\avaexBack-main\\vendor\\nunomaduro\\collision\\src\\Writer.php(123): NunoMaduro\\Collision\\Writer->renderSolution(Object(Whoops\\Exception\\Inspector))

# 12 C:\\Users\\ITcenter\\Desktop\\avaexBack-main\\vendor\\nunomaduro\\collision\\src\\Handler.php(39): NunoMaduro\\Collision\\Writer->write(Object(Whoops\\Exception\\Inspector))

# 13 C:\\Users\\ITcenter\\Desktop\\avaexBack-main\\vendor\\filp\\whoops\\src\\Whoops\\Run.php(370): NunoMaduro\\Collision\\Handler->handle(Object(Whoops\\Exception\\ErrorException))

# 14 \[internal function\]: Whoops\\Run->handleException(Object(Whoops\\Exception\\ErrorException))

# 15 {main}

thrown in C:\\Users\\ITcenter\\Desktop\\avaexBack-main\\vendor\\facade\\ignition\\src\\SolutionProviders\\MergeConflictSolutionProvider.php on line 52

Symfony\\Component\\ErrorHandler\\Error\\FatalError

Uncaught Whoops\\Exception\\ErrorException: Using ${var} in strings is deprecated, use {$var} instead in C:\\Users\\ITcenter\\Desktop\\avaexBack-main\\vendor\\facade\\ignition\\src\\SolutionProviders\\MergeConflictSolutionProvider.php:52  
Stack trace:

# 0 C:\\Users\\ITcenter\\Desktop\\avaexBack-main\\vendor\\composer\\ClassLoader.php(576): Whoops\\Run->handleError(8192, 'Using ${var} in...', 'C:\\Users\\ITcent...', 52)

# 1 C:\\Users\\ITcenter\\Desktop\\avaexBack-main\\vendor\\composer\\ClassLoader.php(576): include()

# 2 C:\\Users\\ITcenter\\Desktop\\avaexBack-main\\vendor\\composer\\ClassLoader.php(427): Composer\\Autoload{closure}('C:\\Users\\ITcent...')

# 3 \[internal function\]: Composer\\Autoload\\ClassLoader->loadClass('Facade\\Ignition...')

# 4 C:\\Users\\ITcenter\\Desktop\\avaexBack-main\\vendor\\facade\\ignition\\src\\SolutionProviders\\SolutionProviderRepository.php(50): classimplements('Facade\\Ignition...')

# 5 \[internal function\]: Facade\\Ignition\\SolutionProviders\\SolutionProviderRepository->Facade\\Ignition\\SolutionProviders{closure}('Facade\\Ignition...', 10)

# 6 C:\\Users\\ITcenter\\Desktop\\avaexBack-main\\vendor\\laravel\\framework\\src\\Illuminate\\Collections\\Arr.php(717): arrayfilter(Array, Object(Closure), 1)

# 7 C:\\Users\\ITcenter\\Desktop\\avaexBack-main\\vendor\\laravel\\framework\\src\\Illuminate\\Collections\\Collection.php(358): Illuminate\\Support\\Arr::where(Array, Object(Closure))

# 8 C:\\Users\\ITcenter\\Desktop\\avaexBack-main\\vendor\\facade\\ignition\\src\\SolutionProviders\\SolutionProviderRepository.php(49): Illuminate\\Support\\Collection->filter(Object(Closure))

# 9 C:\\Users\\ITcenter\\Desktop\\avaexBack-main\\vendor\\nunomaduro\\collision\\src\\Adapters\\Laravel\\IgnitionSolutionsRepository.php(36): Facade\\Ignition\\SolutionProviders\\SolutionProviderRepository->getSolutionsForThrowable(Object(Whoops\\Exception\\ErrorException))

# 10 C:\\Users\\ITcenter\\Desktop\\avaexBack-main\\vendor\\nunomaduro\\collision\\src\\Writer.php(244): NunoMaduro\\Collision\\Adapters\\Laravel\\IgnitionSolutionsRepository->getFromThrowable(Object(Whoops\\Exception\\ErrorException))

# 11 C:\\Users\\ITcenter\\Desktop\\avaexBack-main\\vendor\\nunomaduro\\collision\\src\\Writer.php(123): NunoMaduro\\Collision\\Writer->renderSolution(Object(Whoops\\Exception\\Inspector))

# 12 C:\\Users\\ITcenter\\Desktop\\avaexBack-main\\vendor\\nunomaduro\\collision\\src\\Handler.php(39): NunoMaduro\\Collision\\Writer->write(Object(Whoops\\Exception\\Inspector))

# 13 C:\\Users\\ITcenter\\Desktop\\avaexBack-main\\vendor\\filp\\whoops\\src\\Whoops\\Run.php(370): NunoMaduro\\Collision\\Handler->handle(Object(Whoops\\Exception\\ErrorException))

# 14 \[internal function\]: Whoops\\Run->handleException(Object(Whoops\\Exception\\ErrorException))

# 15 {main}

thrown

at C:\\Users\\ITcenter\\Desktop\\avaexBack-main\\vendor\\facade\\ignition\\src\\SolutionProviders\\MergeConflictSolutionProvider.php:52  
48▕ }  
49▕  
50▕ protected function getCurrentBranch(string $directory): string  
51▕ {  
➜ 52▕ $branch = "'".trim(shellexec("cd ${directory}; git branch | grep \\\* | cut -d ' ' -f2"))."'";  
53▕  
54▕ if ($branch === "''") {  
55▕ $branch = 'current branch';  
56▕ }  
PHP Fatal error: Uncaught Whoops\\Exception\\ErrorException: Using ${var} in strings is deprecated, use {$var} instead in C:\\Users\\ITcenter\\Desktop\\avaexBack-main\\vendor\\facade\\ignition\\src\\SolutionProviders\\MergeConflictSolutionProvider.php:52  
Stack trace:

# 0 C:\\Users\\ITcenter\\Desktop\\avaexBack-main\\vendor\\composer\\ClassLoader.php(576): Whoops\\Run->handleError(8192, 'Using ${var} in...', 'C:\\Users\\ITcent...', 52)

# 1 C:\\Users\\ITcenter\\Desktop\\avaexBack-main\\vendor\\composer\\ClassLoader.php(576): include()

# 2 C:\\Users\\ITcenter\\Desktop\\avaexBack-main\\vendor\\composer\\ClassLoader.php(427): Composer\\Autoload{closure}('C:\\Users\\ITcent...')

# 3 \[internal function\]: Composer\\Autoload\\ClassLoader->loadClass('Facade\\Ignition...')

# 4 C:\\Users\\ITcenter\\Desktop\\avaexBack-main\\vendor\\facade\\ignition\\src\\SolutionProviders\\SolutionProviderRepository.php(50): classimplements('Facade\\Ignition...')

# 5 \[internal function\]: Facade\\Ignition\\SolutionProviders\\SolutionProviderRepository->Facade\\Ignition\\SolutionProviders{closure}('Facade\\Ignition...', 10)

# 6 C:\\Users\\ITcenter\\Desktop\\avaexBack-main\\vendor\\laravel\\framework\\src\\Illuminate\\Collections\\Arr.php(717): arrayfilter(Array, Object(Closure), 1)

# 7 C:\\Users\\ITcenter\\Desktop\\avaexBack-main\\vendor\\laravel\\framework\\src\\Illuminate\\Collections\\Collection.php(358): Illuminate\\Support\\Arr::where(Array, Object(Closure))

# 8 C:\\Users\\ITcenter\\Desktop\\avaexBack-main\\vendor\\facade\\ignition\\src\\SolutionProviders\\SolutionProviderRepository.php(49): Illuminate\\Support\\Collection->filter(Object(Closure))

# 9 C:\\Users\\ITcenter\\Desktop\\avaexBack-main\\vendor\\nunomaduro\\collision\\src\\Adapters\\Laravel\\IgnitionSolutionsRepository.php(36): Facade\\Ignition\\SolutionProviders\\SolutionProviderRepository->getSolutionsForThrowable(Object(Symfony\\Component\\ErrorHandler\\Error\\FatalError))

# 10 C:\\Users\\ITcenter\\Desktop\\avaexBack-main\\vendor\\nunomaduro\\collision\\src\\Writer.php(244): NunoMaduro\\Collision\\Adapters\\Laravel\\IgnitionSolutionsRepository->getFromThrowable(Object(Symfony\\Component\\ErrorHandler\\Error\\FatalError))

# 11 C:\\Users\\ITcenter\\Desktop\\avaexBack-main\\vendor\\nunomaduro\\collision\\src\\Writer.php(123): NunoMaduro\\Collision\\Writer->renderSolution(Object(NunoMaduro\\Collision\\Adapters\\Laravel\\Inspector))

# 12 C:\\Users\\ITcenter\\Desktop\\avaexBack-main\\vendor\\nunomaduro\\collision\\src\\Handler.php(39): NunoMaduro\\Collision\\Writer->write(Object(NunoMaduro\\Collision\\Adapters\\Laravel\\Inspector))

# 13 C:\\Users\\ITcenter\\Desktop\\avaexBack-main\\vendor\\nunomaduro\\collision\\src\\Adapters\\Laravel\\ExceptionHandler.php(72): NunoMaduro\\Collision\\Handler->handle()

# 14 C:\\Users\\ITcenter\\Desktop\\avaexBack-main\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Bootstrap\\HandleExceptions.php(185): NunoMaduro\\Coll

ision\\Adapters\\Laravel\\ExceptionHandler->renderForConsole(Object(Symfony\\Component\\Console\\Output\\ConsoleOutput), Object(Symfony\\Component\\ErrorHandler\\Error\\FatalError))

# 15 C:\\Users\\ITcenter\\Desktop\\avaexBack-main\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Bootstrap\\HandleExceptions.php(171): Illuminate\\Foundation\\Bootstrap\\HandleExceptions->renderForConsole(Object(Symfony\\Component\\ErrorHandler\\Error\\FatalError))

# 16 C:\\Users\\ITcenter\\Desktop\\avaexBack-main\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Bootstrap\\HandleExceptions.php(209): Illuminate\\Foundation\\Bootstrap\\HandleExceptions->handleException(Object(Symfony\\Component\\ErrorHandler\\Error\\FatalError))

# 17 \[internal function\]: Illuminate\\Foundation\\Bootstrap\\HandleExceptions->handleShutdown()

# 18 {main}

thrown in C:\\Users\\ITcenter\\Desktop\\avaexBack-main\\vendor\\facade\\ignition\\src\\SolutionProviders\\MergeConflictSolutionProvider.php on line 52  
PS C:\\Users\\ITcenter\\Desktop\\avaexBack-main>  
`  ```
ممنون میشم دوستان کمک کنید.

ثبت پرسش جدید
میکائیل
تخصص : برنامه نویسی سمت سرور و کلاینت
@FullStack 1 سال پیش مطرح شد
0

سلام وقت بخیر دوست عزیز کد خیلی درهم ور همه و برای خوندنش زمان زیادی میخواد اگه میشه مرتب کنید و قسمت های مهم رو توی تگ های کد قرار بدید تا اررور رو بررسی کنیم و جواب رو بگیم مثلا چون الان توی تگ کد نبوده جای حروف و اععداد عوض شده و کلا بهم ریخته نمیشه خوند


Ali Saheb
تخصص : برنامه نویس
@alihidarianfar 3 ماه پیش مطرح شد
0

سلام
وارد فایل زیر میشی :

vendor/nesbot/carbon/src/Carbon/Traits/Creator.php

خط 928 : کد زیر

private static function setLastErrors(array $lastErrors)

رو به این کد تغییر میدی :

private static function setLastErrors($lastErrors)

برای ارسال پاسخ لازم است وارد شده یا ثبت‌نام کنید

ورود یا ثبت‌نام