negar_a 1 گزارش دادن ارسال شده در مهر 1 باسلام. نسخه ی جدید xampp,composer رو نصب کردم . تا با لاراول 9 کار کنم . حالا پروژه ی قدیمی من که با لاراول 7 بود و همین طور php 7 دیگه کار نمیکنه. یعنی دستورات artisan اجرا نمیشه و کلی خطا میده . PS C:\xampp\htdocs\mysite\shopping> php artisan migrate PHP Fatal error: During inheritance of ArrayAccess: Uncaught ErrorException: Return type of Illuminate\Support\Collection::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in C:\xampp\htdocs\mysite\shopping\vendor\laravel\fra mework\src\Illuminate\Support\Collection.php:1294 Stack trace: #0 C:\xampp\htdocs\mysite\shopping\vendor\laravel\fra mework\src\Illuminate\Support\Collection.php(11): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(8192, 'Return type of ...', 'C:\\xampp\\htdocs...', 1294) #1 C:\xampp\htdocs\mysite\shopping\vendor\composer\Cl assLoader.php(444): include('C:\\xampp\\htdocs...') #2 C:\xampp\htdocs\mysite\shopping\vendor\composer\Cl assLoader.php(322): Composer\Autoload\includeFile('C:\\xampp\\htdocs.. .') #3 C:\xampp\htdocs\mysite\shopping\vendor\laravel\fra mework\src\Illuminate\Support\helpers.php(109): Composer\Autoload\ClassLoader->loadClass('Illuminate\\Supp...') #4 C:\xampp\htdocs\mysite\shopping\vendor\laravel\fra mework\src\Illuminate\Foundation\PackageManifest.p hp(89): collect(Array) #5 C:\xampp\htdocs\mysite\shopping\vendor\laravel\fra mework\src\Illuminate\Foundation\PackageManifest.p hp(78): Illuminate\Foundation\PackageManifest->config('aliases') #6 C:\xampp\htdocs\mysite\shopping\vendor\laravel\fra mework\src\Illuminate\Foundation\Bootstrap\Registe rFacades.php(26): Illuminate\Foundation\PackageManifest->aliases() #7 C:\xampp\htdocs\mysite\shopping\vendor\laravel\fra mework\src\Illuminate\Foundation\Application.php(2 28): Illuminate\Foundation\Bootstrap\RegisterFacades->bootstrap(Object(Illuminate\Foundation\Applicatio n)) #8 C:\xampp\htdocs\mysite\shopping\vendor\laravel\fra mework\src\Illuminate\Foundation\Console\Kernel.ph p(311): Illuminate\Foundation\Application->bootstrapWith(Array) #9 C:\xampp\htdocs\mysite\shopping\vendor\laravel\fra mework\src\Illuminate\Foundation\Console\Kernel.ph p(128): Illuminate\Foundation\Console\Kernel->bootstrap() #10 C:\xampp\htdocs\mysite\shopping\artisan(37): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\Arg vInput), Object(Symfony\Component\Console\Output\ConsoleOut put)) #11 {main} in C:\xampp\htdocs\mysite\shopping\vendor\laravel\fra mework\src\Illuminate\Support\Collection.php on line 11 PHP Fatal error: Uncaught ErrorException: Method ReflectionParameter::getClass() is deprecated in C:\xampp\htdocs\mysite\shopping\vendor\laravel\fra mework\src\Illuminate\Container\Container.php:875 Stack trace: #0 C:\xampp\htdocs\mysite\shopping\vendor\laravel\fra mework\src\Illuminate\Container\Container.php(875) : Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(8192, 'Method Reflecti...', 'C:\\xampp\\htdocs...', 875) #1 C:\xampp\htdocs\mysite\shopping\vendor\laravel\fra mework\src\Illuminate\Container\Container.php(838) : Illuminate\Container\Container->resolveDependencies(Array) #2 C:\xampp\htdocs\mysite\shopping\vendor\laravel\fra mework\src\Illuminate\Container\Container.php(685) : Illuminate\Container\Container->build('App\\Exceptions\\...') #3 C:\xampp\htdocs\mysite\shopping\vendor\laravel\fra mework\src\Illuminate\Foundation\Application.php(7 94): Illuminate\Container\Container->resolve('App\\Exceptions\\...', Array, false) #4 C:\xampp\htdocs\mysite\shopping\vendor\laravel\fra mework\src\Illuminate\Container\Container.php(265) : Illuminate\Foundation\Application->resolve('App\\Exceptions\\...', Array, false) #5 C:\xampp\htdocs\mysite\shopping\vendor\laravel\fra mework\src\Illuminate\Container\Container.php(803) : Illuminate\Container\Container->Illuminate\Container\{closure}(Object(Illuminate\ Foundation\Application), Array) #6 C:\xampp\htdocs\mysite\shopping\vendor\laravel\fra mework\src\Illuminate\Container\Container.php(685) : Illuminate\Container\Container->build(Object(Closure)) #7 C:\xampp\htdocs\mysite\shopping\vendor\laravel\fra mework\src\Illuminate\Foundation\Application.php(7 94): Illuminate\Container\Container->resolve('Illuminate\\Cont...', Array, true) #8 C:\xampp\htdocs\mysite\shopping\vendor\laravel\fra mework\src\Illuminate\Container\Container.php(633) : Illuminate\Foundation\Application->resolve('Illuminate\\Cont...', Array) #9 C:\xampp\htdocs\mysite\shopping\vendor\laravel\fra mework\src\Illuminate\Foundation\Application.php(7 79): Illuminate\Container\Container->make('Illuminate\\Cont...', Array) #10 C:\xampp\htdocs\mysite\shopping\vendor\laravel\fra mework\src\Illuminate\Foundation\Bootstrap\HandleE xceptions.php(164): Illuminate\Foundation\Application->make('Illuminate\\Cont...') #11 C:\xampp\htdocs\mysite\shopping\vendor\laravel\fra mework\src\Illuminate\Foundation\Bootstrap\HandleE xceptions.php(108): Illuminate\Foundation\Bootstrap\HandleExceptions->getExceptionHandler() #12 C:\xampp\htdocs\mysite\shopping\vendor\laravel\fra mework\src\Illuminate\Foundation\Bootstrap\HandleE xceptions.php(94): Illuminate\Foundation\Bootstrap\HandleExceptions->renderForConsole(Object(ErrorException)) #13 C:\xampp\htdocs\mysite\shopping\vendor\laravel\fra mework\src\Illuminate\Foundation\Bootstrap\HandleE xceptions.php(130): Illuminate\Foundation\Bootstrap\HandleExceptions->handleException(Object(ErrorException)) #14 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handleShutdown() #15 {main} thrown in C:\xampp\htdocs\mysite\shopping\vendor\laravel\fra mework\src\Illuminate\Container\Container.php on line 875 PS C:\xampp\htdocs\mysite\shopping> جستجو کردم میگه باید composer آپدیت بشه . ولی وقتی میزنم composer update میگه : - Root composer.json requires php ^7.2.5 but your php version (8.1.6) does not satisfy that requirement. ارهایی که انجام دادم : اول در composer.json بطور دستی ورژن جدید php رو وارد کردم . php : 8.1.6 سپس دستور composer update رو اجرا کردم. اما بعد از وارد کردن php artisan باز خطاهای بالا رو میده نقل قول Share this post Link to post Share on other sites
saber 143 گزارش دادن ارسال شده در آبان 1 بهتره بجای xampp از نرم افزار laragon استفاده کنید که براحتی میتونید نسخه های مختلف php رو روش نصب کنید و هر زمان خواستید براحتی نسخه php رو متناسب با پروژه ای که کار میکنید تغییر بدید و بدون مشکل روی تمام نسخه های مورد نیاز کار کنید نقل قول Share this post Link to post Share on other sites