سلام
من حین نصب لاراول با خطای زیر روبرو میشم
Package swiftmailer/swiftmailer is abandoned, you should avoid using it. Use symfony/mailer instead.
Package symfony/debug is abandoned, you should avoid using it. Use symfony/error-handler instead.
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
Deprecation Notice: Return type of Illuminate\Container\Container::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:\Users\q\Desktop\project\vendor\laravel\framework\src\Illuminate\Container\Container.php:1231
Deprecation Notice: Return type of Illuminate\Container\Container::offsetGet($key) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in C:\Users\q\Desktop\project\vendor\laravel\framework\src\Illuminate\Container\Container.php:1242
Deprecation Notice: Return type of Illuminate\Container\Container::offsetSet($key, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in C:\Users\q\Desktop\project\vendor\laravel\framework\src\Illuminate\Container\Container.php:1254
Deprecation Notice: Return type of Illuminate\Container\Container::offsetUnset($key) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in C:\Users\q\Desktop\project\vendor\laravel\framework\src\Illuminate\Container\Container.php:1267
> @php artisan package:discover --ansi
Deprecated: Return type of Illuminate\Container\Container::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:\Users\q\Desktop\project\vendor\laravel\framework\src\Illuminate\Container\Container.php on line 1231
Deprecated: Return type of Illuminate\Container\Container::offsetGet($key) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in C:\Users\q\Desktop\project\vendor\laravel\framework\src\Illuminate\Container\Container.php on line 1242
Deprecated: Return type of Illuminate\Container\Container::offsetSet($key, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in C:\Users\q\Desktop\project\vendor\laravel\framework\src\Illuminate\Container\Container.php on line 1254
Deprecated: Return type of Illuminate\Container\Container::offsetUnset($key) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in C:\Users\q\Desktop\project\vendor\laravel\framework\src\Illuminate\Container\Container.php on line 1267
Deprecated: Return type of Illuminate\Config\Repository::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:\Users\q\Desktop\project\vendor\laravel\framework\src\Illuminate\Config\Repository.php on line 141
Deprecated: Return type of Illuminate\Config\Repository::offsetGet($key) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in C:\Users\q\Desktop\project\vendor\laravel\framework\src\Illuminate\Config\Repository.php on line 152
Deprecated: Return type of Illuminate\Config\Repository::offsetSet($key, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in C:\Users\q\Desktop\project\vendor\laravel\framework\src\Illuminate\Config\Repository.php on line 164
Deprecated: Return type of Illuminate\Config\Repository::offsetUnset($key) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in C:\Users\q\Desktop\project\vendor\laravel\framework\src\Illuminate\Config\Repository.php on line 175
In Collection.php line 11:
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 #[\ReturnTypeWillCh
ange] attribute should be used to temporarily suppress the notice in C:\Users\q\Desktop\project\vendor\laravel\framework\src\Illuminate\Support\Collection.php:1277
Stack trace:
#0 C:\Users\q\Desktop\project\vendor\laravel\framework\src\Illuminate\Support\Collection.php(11): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(8192, 'Return type of ...', 'C:\\Users\\q\\Desk...', 1277)
#1 C:\Users\q\Desktop\project\vendor\composer\ClassLoader.php(576): include('C:\\Users\\q\\Desk...')
#2 C:\Users\q\Desktop\project\vendor\composer\ClassLoader.php(427): Composer\Autoload\{closure}('C:\\Users\\q\\Desk...')
#3 C:\Users\q\Desktop\project\vendor\laravel\framework\src\Illuminate\Support\helpers.php(109): Composer\Autoload\ClassLoader->loadClass('Illuminate\\Supp...')
#4 C:\Users\q\Desktop\project\vendor\laravel\framework\src\Illuminate\Foundation\PackageManifest.php(130): collect(Array)
#5 C:\Users\q\Desktop\project\vendor\laravel\framework\src\Illuminate\Foundation\PackageManifest.php(106): Illuminate\Foundation\PackageManifest->build()
#6 C:\Users\q\Desktop\project\vendor\laravel\framework\src\Illuminate\Foundation\PackageManifest.php(89): Illuminate\Foundation\PackageManifest->getManifest()
#7 C:\Users\q\Desktop\project\vendor\laravel\framework\src\Illuminate\Foundation\PackageManifest.php(78): Illuminate\Foundation\PackageManifest->config('aliases')
#8 C:\Users\q\Desktop\project\vendor\laravel\framework\src\Illuminate\Foundation\Bootstrap\RegisterFacades.php(26): Illuminate\Foundation\PackageManifest->aliases()
#9 C:\Users\q\Desktop\project\vendor\laravel\framework\src\Illuminate\Foundation\Application.php(219): Illuminate\Foundation\Bootstrap\RegisterFacades->bootstrap(Object(Illuminate\Foundation\Application))
#10 C:\Users\q\Desktop\project\vendor\laravel\framework\src\Illuminate\Foundation\Console\Kernel.php(320): Illuminate\Foundation\Application->bootstrapWith(Array)
#11 C:\Users\q\Desktop\project\vendor\laravel\framework\src\Illuminate\Foundation\Console\Kernel.php(129): Illuminate\Foundation\Console\Kernel->bootstrap()
#12 C:\Users\q\Desktop\project\artisan(37): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#13 {main}
Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 255
شما قصد دارید کدام ورژن لاراول رو نصب کنید؟
توجه کنید که این خطا مربوط به پکیج swiftmailer/swiftmailer
هست که در ورژن ۹ به بعد لاراول دیگه استفاده نمیشه و به جای آن باید پکیج symfony/mailer
استفاده کنید
سلام @nimageneral عزیز
من قصد دارم نسخه ۶ نصب کنم چون میخوام با دوره ای که میبینم نسخم یکی باشه
سلام من هم دقیقا همین ارور رو دریافت میکنم میشه بگی چجوری رفعش کردی؟ پروکسی و گیت رو امتحان کردم
سلام @Darlene عزیز
مثل اینکه یه مدته حدود ۱ ماهه این مشکل ایجاد شده چون قبلاً به این مشکل برنخورده بودم هر راهی بود امتحان کردن نشد حتی فایل های لاراول نسخه ۶ دریافت کردم ران کردم باز هم خطا داد .
برای همین مجبور به نصب نسخه ۱۰ شدم
موفق باشید 💙
آیا مایل به ارسال نوتیفیکیشن و اخبار از طرف راکت هستید ؟