0

下面是修改后的代码,在 `composer update.

PHP 8.1.1 (cli) (built: Dec 15 2021 04:17:42) (NTS) 版权所有 (c) The PHP Group Zend Engine v4.1.1, 版权所有 (c) Zend Technologies

这是错误日志:

@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 /home/xyz/example.com/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 1270

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 /home/xyz/example.com/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 1281

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 /home/xyz/example.com/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 1293

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 /home/xyz/example.com/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 1306

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 /home/xyz/example.com/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 /home/xyz/example.com/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 /home/xyz/example.com/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 /home/xyz/example.com/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 Arra
 yAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in 

请给我一个解决这个问题的方法。

4

1 回答 1

0

我解决了将 laravel 从 7 升级到 8 的问题

于 2022-01-25T12:55:28.637 回答